jjzjj

refineButton

全部标签

ios - UISearchBar 和导航 Controller 中的两个按钮

我正在尝试向我的导航Controller添加两个按钮和一个SearchBar,但对齐方式不正确。我几乎尝试了所有方法,例如更改SearchBar、UIButton的大小或更改Y定位,但都没有用。知道如何解决这个问题吗?我正在使用iOS11和Xcode9searchController=UISearchController(searchResultsController:nil)searchController?.searchBar.frame=CGRect(x:0,y:0,width:200,height:30)searchController?.delegate=selfsearch