Background: I have a View controller which has a header view(UIView)
, a footer view (UIView)
, table view and a search bar(UISearchBar)
above it . This is made using xib. I need to present this inside a popover. This is done and everything is working fine.
Problem: The problem begins when i launch the key pad for search. The key board shrinks the size of the popover. Because of this i cannot see the bottom cells of my table. I have no idea why. My guess is its not getting resized properly.
What i tried: I tried to reduce the height of the table using keyboard notifications. It works but i want a more elegant solution and also want to what i am doing wrong ?
This is specific to iOS 6.0. It works fine with 7.0
EDIT On further testing i found out that my solution is not working :(
Any help is highly appreciated. Thanks
View controller xib schema:
Make sure you set the desired size of your view controller within the popover. This is done in two ways: You can override the method
contentSizeForViewInPopover
on the view controller that you are displaying within a popover, like so:And/or you can set a property on the popover, like so:
Notice the comments.