I have a simple two-screen app that I built a year ago using the "utility" project template in Xcode 3. This creates an app delegate, a main view and a flipside view. The flipside view has a UINavigationBar at the top with a Done button in the left position.
I just finally upgraded to Xcode 4 with SDK 4.3, and when I build the app now, the Done button doesn't appear, either in the simulator or on my device. But if I create a new project using the Xcode 4 "utility" template, the Done button displays and works correctly. Unfortunately the upgrade removed my SDK 4.2 files, so I can't rebuild for SDK 4.2 and test whether that's what made the difference.
I noticed that the new template sets up the main view differently, using the rootViewController property of the window rather than adding the main view as a subview of the window (more info here). I tried copying this code into my app delegate instead of the addSubview code, but the view didn't display at all, so I must have missed something ... but I would just as soon maintain iOS 3.0 compatibility anyway. I can't find any other difference between the newer "utility" template and my own project based on the old template.
I also tried moving the Done button from the leftButtonItem to the rightButtonItem in Interface Builder, but it still doesn't appear.
MORE INFO:
I tried this on all the versions of the iPhone simulator that are available in my Xcode installation. When building with SDK 4.3, the Done button does not appear with the iOS 4.0-4.3 simulators ... but it does appear with the iOS 5 (beta) simulator.
Next, I wired up IBOutlets to the navigation bar, navigation item and done button in Interface Builder so I could probe them from my code. When I checked them immediately after presenting the flipside view with presentModalViewController, I found that the done button (a UIBarButtonItem) exists, but the navigation item's leftBarButtonItem is null. If I assign the done button to that property, it appears. So somehow that button is getting disconnected from the leftBarButtonItem property when the flipside view is initialized or displayed.
WORKAROUND:
In Interface Builder, if I view the outlets for the Navigation Item, I see that the Done button is linked to its leftBarButtonItem property, but if I view the outlets for the Done button, it has no links. If I link it to the Navigation Item then the button appears! With this setup, the Done button shows the Navigation Item as an outlet, and the Navigation Item shows the Done button as an outlet twice. This is not needed in the new Utility Application template, so I don't know why it's needed here. It seems to be working, but if anyone has an explanation or a better solution I'll reserve my answer points for that.