セグエの現在のテーブルビューを確認するにはどうすればよいですか?UISearchDisplayControllerは独自のテーブルビューをアクティブ化するため、結果を含む別の配列を取得します。
これは私が試したコードですが、機能しません。
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"showDetails"]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
if (self.tableView == [[self searchDisplayController]searchResultsTableView]) {
}
DetailViewController *detailViewController = [segue destinationViewController];
detailViewController.myObject = [mySearchArray objectAtIndex:indexPath.row];
}
}