[MonoTouch] Sharing UIToolbar between ViewControllers?

Jeff Stedfast jeff at xamarin.com
Wed Mar 21 18:13:01 UTC 2012


Hi Chris,

You could always write a new UIToolbar subclass that adds all of the right
items to itself. That's probably how I would do it.

Hope that helps,

Jeff

On Wed, Mar 21, 2012 at 1:52 PM, Chris House <chrishouse at proag.com> wrote:

> I’m currently developing an iPad  app with MT.  The general UI layout
> consists of four screens, each with a UITabBarController at the bottom of
> the screen.  The UITabBarController will have four buttons each pointing to
> a different view controller.  At the top of each of these four view
> controllers will be a UIToolbar.  This UIToolbar will be essentially the
> same on all four view controllers.  It will have two UISegmentedControls
> and a label that will need to change slightly depending on the view
> controller currently being displayed.****
>
> ** **
>
> My question is this:  Considering that there is so much common behavior
> and appearance to my UIToolbar, what is the best way to share this across
> my four view controllers?  Is the best option to just create some function
> that constructs my UIToolbar and its associated controls and then add that
> to the current view controller as a subview at runtime or is there a better
> approach?****
>
> ** **
>
> Thanks!****
>
> ** **
>
> Chris****
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monotouch/attachments/20120321/bc6b3b44/attachment.html>


More information about the MonoTouch mailing list