我有一個表格單元格中有segue的故事板。我想設置了一些數據的一些屬性當行被選中,所以我做到以下幾點:故事板segue在UITableView的didSelectRow之前被調用
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[[ProperyManager sharedPropertyManager]setSelectedRow:[verseIds objectAtIndex:indexPath.row]];
[[ProperyManager sharedPropertyManager]setID:[poemIDs objectAtIndex:indexPath.row]];
[[ProperyManager sharedPropertyManager]setRowToReturn:[NSString stringWithFormat:@"%i",indexPath.row]];
}
的問題是,目標視圖控制器的視圖控制器生命週期方法(viewWillAppear中等等)之前被調用上面的didSelectRow方法,因爲segue在委託方法執行之前推送視圖。
我該如何解決這個問題?
謝謝,讓我的一天 –