don
don

Reputation: 4532

Set the subclass for `ECSlidingViewController`

I'm trying to add the ECSlidingViewController in my project, but I'm a novice on iOS and I'm not sure what to do in order to follow the instructions: "Add a UIViewController to your storyboards and set the subclass to ECSlidingViewController"

I've added the UIViewController, but now how do I set the subclass?

Upvotes: 0

Views: 383

Answers (3)

Kreiri
Kreiri

Reputation: 7850

I don't use storyboards, but it sounds like you have to set custom class for this controller in identity inspector.

xcode identity inspector

Upvotes: 1

Paramasivan Samuttiram
Paramasivan Samuttiram

Reputation: 3738

Suppose, you added an UIViewController in StoryBoard named "InitialSlidingViewController". Then in InitialSlidingViewController.h, you should make the interface declaration as follows.

@interface InitialSlidingViewController : ECSlidingViewController

And please check the demo given by "ECSlidingViewController". You will understand it then.

Upvotes: 1

Fogmeister
Fogmeister

Reputation: 77641

I think you've got class and subclass the wrong way around.

What you are creating is a class called ECSlidingViewController that is a subclass of UIVIewController.

In you ECSlidingViewController.h you should have the following...

@interface ECSlidingViewController : UIViewController

This means you are defining a class called ECSlidingViewController and it is a subclass of UIViewController.

Upvotes: 0

Related Questions