• 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
Storyboards and Subclassing View Controllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storyboards and Subclassing View Controllers


  • Subject: Storyboards and Subclassing View Controllers
  • From: Dave <email@hidden>
  • Date: Tue, 03 Sep 2013 12:49:33 +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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Next by Date: Xcode cannot run using the selected device
  • Next by thread: Xcode cannot run using the selected device
  • Index(es):
    • Date
    • Thread