摘要: Setting up CocoaPods master repo,半天没有任何反应。原因无他,因为那堵墙阻挡了cocoapods.org。。。gitcafe和oschina都是国内的服务器,可以用它们CocoaPods索引库的镜像:$ pod repo remove master$ pod repo add masterhttps://gitcafe.com/akuandev/Specs.git... 阅读全文
posted @ 2015-02-03 10:24 М80メ 阅读(755) 评论(0) 推荐(0) 编辑
摘要: 自定义模板放置位置:Xode6 -> 打开App 后,/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File 下 阅读全文
posted @ 2015-01-26 11:46 М80メ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.sina.com.cn/s/blog_9564cb6e0101u9lv.html
从sdk3.2.5升级到sdk 7.1中间废弃了很多的方法,还有一些逻辑关系更加严谨了。1,警告:“xoxoxoxo” is deprecated解决办法:查看xoxoxoxo的这个方法的文档,替换掉这个方法即可。2,警告:Declaration of "struct sockaddr... 阅读全文
posted @ 2015-01-23 16:18 М80メ 阅读(533) 评论(0) 推荐(0) 编辑
摘要: Mark一下- (UIView*)duplicate:(UIView*)view{ NSData * tempArchive = [NSKeyedArchiver archivedDataWithRootObject: view]; return [NSKeyedUnarchiver unarchiveObjectWithData: tempArchive];} 阅读全文
posted @ 2015-01-22 16:19 М80メ 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 项目中自己搞了一个Log 记录一下.
N年的代码了 还是觉得好用 #ifdef DEBUG#define DLog(FORMAT, ...) fprintf(stderr,"%s:%d--> %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString ... 阅读全文
posted @ 2015-01-22 16:18 М80メ 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 最近好几个朋友问我关于友盟分享要怎么搞....干脆写下来~也防着哪天万一老年痴呆了记不起来怎么做....1.把UMSocial_Sdk拖到项目中,2.在AppDelegate内设置友盟AppKey,只选择你需要的3.在需要分享的视图中添加实现代码 阅读全文
posted @ 2014-12-11 16:01 М80メ 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 不多说 直接上代码
NSDate *now = [NSDate date]; UILocalNotification *reminderNotification = [[UILocalNotification alloc] init]; // 本地消息的时间间隔 [reminderNotification setFireDate: [now dateByAddingTimeI... 阅读全文
posted @ 2014-11-30 14:05 М80メ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cocoachina.com/industry/20140825/9450.html(via:玉令天下的Blog)本文讲述了UITableView、UICollectionView实现 self-sizing cell 布局的知识,以及如何用 InvalidationContext 优化 UICollectionView 布局的更新。背景iOS 越来越人性化了,用户... 阅读全文
posted @ 2014-11-28 14:32 М80メ 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 转自:http://my.oschina.net/u/728866/blog/92709我们知道segue共有三种类型:push、modal以及custom。如下图:很明显,这三种类型的作用分别是:使用导航栏压进新的视图控制器;模态的加载试图控制器;自定义。今天说的是最后一个,如何使用自定义的segue类型来实现和push类型一样的效果。这真的很简单,比当初学UINavigationContro... 阅读全文
posted @ 2014-11-25 14:10 М80メ 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 项目中需要检测来电状态,使用了CTCallCenter,在AppDelegate中,代码如下:
CTCallCenter *callCenter = [[CTCallCenter alloc] init]; callCenter.callEventHandler = ^(CTCall *call) { if ([call.callState isEqualToS... 阅读全文
posted @ 2014-11-20 20:30 М80メ 阅读(425) 评论(0) 推荐(0) 编辑