2016年7月13日
摘要: 原遍历数组NSArray * lines = ...for (NSString * line in lines) { // ...}for (int i = 0; i < lines.count; ++i) { NSString * s = [lines objectAtIndex:i]; ...} 阅读全文
posted @ 2016-07-13 10:09 许广 阅读(316) 评论(0) 推荐(0) 编辑
  2016年7月11日
摘要: 近期做第三方sdk接入时,发现iOS8系统下,进行银联充值后,返回游戏有很大几率会报 OpenGL error 0x0506............ 之类的绘制问题,游戏卡死,花了很长时间,一直没有头绪 最终找到这篇文章: http://blog.lessfun.com/blog/2014/09/2 阅读全文
posted @ 2016-07-11 16:46 许广 阅读(1064) 评论(0) 推荐(0) 编辑
  2016年6月21日
摘要: -(void)getValueFormConfig:(NSString *)key,... or -(void)getValueFormConfig:(NSString *)key,...NS_REQUIRES_NIL_TERMINATION; -(void)getValueFormConfig:( 阅读全文
posted @ 2016-06-21 15:52 许广 阅读(1229) 评论(0) 推荐(0) 编辑
  2016年6月20日
摘要: API Reference对__block变量修饰符有如下几处解释: 大概意思归结出来就是两点: 1.__block对象在block中是可以被修改、重新赋值的。 2.__block对象在block中不会被block强引用一次,从而不会出现循环引用问题。 API Reference对__weak变量修 阅读全文
posted @ 2016-06-20 14:51 许广 阅读(1634) 评论(0) 推荐(0) 编辑
  2016年6月15日
摘要: [view addConstraint:[NSLayoutConstraint constraintWithItem:segment attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:view attr 阅读全文
posted @ 2016-06-15 11:04 许广 阅读(926) 评论(0) 推荐(0) 编辑
  2016年5月28日
摘要: -(void)tryRun { tryTimes++; id obj = [ASODataManager getAppleAccount]; if (obj) { __block FirstViewController* sf = self; //有账号,可以开始获取数据 [[ASODataMana 阅读全文
posted @ 2016-05-28 08:39 许广 阅读(310) 评论(0) 推荐(0) 编辑
  2016年5月20日
摘要: ?: 变量在使用过程中可能存在空值,则需要用?标记,否则赋空值会报错 ? 1 2 var mustNoNilValue: String = "Swift" var canNilValue: String? = nil ? 1 2 var mustNoNilValue: String = "Swift 阅读全文
posted @ 2016-05-20 14:41 许广 阅读(321) 评论(0) 推荐(0) 编辑
  2016年5月7日
摘要: NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle].resourcePath stringByAppendingPathComponent:@"bundleName"]]; UIImage* img = [UIImag 阅读全文
posted @ 2016-05-07 15:38 许广 阅读(568) 评论(0) 推荐(0) 编辑
  2016年4月27日
摘要: 原因,安装证书错误,导致无法匹配证书, 方案:删除原来的证书,重新安装 打开终端 1、cd Library/ 2、cd MobileDevice/ 3、open Provisioning\ Profiles/ 每个项目的bundle id 都会有对应的PROVISIONING_PROFILE(pro 阅读全文
posted @ 2016-04-27 09:10 许广 阅读(470) 评论(0) 推荐(0) 编辑
  2016年4月1日
摘要: #pragma mark 弹出view -(void)exChangeOut:(UIView *)changeOutView dur:(CFTimeInterval)dur { CAKeyframeAnimation * animation; animation = [CAKeyframeAnima 阅读全文
posted @ 2016-04-01 16:44 许广 阅读(543) 评论(0) 推荐(0) 编辑