title: Delegate not working, when using a modal presented NavigationController ( iOS 5 - Storyboard )
body: <p>I have a problem with a protocol.</p>
  
  <p>My "initial View Controller" is a Navigation Controller. On the root page i show an other Navigation Controller in which is View Controller embedded. onclick a segue should be fired...this works perfectly but the delegate method from the "ViewController" is never called.</p>
  
  <p>The image I added is a example how I build the connection between the 2 NavigationControllers with the InterfaceBuilder in iOS 5.</p>
  
  <p><img src="https://i.stack.imgur.com/LekpG.png" alt="image"></p>
  
  <p>MyViewController.h</p>
  
  <pre><code>@protocol MyProtocol &lt;NSObject&gt;
  
  @required
  - (void) myFunction:(NSString *)string;
  
  @end
  
  @interface MyViewController : UIViewController &lt;MyProtocol&gt;
  
  @property (nonatomic, assign) id&lt;MyProtocol&gt; delegate;
  
  @end
  </code></pre>
  
  <p>MyViewController.m</p>
  
  <pre><code>#import "MyViewController.h"
  @implementation PropertyController
  @synthesize delegate = _delegate;
  
  - (void) myFunction:(NSString *)string {
      [_delegate myFunction:string];
  }
  
  - (IBAction) callDelegate:(id)sender {
       ![enter image description here][1][self myFunction:@"test"];
  }
  </code></pre>
  
  <p>And this is the code for the ViewController which is showing the NavigationController from above</p>
  
  <p>ViewController.h</p>
  
  <pre><code>#import "MyViewController.h"
  
  @interface ViewController : UIViewController &lt;MyProtocol&gt;
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>#import "ViewController.h"
  
  @implementation ViewController
  
  - (void) myFunction:(NSString *)string {
      NSLog(@"myFunction was called");
  }
  
  - (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
      [((MyViewController *) segue.destinationViewController) setDelegate:self];
  }
  
  - (IBAction) showModalNavigationController {
      [self performSegueWithIdentifier:@"NameFromSegueInInterfaceBuilder" sender:self];
  }
  </code></pre>
  
  <p>I cant find a solution for my problem.</p>
  
  <p>I hope somebody can help me</p>
  
  <p>thank you :)</p>