Iphone 触摸状态栏时崩溃

Iphone 触摸状态栏时崩溃,iphone,ios,crash,uistatusbar,Iphone,Ios,Crash,Uistatusbar,我的应用程序是基于导航的。上面写着伊斯兰教徒 refreshstopButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshTapped)]; 我发现当我点击状态栏时,“refreshTapped”被触发(不是由我的大手指引起的,通过使用模拟器和鼠标点击也可以重现)。Stacktrace显示它

我的应用程序是基于导航的。上面写着伊斯兰教徒

refreshstopButton = [[UIBarButtonItem alloc] 
initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self 
action:@selector(refreshTapped)]; 
我发现当我点击状态栏时,“refreshTapped”被触发(不是由我的大手指引起的,通过使用模拟器和鼠标点击也可以重现)。Stacktrace显示它来自

-[UIApplication sendAction:to:from:forEvent:];
我不明白为什么。有时,我的应用程序崩溃,与stacktrace非常相似

注: 我还尝试了UICatalog示例,我看到了相同的事情:单击状态栏触发“返回”UIBarButtonItem操作(使用模拟器)

玩了一会儿模拟器后,我意识到敏感区域比按钮边框大得多。我想也许这就是可可触控的工作方式

然而,碰撞问题仍未解决。根据stacktrace,它似乎是由触摸状态栏触发的

以下是崩溃日志:

0   libobjc.A.dylib                 0x32da1cb2 objc_msgSend + 42
1   UIKit                           0x324c3a30 -[UIControl(Deprecated) sendAction:toTarget:forEvent:] + 28
2   UIKit                           0x324c3990 -[UIControl(Internal) _sendActionsForEventMask:withEvent:] + 352
3   UIKit                           0x32563764 -[UIControl mouseUp:] + 376
4   UIKit                           0x3254d314 -[UIView(Internal) _mouseUp:] + 32
5   UIKit                           0x3254a480 -[UIWindow _handleMouseUp:] + 108
6   UIKit                           0x3254a8da -[UIWindow _statusBarMouseUp:] + 122
7   UIKit                           0x32680980 -[UIStatusBar touchesEnded:withEvent:] + 320
8   CoreFoundation                  0x328d056a -[NSObject(NSObject) performSelector:withObject:withObject:] + 18
9   UIKit                           0x32406094 forwardMethod2 + 60
10  UIKit                           0x324a04ca -[UIResponder touchesEnded:withEvent:] + 2
11  UIKit                           0x32404bee -[UIWindow _sendTouchesForEvent:] + 362
12  UIKit                           0x32404568 -[UIWindow sendEvent:] + 256
13  UIKit                           0x323ed30c -[UIApplication sendEvent:] + 292
14  UIKit                           0x323ecc4c _UIApplicationHandleEvent + 5084

我还尝试跟踪状态栏上的事件。但正如其他一些人指出的那样,它在iOS 4.x中不再有效了。请检查并替换这一行以避免崩溃问题

@selector(刷新点击:)
而不是
@selector(刷新点击)


(注意第一个备选方案中额外的

发布refreshTapped的声明代码。
-(iAction)refreshTapped{if(self.isRefresh==YES){[self-requestNetworkActivityIndicator];[self-performLoading];[self-releaseNetworkActivityIndicator];}否则{[self.webview stopLoading];[self-releaseNetworkActivityIndicator];}}
是否尝试注释
refreshttapped
方法中的所有代码行?我没有检查,但设置了方法的返回类型(void)refreshTapped,而不是iAction。+Nekto,我想它不会起任何作用。我怀疑它与我看到的崩溃有关。他不需要编写
,因为他的方法没有收到任何参数。