Category Archives: Table View Part-2

Table View Part-2

// Created by MohammadAzmalHossain on 11/19/16.


import UIKit

class ViewController: UIViewController, UITableViewDataSource {
 let devCourse = [("ios app development with swift training","simon allardice"),("ios 8 SDK new features","Lee BrimeLow"),("Data visualization with D3.js","Ray Villaglobos"),("swift essential training","simon allardice"),("Up and Running with AngularJS","Dan Gookin"),("MySQL Essential Training","Scott Simpson"),("Building Adaptive andraid apps with franments","David Gassner")]
 func numberOfSections(in tableView: UITableView) -> Int {
 return 1
 }
 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
 return devCourse.count
 }
 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
 let cell = UITableViewCell()
 let (courseTitle, courseAuthor) = devCourse[indexPath.row]
 cell.textLabel?.text = courseTitle
 return cell
 
 
 }
 
 
 override func viewDidLoad() {
 super.viewDidLoad()
 // Do any additional setup after loading the view, typically from a nib.
 }

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


}