我的应用程序在模拟器中运行得很好,但现在我有一个开发者许可证,当我尝试在我的 iPod Touch 上运行它时,xcode 说GBD: Program received signal: "SIGABRT".
我该怎么做才能找出问题所在?它在构建时不会发出警告。
编辑:对不起,这是我第一次在设备上运行应用程序,所以请多多包涵。我刚刚注意到管理器窗口和调试器正在给我记录设备上发生的事情。所以这就是问题所在:
[UIApplication setStatusBarHidden:withAnimation:]: unrecognized selector sent to instance 0x1160e0
它所指的代码在(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
这是它有问题的代码:
`if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
self.view = clockView;
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
return YES;
}
if (interfaceOrientation == UIInterfaceOrientationPortrait) {
self.view = homeView;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
return YES;
}
if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
self.view = homeView; [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
return YES;
}
else {
return YES;
}
`