1

I am having an issue where the UISearchBar keeps resizing once i click away then goes back, to the appropriate size. I am setting the frame and the bounds like so in the init.

 [_searchBar setFrame:CGRectMake(10, 10, 300, 20)]; [_searchBar setBounds:CGRectMake(10, 10, 300, 20)]; 

I am also doing this for layoutSubviews

- (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; [_searchBar setFrame:CGRectMake(10, 10, 300, 20)]; [_searchBar setBounds:CGRectMake(10, 10, 300, 20)]; } 

Search bar keeps resizing iOS7

1 Answer 1

1

So the real true way to solve this is to use Autolayout with visualConstraints. The searchbox no longer resized once I started to use it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.