Reputation: 5208
I have been using UISearchbar in my project with no problem at all in iOS7 now when i build my project using Xcode 6.0.1 and run on iOS8 the width of UISearchBar automatically changes for example
I am not using auto layout, when i enable auto layout the issue is solved but whatever i do to change the frame in code nothing happens.
I don't want to enable autoLayout, how can i solve this problem?
Upvotes: 1
Views: 1158
Reputation: 5208
I solved this problem by using following code
-(void)viewWillLayoutSubviews
{
searchbar.frame = CGRectMake(365, 0, 274, 44);
}
Hope this help someone
Upvotes: 4