For the UIApplicationMain function in main(), can anyone tell me the difference between specifying nil for the fourth parameter (the delegate class name) and specifying NSStringFromClass([AppDelegate class]), as I have seen in some codes?
Apple documentation says to specify nil if the app delegate object is situated in the main nib file, so why would one use the NSStringFromClass function for the parameter?
Kind regards.
As you said, when you pass nil to 4th parameters of UIApplicationMain(), it will need
MainWindow.xib. And you can see this apple official sample codes, it has noMainWindow.xib, and it decides its xib layout for iPhone or iPad in runtime.