Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Introduction to Table Views Static Table Views for Detail Interfaces Displaying Data in the Detail View

Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

I have my code exactly like in the video but every time I run it, it marks my labels as nil. I've rechecked my outlets 3 times and the are all connected to the corresponding labels in the storyboard.

import UIKit

class ContactDetailController: UITableViewController {

var contact: Contact?

//Outlets
@IBOutlet weak var phoneNumberLabel: UILabel!
@IBOutlet weak var emailAddressLabel: UILabel!
@IBOutlet weak var streetAddressLabel: UILabel!
@IBOutlet weak var cityAddressLabel: UILabel!
@IBOutlet weak var stateLabel: UILabel!
@IBOutlet weak var zipCodeLabel: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
}

func configureView() {
    guard let contact = contact else { return }

    phoneNumberLabel.text = contact.phone
    emailAddressLabel.text = contact.email
    streetAddressLabel.text = contact.street
    cityAddressLabel.text = contact.city
    stateLabel.text = contact.state
    zipCodeLabel.text = contact.zip
}

}