Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-05-2009, 03:26 PM   #5 (permalink)
mk12
Registered Member
 
Join Date: Jul 2009
Posts: 15
Default

don't use initWithNibName if the view controller is entirely coded programmatically, even if it works, that's very confusing. Get rid of your overriden initWithNibName method, and when you initialized call "init". If you want custom initialization, override init in your view controller. Note: in a view controller, override "init": for initialization that has to do with the view controller, not the view. For example, setting a BOOL ivar to YES. If you don't need to do anything in here, don't override it. "loadview": If you don't override this, all it will do is set self.view to a plain empty instance of UIView. Only override if you want to do something else, such as make self.view an instance of a custom UIView subclass, or set its backgroundcolor to red. If you override "loadview", you MUST set the self.view ivar. "viewDidLoad": Here you create everything that goes in the view, for example create a button and a label, and addSubview them to self.view.
mk12 is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,267
Threads: 39,062
Posts: 171,292
Top Poster: smasher (2,575)
Welcome to our newest member, nvrendingsoft
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:52 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.