I am facing a weird scenario, I have used a search bar in my application and tied it up with a table view as is seen in the below image!
But when ever I try to search anything the search bar slides up and gets hidden by navigation bar, I have used search bar a number of times and never seen me thing like this below is its screen shot !
I can't remove the navigation bar since I need it, but I just can't figure out why or how it can be happening,
One point to note is that the search bar and it's controller are working perfectly when tried to search, only thing is it's getting hidden behind the navigation bar,
Any help on this would be appreciated, as I just can't figure out its reason.
Try this:
Set the navigation bar's translucent property to NO:
self.navigationController.navigationBar.translucent = NO;
This line will fix the view from being framed underneath the navigation bar and status bar.
If you have to show and hide the navigation bar, then use this code in viewDidLoad
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone; // iOS 7 specific
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