title: How to add View below other view in ViewController in iOS?
body: <p>In my app i am creating view controller with mixed of <code>UILabel</code> and <code>UITextview</code> which want to be scrollable because the text are dynamic and also exceeds vertical screen size. </p>
  
  <p>I am currently having Scrollview which has subviews as below. Views are created in <strong>Xcode 4.3 Storyboard</strong>.</p>
  
  <p><strong>UILabel1(Say Heading)</strong></p>
  
  <p><strong>UITextView1(Dynamic text which can be any size)</strong></p>
  
  <p><strong>UILabel2(Second Heading)</strong></p>
  
  <p><strong>UITextView2(Dynamic text which can be any size)</strong></p>
  
  <p>and so on. </p>
  
  <p>The problem is</p>
  
  <p>When the <code>UITextView1</code> has more content then it overlaps with <code>UILabel2</code> which i don't want.</p>
  
  <p>I would like to have <code>UILabel1</code> on top of scrollView and <code>UITextView1</code> below the <code>UILabel1</code>. <code>UILabel2</code> below <code>UITextView1</code>  and so on.</p>
  
  <p>What i have to do to achieve this?</p>
  
  <p>EDIT</p>
  
  <p>In Storyboard</p>
  
  <p>![enter image description here][1]</p>
  
  <p>In Simulator</p>
  
  <p>![enter image description here][2]</p>
  
  <p>Thanks for your help guys. Much appreciated.</p>
  
  <p>Code</p>
  
  <pre><code>- (void)viewDidLoad
  {
  [super viewDidLoad];
  // Do any additional setup after loading the view.
  
  [scrollView setScrollEnabled:YES];     
  [self.view addSubview:cockTailNameLabel];
  [self.view insertSubview:txtIngredients belowSubview:cockTailNameLabel];
  [self.view insertSubview:scrollView belowSubview:cockTailNameLabel];
  //[scrollView]
  
  [self.cockTailNameLabel setText:self.passcockTailName];  
  
  [_txtUse setText:self.passUse]; 
  [_txtUse setEditable:NO];
  [_txtUse setUserInteractionEnabled:NO];
  
  CGRect useFrame = _txtUse.frame;
  useFrame.size.height = _txtUse.contentSize.height;
  _txtUse.frame = useFrame; 
  
  [txtIngredients setText:self.passIngredients];
  [txtIngredients setEditable:NO];
  [txtIngredients setUserInteractionEnabled:NO];
  CGRect ingredientFrame = txtIngredients.frame;
  ingredientFrame.size.height = txtIngredients.contentSize.height;
  txtIngredients.frame = ingredientFrame;  
  
  
  [txtRecipe setText:self.passReceipe];
  [txtRecipe setEditable:NO];
  [txtRecipe setUserInteractionEnabled:NO];
  CGRect recipeFrame = txtIngredients.frame;
  recipeFrame.size.height = txtRecipe.contentSize.height;
  txtRecipe.frame = recipeFrame;
  
  [scrollView insertSubview:_txtUse belowSubview:cockTailNameLabel];
  [scrollView insertSubview:titleIngredients belowSubview:_txtUse];
  [scrollView insertSubview:txtIngredients belowSubview:titleIngredients];
  [scrollView insertSubview:btnReceipe belowSubview:txtIngredients];
  [scrollView insertSubview:btnHome belowSubview:txtIngredients];
  [scrollView insertSubview:txtRecipe belowSubview:btnHome];
  [scrollView insertSubview:btnfacebookShare belowSubview:txtRecipe];
  [scrollView insertSubview:btnTwitterShare belowSubview:txtRecipe];
  
  
  
  /*[scrollView addSubview:_txtUse];
  [scrollView addSubview:titleIngredients];
  [scrollView addSubview:txtIngredients];
  [scrollView addSubview:btnReceipe];
  [scrollView addSubview:btnHome];
  [scrollView addSubview:txtRecipe];
  [scrollView addSubview:btnfacebookShare];
  [scrollView addSubview:btnTwitterShare];*/
  
  [scrollView setContentSize:CGSizeMake(320, 1000)];
  
  NSLog(@"RecipeName :%@ ",passcockTailName);
  </code></pre>
  
  <p>}</p>