I am getting the following error on pre-iOS 4.0 builds:
The 'rootViewController' outlet of UIWindow is not available on releases prior to iOS 4.0. Remove the connection and instead programmatically add the view controller's view to the window after the application finishes launching.
How and where do I do this programmatically?
Let’s pretend you have a CoolViewController class.
Inside your CoolAppDelegate.h you need to have something like this:
Then your CoolAppDelegate.m would need the
method with some code like this:
To avoid the error you’ll probably need also to remove the reference to the IBOutlet that points to the rootViewController in your .xib file via Interface Builder.