title: App crashes while trying to push a new view controller from web view delegate
body: <p>I have a <code>UINavigationController</code> that contains a <code>UIViewController</code> (say 'FirstVC'). This 'FirstVC' contains a <code>UIScrollView</code> and on each page of this <code>UIScrollView</code> I have added another <code>UIViewCotroller</code> (say 'SecondVC'). This <strong>SecondVC</strong> contains a <code>UIWebView</code> that has several links. I want to push another <code>UIViewController</code> (say 'ThirdVC') having a <code>UIScrollView</code> on it. but when I try to do the same it crashes my applicatoin. 
  Here is code I have applied:</p>
  
  <p><strong>FirstVC</strong></p>
  
  <pre><code>- (void)viewDidLoad{
  
      [super viewDidLoad];
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ShowThirdVCNotification:) name:@"ShowThirdVC" object:nil]; 
  
  }
  
  -(void)showAlbumNotification:(id)notificationObject{
      NSLog(@"ShowThirdVCNotification: %@", [notificationObject object]);// It's an array
  
      ThirdVC *controller = [[ThirdVC alloc] initWithNibName:@"ThirdVC" bundle:nil];
      [controller setImageArr:[notificationObject object]];
      [self.navigationController pushViewController:controller animated:NO];
  }
  </code></pre>
  
  <p>/* SecondVC.view gets added to the scrollView of FirstVC when it loads */</p>
  
  <p><strong>SecondVC</strong>:</p>
  
  <pre><code>- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
  NSString *urlStr = [NSString stringWithFormat:@"%@", [request URL]];
  
      if ([[urlStr lastPathComponent] rangeOfString:@".jpg"].length) {
          [[NSNotificationCenter defaultCenter] postNotificationName:@"ShowAlbum" object:self.imageDetailArr];
          return NO;
      }
  return YES;
  }
  </code></pre>
  
  <p><strong>On Thread 1 it lists followings:</strong></p>
  
  <pre><code>4   0x00b0a8ab in -[UIWebScrollView didMoveToWindow] ()
  5   0x007a583e in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  6   0x007af6d1 in -[UIScrollView _didMoveFromWindow:toWindow:] ()
  7   0x007a54bb in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  8   0x007a54bb in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  9   0x007a54bb in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  10  0x007af6d1 in -[UIScrollView _didMoveFromWindow:toWindow:] ()
  11  0x007a54bb in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  12  0x007a54bb in -[UIView(Internal) _didMoveFromWindow:toWindow:] ()
  13  0x007a1c72 in -[UIView(Hierarchy) _postMovedFromSuperview:] ()
  14  0x007a04c6 in __UIViewWasRemovedFromSuperview ()
  15  0x007a0141 in -[UIView(Hierarchy) removeFromSuperview] ()
  16  0x009e69bb in -[UINavigationTransitionView _cleanupTransition] ()
  17  0x009e6c86 in -[UINavigationTransitionView _navigationTransitionDidStop] ()
  18  0x0079a499 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] ()
  19  0x00799d6d in +[UIViewAnimationState popAnimationState] ()
  20  0x007a326c in +[UIView(Animation) commitAnimations] ()
  21  0x009e6702 in -[UINavigationTransitionView transition:fromView:toView:] ()
  22  0x009e5ccb in -[UINavigationTransitionView transition:toView:] ()
  23  0x008422b7 in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
  24  0x008423df in -[UINavigationController _startDeferredTransitionIfNeeded] ()
  25  0x00842561 in -[UINavigationController __viewWillLayoutSubviews] ()
  26  0x0095e4ca in -[UILayoutContainerView layoutSubviews] ()
  27  0x007a8301 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] ()
  </code></pre>