9
UISearchbar
을 건드리지 않고 메서드 호출에서 UISearchbar
에 대한 키보드를 표시 할 수 있습니까?UISearchbar를 건드리지 않고 키보드를 표시하는 방법은 무엇입니까?
UISearchbar
을 건드리지 않고 메서드 호출에서 UISearchbar
에 대한 키보드를 표시 할 수 있습니까?UISearchbar를 건드리지 않고 키보드를 표시하는 방법은 무엇입니까?
[mySearchBar becomeFirstResponder];
작업 솔루션 : -
는 사용하지 마십시오 [self.searchController setActive : YES] becomeFirstResponder 전에.- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
dispatch_async(dispatch_get_global_queue(0, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
//[self.searchController setActive:YES];
[self.searchController.searchBar becomeFirstResponder];
});
});
}