0
這是我在AppDelegate
searchDisplayController消息
iMapView = [[iMapViewController alloc] init];
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
CGSize result = [[UIScreen mainScreen] bounds].size;
if(result.height == 568)
{
iMapView.view.frame = CGRectMake(0, 0, 568, 320);
}
}
[viewController.view addSubview:iMapView.view]; // crashing here
我打開NSZombie,發現問題代碼:
[iMapViewController searchDisplayController]: message sent to deallocated instance 0xd81d740
但我還從來沒有使用searchDisplayController
或任何地方的代表。
@interface iMapViewController : UIViewController<UIAlertViewDelegate>
它只發生在iOS 7與非ARC。
你能給我一些建議嗎?
謝謝
檢查xib,你是如何創建iMapViewController的?像從其他類複製粘貼或從文件創建新的 - > newFile – Rajneesh071
我從代碼創建我的看法,我的xib是空的 –
什麼是你的xib名稱,把你的xib名稱放在你的代碼中.. – Rajneesh071