Update!
I finally figured out how to set the title in a modal view with navigation bar. It seems pretty kludgy and arcane to me, but it works:
1. Define an IBOutlet for a UINavigationItem in your view controller code.
2. In IB connect the title item from the navigation bar (not the bar itself, but the embedded title) to the outlet defined in #1.
3. In the viewDidAppear method set the title property of the UINavigationItem.
Note! It has to be done in the
viewDidAppear method,
not the viewWillAppear method, as the navigation bar is obviously not initialized until after the viewWillAppear method has been called. If you put it in the viewWillAppear method then it will show on the second and subsequent appearance of the view, but not on the first.
A similar procedure is necessary to programmatically set the UIBarButtonItem objects in the navigation bar, except that the outlet needs to reference the entire navigation bar, not the bar's title.
This seems like a bug in the UI SDK code. It does not work by just setting the title of the navigationItem property of the view, even if you set it in the viewDidAppear method.