Re: Using Storyboard References as objects
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