iPhone dev memoramda #2

View controllers can load a view from a nib with -(id) initWithNibName:bundle: OR -(void) loadView . They CAN’T be used at the same time. Setup happening just once should occur in -(void) loadDidLoad but beware: bounds data are not yet set. Otherwise -(void) viewWillAppear should be’ used.

Read more

iPhone dev memoranda #1

IBOutlet views should be declared as retained properties, stnthesized and released in viewDidUnload and dealloc methods of their controllers by setting their values to nil. @interface MyController : NSObject { MyView *myView; } @property (retain) IBOutlet MyView *myView; @end @implementation MyController @synthesize myView; -(void) releaseViews { self.myView=nil; } -(void) viewDidUnload { [self releaseViews]; } -(void) […]

Read more
Go top