I'm getting the following error.
fatal error: unexpectedly found nil while unwrapping an Optional value
The application is crashing on the following bit of code. Since it is my first scene, the app crashes the moment it loads.
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
tableView.delegate = self
tableView.dataSource = self
mySingleton = Singleton.sharedInstance
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
tableView.reloadData()
}
It crashes on tableView.delegate = self. If I comment out that line and the tableView.delegate = self it then crashes on the tableView.reloadData() line. If I comment that line out the app no longer crashes but the dynamic tableView will no longer display data because it is not getting reloaded anymore.
The application was working perfectly until I added a 3rd tab to the tab bar view controller. It is possible that I accidentally did something else in the process. I would love to hear your thoughts on the matter. I have been staring at it for hours now.
Thanks, Alex