上部に UISearchBar がある UITableView があります。
また、セクション インデックス デリゲートを使用して、右側に ABC...XYZ を表示します。
検索ボックスをクリックすると問題が発生し、キーボードが下から出てきて、セクション インデックスが押しつぶされて A D ...*Z のみが表示されます。検索を閉じてキーボードが消えると、インデックスはこのままになります。スクロールするまで「押しつぶされた」状態。
// animate the searchbar
[UIView beginAnimations:nil context:NULL];
CGRect tempRect = [[self searchBar] frame];
tempRect.size.width = 320-kMarginRight;
[[self searchBar] setFrame:tempRect];
[UIView commitAnimations];
// animate the search index back into view
for (UIView *view in [[self tableView] subviews]) {
if ([view respondsToSelector:@selector(moveIndexIn)]) {
MovableTableViewIndex *index = (MovableTableViewIndex*)view;
[index moveIndexIn];
}
}
// try a whole load of stuff to try and get the section indexes to draw again properly
// none of which work!
[searchBar setText:@""];
[searchBar resignFirstResponder];
letUserSelectRow = YES;
searching = NO;
[[self navigationItem] setRightBarButtonItem:nil];
[[self tableView] setScrollEnabled:YES];
[[self tableView] reloadData];
[[self tableView] flashScrollIndicators];
[[self tableView] sizeToFit];
[[self tableView] zoomScale];
[[self tableView] reloadSectionIndexTitles];
私の質問は、誰かがこの動作を見たことがありますか? RHS でセクション インデックスを再描画する方法はありますか ([[self tableView] reloadData]
トリックは行いません)。
どうもありがとう!