this is a quite general question but i want to understand this please –
I usually build my apps without using IB.
- what are, the cons and pros of using IB vs. creating interface programmatically?
- what oppressions/code fits the init method and what is for the loadView method?
- is there any difference between loadView an ViewDidLoad or do i need to use only one of them?
thanks
shani
initand its namesakes should only be used for setting sane defaults of ivars.loadViewis used for setting up the view hierarchy, starting with the backing view of your view controller. I.e., a special note; don’t reference theself.viewproperty unless you are setting it, this will cause an infinite loop. Just a friendly protip.loadViewis used to set up your backing view (it must be created by you if you override it), andviewDidLoadis called after the view has been loaded (afterloadViewis called). You do the appropriate items in the appropriate spots.