摘要: #if DEBUG#warning NSLogs will be shown#else#define NSLog(...) {}#endif 阅读全文
posted @ 2013-08-20 15:19 金建彤 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://www.winddisk.com/2013/03/29/tableview%E5%8E%BB%E9%99%A4%E7%A9%BA%E8%A1%8C%E7%9A%84singleline/有一个简单的方法可以将空行的线去除,即在tableView中添加一个tableFooterView,如果不需要tableFooterView显示什么数据,可以直接添加个空view。tableView.tableFooterView = [[UIView alloc]init]; 阅读全文
posted @ 2013-08-20 15:18 金建彤 阅读(210) 评论(0) 推荐(0) 编辑
摘要: http://www.winddisk.com/2012/08/27/iphone_screenlock_network_disconnection/+ (void)clearPersistentConnections{ [connectionsLock lock]; NSUInteger i; for (i=0; i<[persistentConnectionsPool count]; i++) { NSDictionary *existingConnection = [persistentConnectionsPool objectAtIndex:i]; if (![existing 阅读全文
posted @ 2013-08-20 15:08 金建彤 阅读(179) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/justinjing0612/article/details/8145607 阅读全文
posted @ 2013-08-20 13:48 金建彤 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 在代码中调用如下代码:(ps: ios 5.0 以后不可用)NSURL*url=[NSURL URLWithString:@"prefs:root=WIFI"];[[UIApplication sharedApplication] openURL:url];即可跳转到设置页面的对应项。[font=]About — prefs:root=General&path=AboutAccessibility — prefs:root=General&path=ACCESSIBILITYAirplane Mode On — prefs:root=AIRPLANE_MOD 阅读全文
posted @ 2013-08-20 10:12 金建彤 阅读(282) 评论(0) 推荐(0) 编辑
摘要: http://nachbaur.com/blog/back-to-basics-using-kvo 阅读全文
posted @ 2013-08-20 10:07 金建彤 阅读(114) 评论(0) 推荐(0) 编辑
摘要: NSString*str =@"A~B^C";NSArray*arr =[str componentsSeparatedByCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"^~"]];NSLog(@"%@", arr); 阅读全文
posted @ 2013-08-20 09:48 金建彤 阅读(1630) 评论(0) 推荐(0) 编辑