摘要:使用了下面报错Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: 'origin.x') - (instancetype)init { if (self = [super in
阅读全文
摘要:1.是否创建数据库文件 //判断文件是否存在是否是目录,不是就创建一个目录 + (NSString *)dbPathWithDirectoryName:(NSString *)directoryName { NSString *docsdir = [NSSearchPathForDirectorie
阅读全文
摘要:static OnlyOne *_instance = nil; + (instancetype)shareInstance { static dispatch_once_t onceToken ; dispatch_once(&onceToken, ^{ _instance = [[super a
阅读全文
摘要:注:只有分页显示时才有必要使用footerView的刷新 如果后台的接口返回的数据是分页的话,就需要进行上拉加载的显示,数据确实很少,就没有必要 以下是Swift写的版本 本地缓存的采用的是数据库的方式,采用FMDB框架,并且进行了上面的封装,用来降低耦合性 1.我创建了Manager的管理类,提供
阅读全文
摘要:1.检查版本更新以及自动登录 (1).宏定义 (2)#define kBundle [NSBundle mainBundle].bundleIdentifier .检查版本更新 在AppDelegate里面 - (BOOL)application:(UIApplication *)applicati
阅读全文
摘要://点击的方法 - (nullable NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ // 删除按
阅读全文
摘要:1.设置代理 <UIPopoverPresentationControllerDelegate> 2.为它设置popView的灰色透明背景 - (void)play:(UIButton *)sender { if (self.popVc == nil) { //创建一个遮罩 UIView *back
阅读全文