我的應用程序在模擬器中運行得很好,但現在我有開發人員許可證,當我嘗試在iPod Touch上運行它時,xcode說GBD: Program received signal: "SIGABRT".
當在ipod touch上運行時,不是模擬器..'程序收到信號SIGABRT'
我該怎麼做才能弄清楚問題在這裏?建築時沒有警告。
編輯:對不起,這是我第一次在設備上運行應用程序,所以請耐心等待。我只注意到Organizer窗口和調試器給我一個設備上發生了什麼的日誌。所以這就是問題所在:
[UIApplication setStatusBarHidden:withAnimation:]: unrecognized selector sent to instance 0x1160e0
而且它指的是代碼爲(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
這是有問題的代碼:
'如果(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;
}
`
運行在調試模式,那麼它至少應該告訴你哪一行是造成SIGABRT 。 – vmpstr 2011-01-27 11:49:37