Started practice swift. In singleViewController I am trying to make a UITableView. In storyboard I set the datasource and delegate. Here I am getting the error
Just a suggestion to improve readability, you can separate your protocols using extension, like this:
class ViewController: UIViewController {
// Your lifecycle code here
}
extension ViewController: UITableDataSource {
func tableView(tableView:UITableView!, numberOfRowsInSection section:Int) -> Int {
return 20
}
}
extension ViewController: UITableViewDelegate {
...
}