cocoa objective-c segue inits child view controller on every load
===

I encountered a problem while pushing between view controllers with segue:
To simplify, let's say i have a Parent view controller, and a Child view controller.
If user selects an item in a Parent controller it gets immideately presented in a Child view controller. When debugging the prepareForSegue:sender: method i found out that  segue.destinationViewController is a different `UIViewController *` every time i perform the segue (so, if i switch to Child view controller, then back to Parent with        `[self.navigationController popViewControllerAnimated:YES]`, and then to a Child controller again, *it's a new Controller on every segue*).

Nevertheless, if I don't use segue but a simple    `[self.navigationController pushViewController: {Child Controller} animated:]` it's possible to save the first occurence of Child Controller as    `static` so i use the same Child Controller on every user input.

I tried subclassing UIStoryboardSegue class to make it work like this:

    static UIViewController *uniDestController = nil;
    - (id) initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)destination {
        if (nil == uniDestController)
            uniDestController = destination;
        self = [super initWithIdentifier:identifier source:source destination:uniDestController];
        return self;
    }
so the destination controller is saved as `static` inside the segue class, and it works (in the `prepareForSegue:(UIStoryboardSegue *)segue sender:` method the `segue.destinationViewController` value doesn't change over time, but the Child Controller (`segue.destinationViewController`) gets an `initWithCoder:` message anyways.

Apple's manual on [creating custom segues][1] says:

"1. The destination controller is created and initialized."

But is there a way to use the same Child Controller on every segue? Or did i get something wrong and it's OK to instantinate a new controller every time? (Apple doesn't say anything to disprove this in their manuals as i see). I know that everything works fine with a simple push, but what is the right way?

P.S. working under ARC, if it matters


  [1]: http://developer.apple.com/library/IOs/#featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomSegues/CreatingCustomSegues.html