0

Hi i have little confusion. i am using below method in my application.how should I call this method from ant other point where i need in same view controller.

- (void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender

Thanks

  • See: http://stackoverflow.com/questions/23824050/how-to-navigation-using-segue/23824094#23824094 – Ricky Jun 16 '14 at 08:49

2 Answers2

0

Use this method wherever you want to segue Controllers.

[self performSegueWithIdentifier:@"yourSegueIdentifierName" sender:nil];

This method will automatically trigger the prepareForSegue method as soon as the above statement is encountered.

Matt Murdock
  • 3,203
  • 6
  • 20
  • 34
0

You should never call prepareForSegue in code. It is called for you.

The method you are looking for is...

[self performSegueWithIdentifier:@"someSegueIdentifier" sender:nil];

This will then be routed into the prepare for segue method.

Fogmeister
  • 73,141
  • 39
  • 203
  • 288
  • you are also right... http://stackoverflow.com/questions/24217550/replace-application-starting-view-controller-in-ios can u give me solution for this? – user3652356 Jun 16 '14 at 09:58