title: UIScrollView got freeze when Back button pressed?
body: <p>I am having a (<code>UIView</code> and <code>UICollectionView</code> in a <code>UIScrollView</code>) as <code>1stVC</code>. I have to scroll both at the same time for which I already unable the collection view scrolling. So first time When I launch that screen I am able to scroll the whole view, But when I push to (next <code>ViewController</code>) <code>2ndVC</code> and then press Back Button to <code>1stVC</code> my scroll view is not preforming it got Freeze.</p>
  
  <p>Tried this Method:- </p>
  
  <pre><code>-(void)viewDidLayoutSubviews{
      [super viewDidLayoutSubviews];
  
      dispatch_async(dispatch_get_main_queue(), ^ {
          CGRect contentRect = CGRectZero;
  
          for(UIView *view in self.scrollView.subviews)
              contentRect = CGRectUnion(contentRect,view.frame);
  
          self.scrollView.contentSize = contentRect.size;
      });
  }
  </code></pre>
  
  <p>Tried this Method:- </p>
  
  <pre><code>-(void)viewDidLayoutSubviews{
      [super viewDidLayoutSubviews];
  
      [_scrollView setContentSize:CGSizeMake(_scrollView.frame.size.width, _scrollView.frame.size.height)];
  
  }
  </code></pre>
  
  <p>And For Getting Dynamic Height of the Collection view I have Done This</p>
  
  <pre><code>CGFloat height = _collectionCompass.contentSize.height;
  </code></pre>
  
  <p>Which I Have provided to ScollView ContentSize.</p>
  
  <pre><code>_scrollView.contentSize = CGSizeMake(_scrollView.frame.size.width, height);
  </code></pre>
  
  <p>Please help me.</p>