title: Scroll the page in iPhone view
body: <p>I have a view which has details of some event,which includes imageview, some labels etc.
  I have the description of the event as a small subview in the view which is scrollable as below.</p>
  
  <pre><code>CGRect descriptionTextViewRect = CGRectMake(15, 185, 280, 85);
  descriptionText = [[UITextView alloc] initWithFrame:descriptionTextViewRect];
  descriptionText.textAlignment = UITextAlignmentLeft;
  descriptionText.text =des;
  descriptionText.editable = NO;
  descriptionText.layer.cornerRadius = 5.0;
  descriptionText.clipsToBounds = YES;
  descriptionText.userInteractionEnabled = YES;
  descriptionText.font = [UIFont systemFontOfSize:15];
  [scrollView addSubview: descriptionText];
  </code></pre>
  
  <p>I followed this <a href="https://stackoverflow.com/questions/3046449/calculate-the-contentsize-of-scrollview">link</a> but I get scrollable for both text view as well as the scrollview</p>
  
  <p>I followed like this</p>
  
  <pre><code>float sizeOfContent = 0;
   int i ;
  
  for (i=0; i&lt;[scrollView.subviews count]; i++) {
      sizeOfContent += descriptionText.frame.size.height;
  }
  
  scrollView.contentSize = CGSizeMake(descriptionText.frame.size.width, sizeOfContent)
  </code></pre>
  
  <p>I need to display the whole content of the description and make the whole detail page scrollable.</p>
  
  <p>Am I doing it correctly? Or am I missing out somthing?</p>
  
  <p>How do I do that?</p>
  
  <p>Thank you.</p>