- 博客(12)
- 资源 (3)
- 收藏
- 关注
原创 iOS 点/长按地图放/ 移除大头针并显示地址
// 首先建立一个类 接受MKAnnotation>LHAnnotation.h#import #import @interface LHAnnotation : NSObject// Center latitude and longitude of the annotion view.// The implement
2016-02-26 19:18:13 2141
原创 iOS 保持登陆状态
// 登陆时存一个值 NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setObject:_UserName.text forKey:@"logname"]; [userDefaults synchronize];// 判
2016-02-26 17:30:52 352
原创 Xcode 便捷插件
VVDocumenter 轻松注释https://github.com/onevcat/VVDocumenter-XcodeKSImageNamed-Xcode 图片名预览图片https://github.com/ksuther/KSImageNamed-XcodeXcodeColors 颜色调色板 随便选颜色https://github.com/omz/C
2016-02-26 16:13:16 352
原创 iOS 插件卸载
Finder 前往->前往文件夹... 输入下面一行内容~/Library/Application Support/Developer/Shared/Xcode/选 Xcode 文件夹下的 Plug-ins 你安装的插件都在这里 不想用的那个直接找名字 干掉他(删掉)
2016-02-26 15:28:36 1035
原创 ios 系统地图
/* 导入 两个库 引用地图前 尽量用真机测试 模拟器的话 等程序运行起来之后点击 xcode下方的 位置图片按钮标识 便可 需在info.plist中追加NSLocationWhenInUseUsageDescription或NSLocationAlwaysUsageDescription字段.其中: NSLocationWhenInUseUsageDesc
2016-02-24 15:13:57 389
原创 iOS 本地推送通知
/*** 本地推送通知*/- (void)postNoteMessage { // 初始化本地通知对象 UILocalNotification *notification = [[UILocalNotification alloc] init]; if (notification) { // 设置通知的提醒时间 N
2016-02-24 15:08:53 357
原创 iOS 是否包含某个字符串 判断整形 浮点型
NSString *str1 = @"123456789asasd"; NSString *str = @"a"; //在str1这个字符串中搜索\n,判断有没有 if ([str1 rangeOfString:str].location != NSNotFound) { NSLog(@"这个字符串中有a");
2016-02-23 19:03:10 1336
原创 iOS 获取用户ip地址
引入系统库调用方法即可#include #include + (NSString *)getIPAddress{ NSString *address = @"error"; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int su
2016-02-22 13:49:47 820
原创 TableView 代理方法详细解释
-、建立 UITableViewDataTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)];[DataTable setDelegate:self];[DataTable setDataSource:self];[self.view addSubview:DataTable];[Data...
2016-02-22 10:23:12 4294
原创 iOS 取消tableviewcell 点击效果
cell.selectionStyle = UITableViewCellSelectionStyleNone;// 点击无效果- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // 移开选中效果消失 [tableView deselec
2016-02-22 10:18:02 1218
原创 iOS 轻松实现UITableViewCell 自适应高度
你还在为大量计算cel 高度而烦恼么?教你轻松搞定自适应高度 IOS8的新特性“self-sizing”Cell要求cell.contentView的四条边都与内部元素有约束关系。在TableViewController里- (void)viewDidLoad { [superviewDidLoad]; //添加这两行代码
2016-02-19 15:49:41 1347
原创 ios 弹出键盘 顶端navigationbar 会上移
是因为使用了IQKeyBoardManager 问题加上这段代码解决-(void)loadView { UIScrollView *scView = [[UIScrollView alloc]initWithFrame:[UIScreen mainScreen].bounds]; self.view = scView;}
2016-02-02 15:40:06 4802 3
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人