title: Expand and Collapse a UIView within a UIViewController
body: <p>I want to expand a view on click of a button and collapse the same.And accordingly change the frame of the data residing below the view. I have used a scrollview and then added the items to scroll.</p>
  
  <p><img src="https://i.stack.imgur.com/ZLdSI.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/9nyAg.png" alt="enter image description here"></p>
  
  <p>I am able to add  a new view and hide it initially and on click of (+) button I unhide that view,and hide the (+)button.</p>
  
  <p>Two concerns</p>
  
  <p>1) How do I manage the data below the view so the when the view is in collapse position the data should be just below the view? And when I expand it it should change the frame accordingly.<br>
  2) The label "The label is test1" is a single label. I would be showing the description there. Initially 4 lines and when we click (+) button the remaining description would be shown.So this would not be possible if I take another view as I need to take a single label or text view to display data.</p>
  
  <pre><code>-(IBAction)plusButton:(id)sender{
  
      [plusButton setHidden:YES];
      [expandedView setHidden:NO];
  
      //[mainView setFrame:CGRectMake(10, 150, 294, 400)];
  
  }
  
  -(IBAction)minusButton:(id)sender{
      [plusButton setHidden:NO];
      [expandedView setHidden:YES];
  
  }
  </code></pre>