Hi Chris, On Wed, Mar 21, 2012 at 2:21 PM, Chris House <[email protected]> wrote:
> Thanks Jeff. I actually came to that same conclusion shortly after I sent > my email, but I’m glad to have some validation of my approach as I’m still > quite new to MT. So far it seems to be working just like I’d hoped it > would. I do have two follow up questions on the actual implementation:*** > * > > ** ** > > First – right now in my UIToolbar subclass, I have a method that creates > the necessary UISegmentedControls and UIBarButtonItems then adds them to > the toolbar (this.SetItems(…)). I’m calling this method from my UIToolbar > subclass’ constructor. Is that the right place to do this kind of setup? > As good as any, I suppose. You could also do it in the ViewDidLoad() method if you prefer to only keep the views around when they are needed. For something like this, it probably doesn't matter. > **** > > ** ** > > Second – Since my UISegmentedControls will need to respond to events, do > these need to be class level fields or can I just declare/instantiate them > in the method described above? > I would probably declare them as class level fields. Hope that helps, Jeff
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
