Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-13-2008, 03:07 PM   #2 (permalink)
rames44
Mobile Geek
 
Join Date: Aug 2008
Location: Florida, USA
Posts: 365
Send a message via AIM to rames44 Send a message via Yahoo to rames44
Default

It strikes me that this is a bad place to add your UISegmentedControl, since viewWillAppear: can get called multiple times for a particular UIViewController - for example if your view is covered and then exposed again, it will be called again.

Normally, I would think that you would do this in your "initWithNibName:bundle:" routine after having called the "super" version thereof.

That being said, it strikes me as a slightly odd user interface to have a UISegmentedControl in the nav bar's right button. But, then, who am I to say what's "good" and what's "bad".

Another nit - you've called "alloc" to create both the UISegmentedControl and the UIBarButtonItem, but haven't made a corresponding call to "release" in either case.
rames44 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,782
Threads: 89,204
Posts: 380,602
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jameswilliards
Powered by vBadvanced CMPS v3.1.0

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