seach

作者: leaderleader | 来源:发表于2017-11-23 17:00 被阅读0次

  CGRect mainViewBounds = self.navigationController.view.bounds;
    UISearchBar *customSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(CGRectGetWidth(mainViewBounds)/2-((CGRectGetWidth(mainViewBounds)-120)/2), CGRectGetMinY(mainViewBounds)+22, CGRectGetWidth(mainViewBounds)-120, 40)];
    customSearchBar.delegate = self;
    customSearchBar.placeholder = @"搜索菜谱,菜单,食品,达人";
    customSearchBar.showsCancelButton = NO;
    customSearchBar.searchBarStyle = UISearchBarStyleMinimal;
    [self.navigationController.view addSubview: customSearchBar];

相关文章

网友评论

      本文标题:seach

      本文链接:https://www.haomeiwen.com/subject/imozvxtx.html