Table View with Number List

// Created by Mohammad Azmal Hossain on 11/22/16.
// Copyright © 2016 Mohammad Azmal Hossain. All rights reserved.

import UIKit

class ViewController: UIViewController, UITableViewDataSource {

 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
 return 10
 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
 let cell = UITableViewCell()
 cell.textLabel!.text = "this is row \(indexPath.row)"
 return cell
 override func viewDidLoad() {
 // Do any additional setup after loading the view, typically from a nib.

 override func didReceiveMemoryWarning() {
 // Dispose of any resources that can be recreated.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s