Todd Davies
Todd Davies

Reputation: 5522

performSegueWithIdentifier isn't working

I have this code running when I tap a button:

[self performSegueWithIdentifier:@"services" sender:self];
NSLog(@"ButtonClicked");

I can see the log message appearing each time I press the button but the segue isn't activating.

In my storyboard file I have a segue named services, that's the segue I want to activate.

Any idea where I'm going wrong?


Edit The button is inside a tab bar controller, will that affect things?

Upvotes: 0

Views: 996

Answers (1)

Nuzhat Zari
Nuzhat Zari

Reputation: 3408

For push you need to embed your source view controller in navigation controller.You can do this as follows:

Select your source view controller, Go to Editor and select Embed In -> Navigation Controller.

Upvotes: 2

Related Questions