• 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
Subclassing a View Controller in a Storyboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subclassing a View Controller in a Storyboard


  • Subject: Subclassing a View Controller in a Storyboard
  • From: Dave <email@hidden>
  • Date: Wed, 04 Sep 2013 10:23:04 +0100

Hi All,

If I am using a Storyboard that contains a view controller, LTWMusicViewController that I'd like to sub-class like so:

LTWRockMusicViewController : LTWMusicViewController

Then in the viewDidLoad method, do:

-(void) viewDidLoad
{
[super viewDidLoad];

self.pMusicCategory = kRockMusicCategory;
}


----------------------------

At present LTWMusicViewController is loaded using:

myViewController = [self.storyboard instantiateViewController:@"LTWMusicViewController"];


I want LTWRockMusicViewController to use same NIB etc, as LTWMusicViewController, but just pre-set the self.pMusicCategory property to Rock.

How do I do this using a Storyboard? I don't really want to copy all the controls for LTWMusicViewController into LTWMusicViewController.

Thanks in advance,
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


  • Prev by Date: Re: Threadsafe copy of objective c object
  • Next by Date: Re: Core Data Initialization
  • Previous by thread: Re: NSPanel doesn't reposition correctly after screen resize
  • Next by thread: Re: Subclassing a View Controller in a Storyboard
  • Index(es):
    • Date
    • Thread