2013-09-30 33 views
0

我的應用程序使用兩個不同的視圖控制器存儲用戶配置。第一個僅在創建新配置時顯示,這是配置的名稱。二是配置本身,這通常是由accessoryButtonTappedForRowWithIndexPathiOS在解散視圖控制器後執行segue

提出了是否有可能,當他們解僱他們設置的名稱的第一個視圖控制器:

[self.delegate addViewerViewController:self didFinishAddingItem:viewer]; 

那它顯示配置視圖控制器直線距離無需點擊?通常這被稱爲

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath 
{ 
    nameAtAccessoryIndex = [viewerKeys objectAtIndex:indexPath.row]; 
    [self performSegueWithIdentifier:@"EditSettings" sender:indexPath]; 
} 
+0

你有沒有嘗試過在第一個ViewController的' - (void)viewDidDisappear:(BOOL)animated'中調用它? – dan

+0

雖然它不需要indexPath嗎?或者它不知道要加載哪個配置 –

回答

0

它看起來像你不正確地使用performSegueWithIdentifier:。您的發件人應該是self

prepareForSegue:添加到您的視圖控制器,並在其中設置viewersegue.destinationViewController

相關問題