10 2016 档案

静态分析错误更正
摘要:使用了下面报错Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: 'origin.x') - (instancetype)init { if (self = [super in 阅读全文

posted @ 2016-10-19 14:53 敏言慎行 阅读(366) 评论(0) 推荐(0)

数据库分析
摘要:1.是否创建数据库文件 //判断文件是否存在是否是目录,不是就创建一个目录 + (NSString *)dbPathWithDirectoryName:(NSString *)directoryName { NSString *docsdir = [NSSearchPathForDirectorie 阅读全文

posted @ 2016-10-19 13:45 敏言慎行 阅读(357) 评论(0) 推荐(0)

缜密的创建一个单例
摘要:static OnlyOne *_instance = nil; + (instancetype)shareInstance { static dispatch_once_t onceToken ; dispatch_once(&onceToken, ^{ _instance = [[super a 阅读全文

posted @ 2016-10-18 20:09 敏言慎行 阅读(194) 评论(0) 推荐(0)

分页展示以及下拉刷新的本地保存
摘要:注:只有分页显示时才有必要使用footerView的刷新 如果后台的接口返回的数据是分页的话,就需要进行上拉加载的显示,数据确实很少,就没有必要 以下是Swift写的版本 本地缓存的采用的是数据库的方式,采用FMDB框架,并且进行了上面的封装,用来降低耦合性 1.我创建了Manager的管理类,提供 阅读全文

posted @ 2016-10-13 20:11 敏言慎行 阅读(211) 评论(0) 推荐(0)

分析项目心得
摘要:1.检查版本更新以及自动登录 (1).宏定义 (2)#define kBundle [NSBundle mainBundle].bundleIdentifier .检查版本更新 在AppDelegate里面 - (BOOL)application:(UIApplication *)applicati 阅读全文

posted @ 2016-10-08 12:01 敏言慎行 阅读(173) 评论(0) 推荐(0)

设置删除某一行cell
摘要://点击的方法 - (nullable NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ // 删除按 阅读全文

posted @ 2016-10-08 10:43 敏言慎行 阅读(275) 评论(0) 推荐(0)

popView
摘要:1.设置代理 <UIPopoverPresentationControllerDelegate> 2.为它设置popView的灰色透明背景 - (void)play:(UIButton *)sender { if (self.popVc == nil) { //创建一个遮罩 UIView *back 阅读全文

posted @ 2016-10-08 10:38 敏言慎行 阅读(472) 评论(0) 推荐(0)

导航