What are default objects in main xib?
Have created a simple view-based iOS app for iPhone in Xcode called HelloUser with two classes, HelloUserAppDelegate and HelloUserViewController. When I opened up HelloUserViewController.xib in IB, there are only three objects: File's Owner, First Responder and View. No HelloUserAppDelegate object. The compiled app runs OK.
Is this normal, or should there be a delegate object? I thought that delegation was a开发者_运维问答n important design pattern in Cocoa and handled many program loading operations including viewDidLoad for File's Owner, so I'm a bit puzzled that there is no delegate object.
Am using version 3.2.5 of IB.
Thanks in advance.
The App Delegate object by default goes in the MainWindow.xib
file. Your single view controller isn't responsible for the delegation for the entire app; there should be a delegate object, but not in HelloUserViewController.xib
.
精彩评论