-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Earlier in the tutorial in P2 you asked the students to add an extension to NotesViewController:UITableViewController:
extension NotesViewController {
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("NoteCell", forIndexPath: indexPath) as! NoteTableViewCell //1
cell.textLabel?.text = "Hello World"
return cell
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
}
}
And then later in P11, you asked them to change the subclass of NotesViewController to UIViewController instead of UITableViewController so that you can make a tableView @IBOutlet. This means that you now have to make the extension for NotesViewController to implement TableViewDelegate and TableViewDataSource. You might want to add in your tutorial for P11 to change the extension to implement the protocols:
extension NotesViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
...
}
Also keep in mind that the students need to remove override as well.
If you want me to put a pull request for this I can.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels