[UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance 0x48
来源:互联网 发布:软件安全性测试文档 编辑:程序博客网 时间:2024/05/16 00:36
问题: 在真机测试项目的时候只在iphone4s的测试机上crash, 进入后台就crash, 进入后台的两个方法体不做任何操作也crash
解决办法: 问题出在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];}
将这个方法注释掉, 因为没用到这个分类所以不会有什么影响
0 0
- [UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance 0x48
- [UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance
- message sent to deallocated instance 0x100202dc0
- message sent to deallocated instance 0x154eec600
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- -[UIImage _isCached]: message sent to deallocated instance 0xde8ce90
- [CALayer release]: message sent to deallocated instance 0xe250df0
- 关于crtmpserver编译运行及源码修改
- 直接使用POST方法登录网站
- https总结
- 新网站是否应该使用 Drupal 8?
- Swift学习 ?和!
- [UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance 0x48
- iMindMap导图背景该如何进行设置
- 一行代码不用敲,15分钟轻松搞定GIS开发,GISer福音,教你如何从下载到使用webappbuilder创建第一个应用程
- Android第三方支付--微信支付
- 神经网络-反向传播算法
- oracle共享池
- linux虚拟机中修改MAC
- [实例]canvas之炫彩时钟
- node.js 学习