我在我的應用程序中使用MGSplitViewController。 從一個視圖控制器,在一個按鈕點擊,我已經導航控制到這兩個方法,其中表格將打開與MGSplitViewController的背景(顯示主視圖和詳細視圖。)通過MGSplitViewController呈現表單時的隨機崩潰
這些方法運作良好,我得到所需結果,但是經過許多操作之後,應用程序在沒有打印任何日誌的情況下崩潰了。任何人都可以提出一些解決方案嗎
-(void)launchSplitViewWithFormSheet :(MGSplitViewController *)mGSplitViewController
{
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:mGSplitViewController];
[self.baseNavigationController setViewControllers:[NSArray arrayWithObject:navController]];
[self openFormSheet:mGSplitViewController];
}
-(void)openFormSheet:(MGSplitViewController *)mGSplitViewController
{
DetailViewController *detailViewController = (DetailViewController *)[mGSplitViewController.viewControllers objectAtIndex:0];
MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil];
UINavigationController *baseNavController = [[UINavigationController alloc]initWithRootViewController:masterViewController];
detailViewController.masterViewController = detailViewController;
baseNavController.modalPresentationStyle = UIModalPresentationFormSheet;
[mGSplitViewController presentModalViewController:baseNavController animated:YES];
}
這是有或沒有ARC? – Jim 2012-08-16 11:26:46
它沒有ARC – parilogic 2012-08-16 12:38:31