title: Show text dynamically while scrolling up fetch data from server
body: <pre><code>import UIKit
  
  class Profile: UIViewController,UIScrollViewDelegate,UITextViewDelegate{
  
  
  @IBOutlet weak var tx: UITextView!
  @IBOutlet weak var sc: UIScrollView!
  @IBOutlet weak var l1: UILabel!
  
  
  @IBOutlet weak var l2: UILabel!
  
  
  @IBOutlet weak var l3: UILabel!
  @IBOutlet weak var l4: UILabel!
  
  @IBOutlet weak var l5: UILabel!
  
  @IBOutlet weak var l6: UILabel!
  
  
  @IBOutlet weak var l7: UILabel!
  
  @IBOutlet weak var l8: UILabel!
  
  
  @IBOutlet weak var l9: UILabel!
  
  
  @IBOutlet weak var l10: UILabel!
  
  
  @IBOutlet weak var l11: UILabel!
  
  
  
  @IBOutlet weak var l12: UILabel!
  
  
  
  @IBOutlet weak var l13: UILabel!
  
  
  
  @IBOutlet weak var l14: UILabel!
  
  
  
  @IBOutlet weak var l15: UILabel!
  
  
  @IBOutlet weak var l16: UILabel!
  
  
  @IBOutlet weak var l17: UILabel!
  
  @IBOutlet weak var l18: UILabel!
  
  
  @IBOutlet weak var l19: UILabel!
  
  
  @IBOutlet weak var l20: UILabel!
  
  
  
  var toPass:String!
  var toPass1: String!
  
  var toPass2: String!
  var toPass3: String!
  var toPass4: String!
  var toPass5: String!
  var toPass6: String!
  var toPass7: String!
  var toPass8: String!
  var toPass9: String!
  var toPass10: String!
  
  var toPass11: String!
  
  var toPass12: String!
  var toPass13: String!
  var toPass14: String!
  var toPass15: String!
  var toPass16: String!
  var toPass17: String!
  var toPass18: String!
  var toPass19: String!
  var toPass20: String!
  
  
  override func viewDidLoad() {
  
      super.viewDidLoad()
  
      l1.text = toPass
      l2.text = toPass1
      l3.text = toPass2
      l4.text = toPass3
      l5.text = toPass4
      l6.text = toPass5
      l7.text = toPass6
      l8.text = toPass7
      l9.text = toPass8
      l10.text = toPass9
      l11.text = toPass10
      l12.text = toPass11
      l13.text = toPass12
      l14.text = toPass13
      //l15.text = toPass14
      l16.text = toPass15
      l17.text = toPass16
      l18.text = toPass17
      l19.text = toPass13
      l20.text = toPass20
      tx.text = "\(toPass20)" + "\(toPass20)" 
  
      sc.minimumZoomScale = 1.0
      sc.maximumZoomScale = 10
      sc.delegate = self
  
  
  
  }
  
  
  
  func scrollViewWillBeginDragging(sc: UIScrollView)
    {
  
  
      NSLog("hello")
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  
  }
  
  }
  </code></pre>
  
  <p>I am creating labels statically. I want to create dynamically, while scrolling I need to fetch data from server and display dynamically.</p>