Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Hi there. Does anybody know what this message means?

"import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { "

I am following by the book the classes so far. When I hit the button on the simulator the action does not happen and the screen above is presented to me via debug menu. It is not an error but seems to be something related to a deprecated class and the button does not work. It was working till yesterday but from today on it has stopped working.

My code bellow. Tks in advance.

import UIKit

class ViewController: UIViewController {

//creating an object interface builder IB

@IBOutlet weak var funFactLabel: UILabel!


override func viewDidLoad() {
    super.viewDidLoad()
    funFactLabel.text = "An interesting Fact!"   
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

@IBAction func showFact() {
   let facts = ["Ants strech when they wake up in the morning", "Ostriches can run faster than horses"]

    funFactLabel.text = facts[1]

2 Answers

This is the type of error that happen when there is a misconnection between the storyboard and the class.

Are the circles at the left of @IBOutlet/@IBAction full or empty ?

Hi Joel. tks for the feedback. Have just deleted this project and restarted xcode and now it is working again. Regarding the circles they were full.

Tks Marcelo