2017年7月28日
摘要: 之前,看到关于blcok外使用__weak弱化对象,blcok内再用 __strong 强引用的原因: 保证对象在blcok中不会被提前释放,当blcok执行完之后,自动释放该对象。 今天看了一下__weak修饰的对象,在被使用的时候,每次使用都会被注册到autoreleasepool中,例如: { 阅读全文
posted @ 2017-07-28 10:01 人道酬诚 阅读(179) 评论(0) 推荐(0) 编辑
  2017年7月12日
摘要: http://www.cocoachina.com/cms/wap.php?action=article&id=17936 http://www.cnblogs.com/yajunLi/p/6203222.html?utm_source=itdadao&utm_medium=referral 阅读全文
posted @ 2017-07-12 11:45 人道酬诚 阅读(75) 评论(0) 推荐(0) 编辑
  2017年6月9日
摘要: 一个线程对应一个runloop,需要给runloop添加交换信息的port(端口),才能接收和发送消息。否则,它是不会跟其他的runloop通信的。 阅读全文
posted @ 2017-06-09 17:14 人道酬诚 阅读(75) 评论(0) 推荐(0) 编辑
  2017年4月20日
摘要: NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_Hans"]; NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter. 阅读全文
posted @ 2017-04-20 14:43 人道酬诚 阅读(134) 评论(0) 推荐(0) 编辑
摘要: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(comeHome:) name:@"UIApplicationDidEnterBackgroundNotification" object:nil];/ 阅读全文
posted @ 2017-04-20 11:06 人道酬诚 阅读(170) 评论(0) 推荐(0) 编辑
  2017年4月18日
摘要: 一个scrollView,两个tableView,sc设置不能滑动,并且滑动范围是两个tableView的高度和。借助第三方的上下拉刷新,分别在两个tableView的上下拉刷新事件中,实现contentOffset的y的改变。 MJRefresh是可以设置刷新控件的偏移的来控制初始是否显示刷新控件 阅读全文
posted @ 2017-04-18 19:45 人道酬诚 阅读(110) 评论(0) 推荐(0) 编辑
  2017年3月14日
摘要: - (BOOL)prefersStatusBarHidden { return YES; }把状态栏也隐藏掉。 阅读全文
posted @ 2017-03-14 17:25 人道酬诚 阅读(224) 评论(0) 推荐(0) 编辑
  2017年3月10日
摘要: - (void)setHighlighted:(BOOL)highlighted{ // 只要重写了此方法,按钮就无法进入highlighted状态 } 阅读全文
posted @ 2017-03-10 18:19 人道酬诚 阅读(134) 评论(0) 推荐(0) 编辑
摘要: @interface welcomeLabel : UILabel +(void)setTopTipLabelWithFrame:(CGRect)frame name:(NSString *)name andNavController:(UINavigationController *)nav; @ 阅读全文
posted @ 2017-03-10 15:52 人道酬诚 阅读(104) 评论(0) 推荐(0) 编辑
  2017年2月24日
摘要: if ([UIDevice currentDevice].systemVersion.doubleValue >= 9.0) { [self.locManager setAllowsBackgroundLocationUpdates:YES]; } 还要配置plist列表 不然会崩溃 阅读全文
posted @ 2017-02-24 12:45 人道酬诚 阅读(150) 评论(0) 推荐(0) 编辑