Re: Subclassing a View Controller in a Storyboard
Re: Subclassing a View Controller in a Storyboard
- Subject: Re: Subclassing a View Controller in a Storyboard
- From: Dave <email@hidden>
- Date: Wed, 04 Sep 2013 21:08:37 +0100
> You could do that, but OP is using storyboards. In that case, the proper way to pass that info is in -prepareForSegue:.
I took a look at prepareForSegue, but I'm not sure how it would help here?
In the Storyboard I have a VC with a name of "LTWMusicViewController", there is NOT a "LTWRockMusicViewController".
when LTWMusicViewController - viewDidLoad gets called it sets the category to ALL.
when LTWRockMusicViewController - viewDidLoad gets calls [super viewDidLoad] (in LTWMusicViewController), THEN set the Category to Rock.
In LTWRockMusicViewController, I want all the functionality and Views etc. of LTWMusicViewController BUT I want to set the to Rock.
Since LTWRockMusicViewController is not in the Story board, I can't instantiate it and so prepareForSegue won't be called.
I could define prepareForSegue in LTWMusicViewController, BUT I don't want to do anything special with this VC, I want to do it to LTWRockMusicViewController.
Thanks for your help.
All the Best
Dave
_______________________________________________
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