[UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance 0x48
2016-02-03 11:11
573 查看
问题: 在真机测试项目的时候只在iphone4s的测试机上crash, 进入后台就crash, 进入后台的两个方法体不做任何操作也crash
解决办法: 问题出在AFNetworking框架中
在UIActivityIndicatorView+AFNetworking.m分类中
将这个方法注释掉, 因为没用到这个分类所以不会有什么影响
解决办法: 问题出在AFNetworking框架中
在UIActivityIndicatorView+AFNetworking.m分类中
-(void)dealloc { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; #endif [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; }
将这个方法注释掉, 因为没用到这个分类所以不会有什么影响
相关文章推荐
- HTML5 APP----DCloud产品分析及介绍
- 一行代码不用敲,15分钟轻松搞定GIS开发,GISer福音,教你如何从下载到使用webappbuilder创建第一个应用程
- Android第三方支付--微信支付
- Swift学习 ?和!
- iOS CAGradientLayer 详解
- unity5中AssetBundle相关
- swift如何判断debug模式和release模式
- swift-UI-01
- ViewPager实现一个页面多个Item的显示
- android 65535 多dex文件方案
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- Android USB 在framework相关源码浅析
- Android RecycleView 的findChildViewUnder()方法,十分方便返回指定位置的childView
- Android笔记:SurfaceView与SurfaceHolder对象
- HTML---Android与js交互实例
- Android getResources().getStringArray() variables
- Android 重构学院新闻 App 记录
- iOS端项目注释规范附统一代码块
- 在iOS中使用手指简单画线
- Android之SVN异常