1

guys

I am creating application in iOs 5 using storyBoard. StoryBoard is grete thing for easy navigation.But I am facing some problem in coding with iOs 5. this is the problem..

First i create a new project in iOs 5 using wit storyboard and i create three screen in that project. and I also used Navigation bar so it work fine.

In that application in first screen i put one button and same in rest of two screen. now successful in connection in forward direction using segues and in that selecting push.

Now i want to go back from third screen to second screen and second to first screen without using navigation bar.

so i use same for go back as i use to go forward (segues push option) but when i realice that this will add in stack all time but not popping anytime so i use below code for that but still not working .

        fistClass *fc =[[fistClass alloc]init];
        [self.navigationController popToViewController:fc animated:YES];

this is also not working.. pls help Thanks in Advance

Chirag Patel
  • 11,416
  • 3
  • 26
  • 38

1 Answers1

1

There isn't any 'reverse' functionality for segues, you must instead hook into the prepareForSegue function to pass the active ViewController as a delegate to the new ViewController. Then from the new ViewController you pop it from the stack in the delegate when you are done with it, taking you back to the original ViewController without having to create a second instance of it.

It sounds like you may be wanting to use modal segue transitions instead, then you can remove the modal when you are done using the same delegate approach.

RoyalFool
  • 246
  • 2
  • 7
  • First of all thank you for helping.. But still i confused about how to pop ViewController form the stack. It shows only three option in segues push,modal,and custom. There is no option for pop...pls tell me if you know ... – Chirag Patel Dec 02 '11 at 09:11