请看我下面的代码: for (UIView *subView in self.searchBar.subviews) if(setBackground:[UIImage imageNamed:@"shopping-Search"]]; }
for (UIView *subview in self.searchBar.subviewsNSClassFromString(@"UISearchBarBackgrou
我正在将searchController添加到navigationItem on action中。在iOS12中,它正确地显示,但在iOS 13中,它没有显示。在调试视图层次结构时,它显示已添加搜索栏,但其高度已设置为零。找不到合适的溶液。searchController.searchBar.delegate = self as UISearchBarDelegate
searchController.<em