title: Unable to display multiplication table using slider in iOS
body: <p>Below is the code which I wrote in Xcode for displaying multiplication table when the slider is adjusted; the minimum value of the slider set was 0.05 and maximum value was 1. There is a tableview and slider in the project. I have added print statements to debug the code. When I add the Table1.Reload() in the end to the sliderChanged function, I am getting multiplication table of 2, but when I adjust the slider it is not changing. The slider value is getting struck. But, as soon as I remove the reload methodic the slider values are properly changing, but the multiplication table is struck at 0.</p>
  
  <pre><code>import UIKit
  class ViewController: UIViewController,UITableViewDelegate, UITableViewDataSource {
    //  var cellcontent[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
      var cellcontent = [Int](repeating: 0, count: 50 )
      var countr=50
      var count:Float=0.0
      var count2:Int=0
      var i=0
      var j=0
      internal func multiply(){
      print("check1")
          while j&lt;50{
          // print(i)
              i+=1
            //  yourArray.insert("Hey, I'm first!", atIndex: 0)
              cellcontent[j] =  i*count2
             // cellcontent.insert(cellcontent[j],at:j)
      print(cellcontent[j])
              j=j+1
          }
      }
  
      internal func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return cellcontent.count
      }
  
      internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell=UITableViewCell(style:UITableViewCell.CellStyle.default,reuseIdentifier: "cell")
          //   cell.textLabel?.text="Top row"
       //   print("c")
          //multiply()
          cell.textLabel?.text=String(cellcontent[indexPath.row])
          return cell
  
  
      }
      @IBOutlet weak var slider: UISlider!
  
      @IBOutlet weak var Table1: UITableView!
  
      @IBAction func sliderChanged(_ sender: Any) {
          //slider.maximumValue=Float(Int(countr))
          count=(slider.value*20)
          count2 = Int(round(count))
          print(count2)
          print(count)
      multiply()
      //     Table1.reloadData()
      }
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
  
  
  }
  </code></pre>