我有一个UIViewController:DFUserChatViewController女巫是DFChatViewController的继承形式,在DFChatViewController的init方法中我有一个带有方法backAction的navigationItem.leftBarButtonItem
- (id)init
{
self = [super init];
if (self)
{
...........
self.navigationItem.leftBarButtonItem = [[[DFBarBackButtonItem alloc] initWithTarget:self action:@selector(backAction:) image:nil] autorelease];
}
return self;
}
在DFUserChatViewController中的我覆盖方法backAction:
#pragma mark - action
-(void)backAction:(id)sender
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
.............any other thing
.............
{
[self.navigationController popViewControllerAnimated:YES];
}
}
我使用crashlytics进行崩溃报告,今天我收到了崩溃
0
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x4000000c
raw
0
libobjc.A.dylib objc_msgSend + 5
1
DFmyPro
DFUserChatViewController.m line 349
-[DFUserChatViewController backAction:]
2
UIKit -[UIApplication sendAction:to:from:forEvent:] + 90
3
UIKit -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
4
UIKit -[UIControl sendAction:to:forEvent:] + 44
5
UIKit -[UIControl _sendActionsForEvents:withEvent:] + 374
6
UIKit -[UIControl touchesEnded:withEvent:] + 590
7
UIKit -[UIWindow _sendTouchesForEvent:] + 528
8
UIKit -[UIWindow sendEvent:] + 832
9
DFmyPro
DFShakeWindow.m line 46
-[DFShakeWindow sendEvent:]
10
UIKit -[UIApplication sendEvent:] + 196
11
UIKit _UIApplicationHandleEventQueue + 7098
12 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
13
CoreFoundation __CFRunLoopDoSources0 + 206
14
CoreFoundation __CFRunLoopRun + 622
15
CoreFoundation CFRunLoopRunSpecific + 522
16
CoreFoundation CFRunLoopRunInMode + 106
17
GraphicsServices GSEventRunModal + 138
18 UIKit UIApplicationMain + 1136
19
DFmyPro
main.m line 15
主
我一次又一次地运行我的应用程序,并没有发现崩溃,我怎么知道哪里出错了