我正在使用SplitViewController製作應用程序。SplitViewController打開新的細節視圖,而不是更新現有的(iPhone 6+)
當我使用我的應用程序在iPhone 6 Plus上的橫向模式(即拆分視圖,如在設置應用程序),我得到了(這是正常的):
但我當點擊一個單元格以更新與相應的圖像的細節視圖,我有一些奇怪的: 另一個細節視圖從屏幕左側彈出。它應該用新圖像更新現有的詳細視圖。
你知道爲什麼會發生這種情況,以及如何獲得正確的行爲?也許我在故事板上做錯了什麼?
[編輯]:
這裏是我的prepareForSegue:
MY_Img *img = [self.imgs
objectAtIndex:self.tableView.indexPathForSelectedRow.row];
/*
DetailViewController *detailController = (DetailViewController *)segue.destinationViewController;
[detailController setDetailItem:img];
*/
((AppDelegate*)[UIApplication sharedApplication].delegate).detailItem=img;
我不得不因爲評論部分,使程序崩潰時使用的。我不知道爲什麼。你知道那是錯的嗎?
他們,我回來了img
在DetailController與:
- (void)viewDidLoad {
[super viewDidLoad];
[self setDetailItem: ((AppDelegate*)[UIApplication sharedApplication].delegate).detailItem];
}
這是我的故事板:[screen1](http://imgur.com/voVuZUa) – tourdetour