1

Not sure it is possible but I want to

 [self performSegueWithIdentifier:@"ToAController" sender:SomeOtherViewController];

I may not be doing this even close to right but I would like to do this so my navigation flow works correctly (as in doesnt go back to "ToAController" but instead would go back to "SomeOtherViewController)

EDIT

For clarification of my navigation flow

the letters and numbers are views

1->2

1->A->2

1<-2

B<-2

1<-A

I dont want anything to go back (have a back button to 'A'

BluGeni
  • 3,378
  • 8
  • 36
  • 64
  • Are views or ViewControllers ? – danypata Apr 26 '13 at 13:36
  • views on a storyboard with a viewcontroller associated with them. – BluGeni Apr 26 '13 at 13:46
  • I don't rely understand your navigation process but if you navigate forward from a view controller to another then you can use segues. If you "navigate" from one view to another in the same view controller then you can't use segues. – danypata Apr 26 '13 at 17:38

1 Answers1

3

The sender can be any kind of object, the sender will be received in the - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender method of the view controller that calls the performSegue method.

Another thing I don't know what you try to say by go back but if you want to go back to a view controller that is already added in the navigationController stack then you should use the pop methods of the UINavigationController instead of segues because a segue will perform only push/modal/custom operations which will add the destinationController to the UINavigation controller stack.

EDIT

Form iOS 6 there is a new type of segue called unwind that can be linked to the green Exit icon of a View Controller in storyboard. And because I don't want to steal votes from other beloved SO members here is a good thread regarding unwind segues What are Unwind segues for and how do you use them?

Community
  • 1
  • 1
danypata
  • 9,895
  • 1
  • 31
  • 44