1.    //输入框背景色

        bar.searchBarStyle = UISearchBarStyleMinimal;

        [bar positionAdjustmentForSearchBarIcon:UISearchBarIconSearch];

        

        // 改变UISearchBar内部输入框样式

        UIView *searchTextField = nil;

        searchTextField = [[[bar.subviews firstObject] subviews] lastObject];

        // 改变输入框背景色

        searchTextField.subviews[0].backgroundColor = [UIColor purpleColor];

    //    searchTextField.layer.cornerRadius = 5.0;

        

相关文章:

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