• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
      • From: Eeyore <email@hidden>
  • Prev by Date: Strange crash on pb running 01.4
  • Next by Date: Re: UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
  • Previous by thread: Strange crash on pb running 01.4
  • Next by thread: Re: UIViewControler "viewDidLoad" (Where to place "[super viewDidLoad]"?)
  • Index(es):
    • Date
    • Thread