title: How to add NSTextFields to NSScrollView
body: <p>I want to add multiple <code>NSTextField</code>s to <code>NSScrollView</code> dynamically.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>func addLabel(data: String)
  {
      let offset = labelCount*20
      let label = NSTextField(frame: NSMakeRect(0, CGFloat(offset), 200, 20))
      label.stringValue = data
      scrollView.documentView?.addSubview(label)
      labelCount += 1
  
      // scrollView is IBOutlet
      // labelCount is var to keep record of number of labels
  }
  </code></pre>
  
  <p><strong>Problem:</strong></p>
  
  <p>It adds the <code>NSTextField</code>s correctly to the <code>NSScrollView</code> but they are only added till the visible part is available. After the visible part of <code>NSScrollView</code> is full, no more <code>NSTextField</code>s are added to it.</p>
  
  <p>I need to add <code>NSTextField</code>s even though the visible part is full and scroll to find others.</p>
  
  <p>How can I do it? </p>