それをどうして解決すればいいのか不思議です。この検索バーはこのように見えます。 searchDisplayControllerWillEnd検索バーのサイズが変更されていません
クリックされたものが上に移動し、検索バーの高さは0,0,320になります。キャンセル]をクリック
、それは、バック33,55,270に検索バーの高さを変更する必要があります。しかし、それはない
searchDisplayControllerDidEndSearchが戻ってサイズを変更していきます、しかし、ユーザーが変更を見ることができた1秒の遅れがあります。任意の身体がなぜsearchDisplayControllerWillEndSearchでアニメーションのサイズを変更できないのですか?
コメントとフィードバックに感謝します。
- (void) searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller
{
[UIView animateWithDuration:.1
animations:^{
controller.searchResultsTableView.frame = frogTableView.frame;
searchDisplayController.searchResultsTableView.frame = frogTableView.frame;
searchDisplayController.searchBar.frame = CGRectMake(32,
55,
270,
searchDisplayController.searchBar.frame.size.height);
searchBar.frame = CGRectMake(32,
55,
270,
searchBar.frame.size.height);
frogTableView.frame = CGRectMake(frogTableView.frame.origin.x,
121,
frogTableView.frame.size.width,
frogTableView.frame.size.height);
notePad.frame = CGRectMake(notePad.frame.origin.x,
45,
notePad.frame.size.width,
notePad.frame.size.height);
searchDisplayController.searchResultsTableView.frame = frogTableView.frame;
}
completion:^(BOOL finished){
//whatever else you may need to do
}];
}
Ooohhh、なぜブロック?一般的にGCDや複雑なネットワーキングのようなものにしか使われません。あなたはそれを酷使しています:P –
だから私はGalaxas0をどうすればいいですか? – Desmond
可能性があります - http://stackoverflow.com/questions/556814/changing-the-size-of-theisearchbar-textfield – rishi