摘要: 12.2.2. 方案使用UIApplication的beginBackgroundTaskWithExpirationHandler: 实例方法。在你完成任务后,调用UIApplication的endBackgroundTask:方法。12.2.3. 讨论当一个iOS应用被送到后台,它的主线程会被暂停。你用NSThread的detachNewThreadSelector:toTar get:withObject:类方法创建的线程也被挂起了。如果你想在后台完成一个长期任务,就必须调用UIApplication的beginBackgroundTaskWithExpirationHandler:实例 阅读全文
posted @ 2013-03-26 18:17 _安静ゝ 阅读(17091) 评论(2) 推荐(0) 编辑
摘要: -(BOOL)isExistenceNetwork{BOOL isExistenceNetwork;Reachability *r = [Reachability reachabilityWithHostName:@"http://www.baidu.com"];switch ([r currentReachabilityStatus]) {case NotReachable://没有网络。isExistenceNetwork=FALSE;break;case ReachableViaWWAN://没有3G信号。isExistenceNetwork=TRUE;break;c 阅读全文
posted @ 2013-03-26 17:10 _安静ゝ 阅读(755) 评论(0) 推荐(0) 编辑
摘要: //滑动删除-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ NSUInteger row = [indexPath row];[bookInforemoveObjectAtIndex:row];//bookInfo为当前table中显示的array[tableView deleteRowsAtIndexPaths:[NSArrayarrayWithOb 阅读全文
posted @ 2013-03-26 10:24 _安静ゝ 阅读(4012) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示