tableviewcell 侧滑删除 点击返回按钮 程序崩溃 [ tableView:canEditRowAtIndexPath:]:message sent to deallocated insta
2015-05-12 22:48
651 查看
IOS6中 tableViewCell侧滑,处于编辑状态 点击返回上个页面 没有任何问题
但是在IOS7以后的系统中 这样操作会出现message sent to deallocated instance 0x12e23ac50错误
原因是下面这个方法的使用导致的
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
解决办法
1,
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
如果此方法没有用到,删掉就可以了
2,如果一定要用到此方法,在
- (void)viewWillDisappear:(BOOL)animated方法中添加
_tableView.editing = NO;这句代码就可以解决了
但是在IOS7以后的系统中 这样操作会出现message sent to deallocated instance 0x12e23ac50错误
原因是下面这个方法的使用导致的
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
解决办法
1,
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
如果此方法没有用到,删掉就可以了
2,如果一定要用到此方法,在
- (void)viewWillDisappear:(BOOL)animated方法中添加
_tableView.editing = NO;这句代码就可以解决了
相关文章推荐
- tableView滑动删除返回错误 [ tableView:canEditRowAtIndexPath:]:message sent to deallocated instance
- tableView滑动删除返回错误 [ tableView:canEditRowAtIndexPath:]:message sent to deallocated instance 0x10930c1
- *** -[AlwayedDownVC tableView:canEditRowAtIndexPath:]: message sent to deallocated instance 0x17a971
- [numberOfSectionsInTableView:]: message sent to deallocated instance 0x17c8bc00
- tableView滑动出现删除按钮,不点击就返回崩溃
- [**ViewController respondsToSelector:]: message sent to deallocated instance崩溃问题解决方法
- [****ViewController scrollViewDidScroll:]: message sent to deallocated instance 0x12d6c22f0
- iOS开发 [SY_InformationController respondsToSelector:]: message sent to deallocated崩溃信息
- message sent to deallocated instance 崩溃 解决方案
- FMDB崩溃*** -[FMResultSet retain]: message sent to deallocated instance 0x604003a49e70
- [UIActivityIndicatorView _applicationDidEnterBackground:]: message sent to deallocated instance 0x48
- UITextField textInputView: message sent to deallocated instance
- ViewController respondsToSelector:]: message sent to deallocated instance
- iOS [xxxxController respondsToSelector:]: message sent to deallocated instance 0x1310293e0崩溃问题
- 崩溃 [XXXX respondsToSelector:]: message sent to deallocated instance 0x7fe2d3e404f0
- iOS [MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance
- iOS 崩溃内存泄漏-[STGiftOperationManager retain]: message sent to deallocated instance 0x60400092a8c0
- [xxx respondsToSelector:]message sent to deallocated instance和空地址崩溃 空指针
- ios -[MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc0f6f2
- [****ViewController respondsToSelector:]: message sent to deallocated instance