0

スコープバーで検索バーを作成します。検索バーをクリックすると、その時間のナビゲーション バーが非表示になります。検索バーは、ナビゲーション バーでオーバーライドできます。ナビゲーションバーの下に検索バーを表示したい。どのようにできるのか?

4

1 に答える 1

0

このコードを hrs に変換するだけで動作します

-(void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller{
    NSLog(@"search cancelled");
    _searchBar.frame=CGRectMake(0, 60, 320, 40);
    _arrButtons=nil;
 [_tableFriendList reloadData];


}
-(void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller{
    NSLog(@"hey.......");



    _searchBar.frame=CGRectMake(0, 60, 320, 40);
    //_tableFriendList.frame=CGRectMake(0, 140, 320,400);

    [self.navigationController setNavigationBarHidden: NO animated: YES];

    controller.active = YES;

    [self.view addSubview:controller.searchBar];
    [self.view bringSubviewToFront:controller.searchBar];



}
于 2014-08-05T06:52:29.363 に答える