开发者

Changing the size of UISearchBar

开发者 https://www.devze.com 2022-12-24 14:10 出处:网络
Not being able to find the answer, and also not being able to do what I want with t开发者_高级运维his:

Not being able to find the answer, and also not being able to do what I want with t开发者_高级运维his:

CGSize searchBarSize = self.searchDisplayController.searchBar.frame.size;
searchBarSize.width = <someNumber>;

I ask: is there a way to change the width of a UISearchBar?

Thanks a lot.


Just as a reference to anybody with the same problem:

I created a view with the searchBar image (resized) as a button's background (the button was added as a subview to my view).

Then I defined the view containing the button as the view for the table's header in my UiTableViewController.

The button, when pressed, behaves like the searchBar.

I was able to solve my problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消