UISearchBar presented by UISearchController in table header view animates too far when active

后端 未结 15 1033
长情又很酷
长情又很酷 2020-11-29 01:28

I am using UISearchController to present a search bar inside the header view of a tableview:

...
self.searchController.hidesNavigationBarDuringPresentation =         


        
15条回答
  •  执笔经年
    2020-11-29 01:51

    I guess you set UISearchBar frame.original.y = 64

    there are the code

    if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
        [self setEdgesForExtendedLayout:UIRectEdgeNone];
    }
    
    searchBar.frame = CGRectMake(0, 0, 376, 44);
    

    wash can help you

提交回复
热议问题