I'm using AutoLayout and have a UISearchBar, UITableView ad a UIView. Initially the layout is correct and positioned according to my AutoLayout rules.
When the UISearchBar has focus it expands abruptly in height covering my top UIView.
No matter how I layout my autolayout constraints this happens.
If I don't set
self.searchBar.translatesAutoresizingMaskIntoConstraints = NO;
and set a frame instead then it behaves as normal.
self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 100.0f, 45.0f)];
But i'm reliant upon AutoLayout in this app for iOS7. Is this a genuine bug? Or most probably i've missed something!
Had the same problem. Try this in viewDidLoad
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With