摘要: 自己的代码 需要 把属性更改成自己要使用的 //创建长按手势 在cellForRowAtIndexPath代理方法中 UILongPressGestureRecognizer *longPressGR = [[UILongPressGestureRecognizer alloc]initWithTa 阅读全文
posted @ 2016-12-23 17:39 孙富有(iOS工程师) 阅读(8424) 评论(0) 推荐(0)
摘要: iphone中图像通常存储在4个地方【相册、应用程序包、沙盒、Internet】,通过这4个源,我们就可以存取应用图片。 相册 iphone的相册包含摄像头胶卷+用户计算机同步的部分照片。用户可以通过UIImagePickerController类提供的交互对话框来从相册中选择图像。但是,注意:相册 阅读全文
posted @ 2016-12-23 15:38 孙富有(iOS工程师) 阅读(4436) 评论(0) 推荐(0)
摘要: 1.既然有问题我们该怎样解决 ? 首先大部分人都会去百度搜索来解决问题, 谁都不例外, 可是百度这东西会有很多误解, 甚至误人子弟, 同时解决问题的效率也不是很高, 如果是技术问题可以去: Google 简单来说比百度搜索的答案相对要多,要更准确效率更高, 建议使用英文搜索 Stack Overfl 阅读全文
posted @ 2016-12-22 12:50 孙富有(iOS工程师) 阅读(259) 评论(0) 推荐(0)
摘要: 正常情况下,在AppDelegate中实现下面两个方法,能够监听从后台恢复到前台 - (void)applicationDidEnterBackground:(UIApplication *)application { log4info(@" applicationDidEnterBackgroun 阅读全文
posted @ 2016-12-19 17:03 孙富有(iOS工程师) 阅读(1862) 评论(0) 推荐(0)
摘要: UIView * headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.tbSecond.size.width, 0)]; headView.backgroundColor = [UIColor whiteColor]; UIVi 阅读全文
posted @ 2016-12-17 16:01 孙富有(iOS工程师) 阅读(195) 评论(0) 推荐(0)
摘要: 局部刷新方法 添加数据 NSArray *indexPaths = @[ [NSIndexPath indexPathForRow:0 inSection:0], [NSIndexPath indexPathForRow:1 inSection:0] ]; [self.tableView inser 阅读全文
posted @ 2016-12-17 10:06 孙富有(iOS工程师) 阅读(3188) 评论(0) 推荐(0)
摘要: 打开系统自带app 打开系统设置: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]; 打开蓝牙: [[UIApplication sharedAppli 阅读全文
posted @ 2016-12-15 14:13 孙富有(iOS工程师) 阅读(505) 评论(0) 推荐(0)
摘要: URL Scheme不仅可以打开其他的app,当然你也能为自己的app设置URL Scheme 1、如何设置给app设置URL Scheme 添加URL types字段数组 设置URL identifier 字段 添加URL Scheme 在item写入自己的特定的启动字符串 //判断本地是否有该软 阅读全文
posted @ 2016-12-15 14:12 孙富有(iOS工程师) 阅读(25584) 评论(3) 推荐(0)
摘要: iOS app启动的方式有哪些: //APPdelegate.m中写上这个方法 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions / 阅读全文
posted @ 2016-12-15 14:05 孙富有(iOS工程师) 阅读(1475) 评论(0) 推荐(0)
摘要: 每个app有且只有一个UIApplication对象,当程序启动的时候通过调用UIApplicationMain方法得到的。可以通过sharedApplication方法得到。 UIApplication对象的主要任务是处理用户事件的处理路径,例如分发一个UIEvent到另外一个对象去处理。UIAp 阅读全文
posted @ 2016-12-15 13:44 孙富有(iOS工程师) 阅读(1973) 评论(0) 推荐(0)