まず、NSIndexPath * selectedIndexPathを宣言し、そのプロパティを作成します。現在tableViewDelegateにあります:
- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition)scrollPosition
{
selectedIndexPath = indexPath;
}
tableViewでセルのIndexPathを選択しました。ナビゲーターバーの戻るボタンを押すと、ViewControllersviewWillApperが呼び出されます
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if(selectedIndexPath)
{
//if you have custom cell then you will get custom cell which was selected just use custom cell object in place of UITableViewCell
UITableViewCell *cell = (UITableViewCell*)[YourtableView cellForRowAtIndexPath:selectedIndexPath];
//You have cell reference which was selected when one view controller was pushed in navigation controller.
// you can change image or label text which are present in your cell
// cell.ImageView or cell.labelText anything
}
}
お役に立てば幸いです。