On 18.12.2016 at 17:01 Alex Zavatone wrote: > Allocate them in viewWillAppear: if they are nil. > Just create a conditionalInit method for the purpose of this and put it > inside viewWillAppear.
Reading the documentation again, it now seems to me that views should be created in loadView() instead. The documentation of loadView() says that "You can override this method in order to create your views manually." I've seen lots of code that allocates subviews in viewDidLoad(), though. But I guess that's wrong then? Your suggestion of using viewWillAppear() doesn't make things clearer, alas, because this even adds a third candidate for view allocation... so is there a definite answer as to where to allocate my subviews like UIButton, UILabel, etc. for my UIViewController? -- Best regards, Andreas Falkenhahn mailto:andr...@falkenhahn.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com