0

新しい UISearchController を使用したいので、Apple が提供する Obj-C の例をダウンロードしました。

https://developer.apple.com/library/ios/samplecode/TableSearch_UISearchController/Introduction/Intro.html

APLMainTableViewController.m の 123 行目で、テーブルビューの行をタップするとメソッドが実行されます。

123   - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
124        APLProduct *selectedProduct = (tableView == self.tableView) ?
125            self.products[indexPath.row] : self.resultsTableController.filteredProducts[indexPath.row];
126
127        APLDetailViewController *detailViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"APLDetailViewController"];
128        detailViewController.product = selectedProduct; // hand off the current product to the detail view controller
129
130        [self.navigationController pushViewController:detailViewController animated:YES];
131
132        // note: should not be necessary but current iOS 8.0 bug (seed 4) requires it
133        [tableView deselectRowAtIndexPath:indexPath animated:NO];
134    }

130行目の「animated:YES」を「animated:NO」に変更すると、以下の状況でアプリがクラッシュします(iPhone 5s / iOS 8のiOSシミュレーターでテストしました)

  • 検索ボックスに「iPod」などと入力します。
  • 検索結果の最初の行をタップします。iPodの詳細ビューをプッシュします
  • ナビゲーションボタン「<検索」をタップして、検索コントローラーに戻ります
  • テーブル ビューが検索ボックスなしで表示され、アプリが EXC_BAD_ACCESS でクラッシュする

誰かが問題を再現して、なぜこれが起こっているのか手がかりを得ることができますか?

編集: Apple のバグ レポート #18859420

4

1 に答える 1