UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
- Subject: UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
- From: jeremy <email@hidden>
- Date: Tue, 09 Mar 2010 11:08:11 -0500
When a XCode template contains a method that calls its superclass method (of the same name), how do I know whether the superclass call precedes or follows my custom code. Is there some documentation that tells where to place the call to [super methodName]?
Take for example, UIViewController and its method "viewDidLoad".
The template (for an iPhone application using the "view-based Application" template) includes the following method:
---
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
---
But neither the template's comment nor the documentation for "viewDidLoad" mention whether "[super viewDidLoad]" comes before or after my custom code.
Where do insert my custom code: before or after "[super viewDidLoad]"?
UIViewController viewDidLoad documentation
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW25
Using XCode 3.2.1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden