@property (weak, nonatomic) IBOutlet UISearchBar *searchBar;

 

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self performSelector:@selector(setCorrectFocus) withObject:NULL afterDelay:0.8];
}

 

-(void) setCorrectFocus {
    [self.searchBar becomeFirstResponder];
}

 

相关文章:

  • 2021-11-24
  • 2022-02-23
  • 2022-01-20
  • 2021-07-16
  • 2022-12-23
  • 2021-11-01
  • 2021-05-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案