Thread 1: Exc_Bad_Access (code=2

I started receiving this error just before submitting code to a code challenge 🙂. Guess Murphy's alive and well. Anyway, I tracked down the vTa

I've checked the storyboard outlets, But it appears that the tableview controller is not initailizing

Can you provide a bit more information about the error? The "bad access" crash is a consequence of something that happened just before. There should be a more informative message, perhaps in the console log. If you're running this from Xcode, the first dozen or so lines of the backtrace might be more informative, too.


What kind of object is the "tableview controller"? Is it a view controller subclass?

You have defined a subclass of UITableViewController or do you include a tableView object in a class ?


If so, remember the class must conform to UITableViewDelegate and UITableViewDataSource


like this :


class MyViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
Thread 1: Exc_Bad_Access (code=2
 
 
Q