The point is, if the only difference between an LTWMusicViewController and an 
LTWRockMusicViewController is that the latter defaults to the “Rock” category, 
then you don’t actually *need* the LTWRockMusicViewController subclass. You 
just need to ensure that when you want an LTWMusicViewController created with 
the Rock category, that you ensure it is set as such.

So in -prepareForSegue, you get the instance of LTWMusicViewController that is 
about to be transitioned to, set its category to Rock, and your done. No need 
for subclassing at all.

On Sep 4, 2013, at 1:08 PM, Dave <d...@looktowindward.com> wrote:

>> 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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
> 
> This email sent to david.dun...@apple.com

--
David Duncan


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to