Adding UIControl subclass to loadView crash iphone app

I am new to iPhone and am experimenting with the platform. I have a root view controller that loads it from a tip. I accidentally uncommented a method loadView

in this class and now the application will crash - is it because if the view controller is initiated from nib then you can never implement loadView

?

0


a source to share


1 answer


If you are creating your view using a nib file, you must override viewDidLoad and add your subroutines there. You just want to override loadView when you arbitrarily create all your views.

Here's a link to the UIViewController documentation, which has a slightly longer explanation under the items for loadView and viewDidLoad.



I was confused by the same question at first ...

+3


a source







All Articles