• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS: multiple view controllers, one nib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS: multiple view controllers, one nib?


  • Subject: Re: iOS: multiple view controllers, one nib?
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Wed, 18 May 2011 15:27:59 -0400

I don't think so but you could always associate a custom Class with each of
the UIViews to tuck most of the UIView specific code away from the view
controller's code.


  Google Voice: (508) 656-0622
  Twitter: eric_dolecki      XBoxLive: edolecki      PSN: eric_dolecki
  http://blog.ericd.net



On Wed, May 18, 2011 at 3:19 PM, Nathan Sims <email@hidden
> wrote:

> Okay, but won't that make for one mega-complex view controller?
>
> On May 18, 2011, at 11:58 AM, Luke the Hiesterman wrote:
>
> > The IB concerns aside, attempting to build your own "more than one view
> controller on the screen" solution is currently fraught with peril, and
> something you'll probably get wrong. The window expects to have a single
> rootViewController to handle rotations and such. You're probably better off
> having a single view controller and each of your quad views should just be
> regular UIViews managed by the one view controller. And, if you did that,
> all your views would naturally be built in the one nib that defines your
> view controller :)
> >
> > Luke
> >
> > On May 18, 2011, at 11:53 AM, Nathan Sims wrote:
> >
> >> I'm writing an iPad app that has its main screen subdivided into 4 equal
> regions, each with a UIView, all defined in one IB nib. I have a dedicated
> view controller class for each view. When I instantiate the view controller
> class for each quadrant's view with -initWithNibName:bundle:, I have to
> specify the same nib name for each:
> >>
> >> quad1VC = [[Quad1ViewController alloc] initWithNibName:@"QuadViewiPad"
> bundle:nil];
> >> quad2VC = [[Quad2ViewController alloc] initWithNibName:@"QuadViewiPad"
> bundle:nil];
> >> quad3VC = [[Quad3ViewController alloc] initWithNibName:@"QuadViewiPad"
> bundle:nil];
> >> quad4VC = [[Quad4ViewController alloc] initWithNibName:@"QuadViewiPad"
> bundle:nil];
> >>
> >> Will this properly connect each quadrant's view with the corresponding
> view controller, or should I have just one view controller for all 4 views?
> >>
> >>
> >> _______________________________________________
> >>
> >> Cocoa-dev mailing list (email@hidden)
> >>
> >> Please do not post admin requests or moderator comments to the list.
> >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >>
> >> Help/Unsubscribe/Update your Subscription:
> >>
> >> This email sent to email@hidden
> >
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iOS: multiple view controllers, one nib?
      • From: Nathan Sims <email@hidden>
References: 
 >iOS: multiple view controllers, one nib? (From: Nathan Sims <email@hidden>)
 >Re: iOS: multiple view controllers, one nib? (From: Luke the Hiesterman <email@hidden>)
 >Re: iOS: multiple view controllers, one nib? (From: Nathan Sims <email@hidden>)

  • Prev by Date: Re: iOS: multiple view controllers, one nib?
  • Next by Date: Re: iOS: multiple view controllers, one nib?
  • Previous by thread: Re: iOS: multiple view controllers, one nib?
  • Next by thread: Re: iOS: multiple view controllers, one nib?
  • Index(es):
    • Date
    • Thread