views:

118

answers:

1

I have a tableview with a navigation bar at the top. I've added text to the prompt property of the navigation bar. This cuts the top half of the first tableview cell. Is there a way to tell the tableview that the prompt is present or do I need to roll something custom?

+1  A: 

If you are using a navigation bar independent of UINavigationController, then you will need to roll your own custom solution. You may want to consider switching to using UINavigationController.

If you are using UINavigationController with UITableViewController, this should happen automatically for you. Even if you are using UIViewController with a UITableView as the view, this should still happen automatically for you - provided that you set the autoresizingMask of the tableView appropriately.

glorifiedHacker
How would I go about wiring up UINavigationController if it isn't being used now? Are you referring to the one that comes out of the app delegate?
If you are using the navigation-based template in Xcode for your project, then you could use the one in the app delegate. You can also instantiate additional navigation controllers in your app as it makes sense.
glorifiedHacker
Thanks. Do you have any examples of "...instantiate additional navigation controllers..."?
4thSpace
For example, allocating and initializing a navigation controller to present as a modal view controller.
glorifiedHacker