Reputation: 1622
I am unable to get the UISearchBar to display fine on iOS7. I cannot use AutoLayout as I must support the app for older versions of iOS prior to 6 also. I tried setting the container view's frame if the iOS is of version 7 and above but it does not work. I also tried topLayOutGuide length and other tips mentioned in other SO posts but I could not succeed. (EDIT:- I am using STORYBOARD)
The only thing I currently have in my code is
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
Can someone please help me with this issue?
Upvotes: 0
Views: 68
Reputation: 6079
I try to suggest a change to do in the storyboard
:
tap on your viewController
and on attributes inspector
uncheck Under top bars
if this not work try this code:
-(void)viewWillAppear:(BOOL)animated {
NSString *ver = [[UIDevice currentDevice] systemVersion];
int ver_int = [ver intValue];
if (ver_int < 7) {
}
else {
self.navigationController.navigationBar.translucent = NO;
}
}
Upvotes: 1