• 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: Using Storyboard References as objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Storyboard References as objects


  • Subject: Re: Using Storyboard References as objects
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 4 Oct 2017 23:57:46 +0200

On 4. Oct 2017, at 21:09, Rick Aurbach <email@hidden> wrote:
> Ideally, the view would contain an outlet collection which would store its
> associated sub-controllers. And it would be really nice if I could connect
> EITHER a scene from the current storyboard OR a storyboard reference. (Again,
> similarly to what a UITabController can do.)

 One thing I once played with was (ab)using segues for this. IIRC it required:

- a custom segue subclass (to prevent the OS from trying to do a segue itself)
- saving a pointer to the destination view controller in prepareForSegue
- all segues being named after a pattern (I had an IBInspectable in the main
scene's view controller with a "base name" and just appended a number to that)

That at least gave you connecting lines in the Storyboard from the main view
controller to the individual pages.

Then you just take the view controller's view and stick it in your container
view, or remove it and put another one in, as appropriate.

I would be curious if there is a better way for this though.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

_______________________________________________

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

References: 
 >Using Storyboard References as objects (From: Rick Aurbach <email@hidden>)

  • Prev by Date: Using Storyboard References as objects
  • Next by Date: Are Core Data to-many relationships nullable?
  • Previous by thread: Using Storyboard References as objects
  • Next by thread: Are Core Data to-many relationships nullable?
  • Index(es):
    • Date
    • Thread