title: ObjC - Programmatically add label to UIScrollView
body: <p>How do you programmaticaly add labels (or other controls for that matter) to a UIScrollView?</p>
  
  <p>I used this code, but I couldn't scroll. Which leads me to believe that it doesn't add the labels to the UIScrollView.</p>
  
  <p>This is my code:</p>
  
  <pre><code>for (int i = 1; i &lt;= 30; i++)
  {
      UILabel *myLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, (i * 50), 200, 40)];
      [myLabel setBackgroundColor:[UIColor clearColor]];
      [myLabel setText:@"Dynamic"];
      [self.Scroller addSubview:myLabel];
  }
  </code></pre>
  
  <p>There are no errors, and it does create the labels, but like I said before, without scrolling.</p>
  
  <p>What are we doing wrong?</p>
  
  <p>Thanks in advance.</p>