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 Build a Simple iPhone App with Swift Views and View Controllers View Controllers and IBAction

All I can see is the title screen "Fun Facts." How do I get to the next page where my information is?

All I can see is the title screen "Fun Facts." How do I get to the next page where my information is?

For whatever reason I can't get to the second screen where my button is in the iOS simulator.

8 Answers

That is a run time code error, You should try a new file, because is a short APP, if you can't find where the error is.

Review your IBAction config. Or put it here to see more.

Pasan Premaratne
STAFF
Pasan Premaratne
Treehouse Teacher

Kenton Raiford,

Sounds like the simulator is crashing on the launch screen. Reset the simulator (Simulator menu > Reset Content and Settings) and try again?

Hi guys,

Thanks for your help. I reset the simulator but It still doesn't seem to work. When I create a new xcode file and do the exact same steps it works but on my original project it doesn't. I could just continue with the new one, but I want to know what to do in case this happens to me again.

Here is the code for my project that is not working:

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var funFactLabel: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

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

@IBAction func showFunFact() {
    funFactLabel.text = "Another interesting fact"
}

}

I should also mention every time I build it pops up the debug screen and has a yellow triangle next to the Thread 1 queue

After researching a lot and fixing lot of these issues, I know exactly what the issue is you might have had an old outlet property still hanging on with that view controller which ever you are working with.

Step - 1 Open the Document Outline, Step - 2 , Check all the outlets for the View Controller. Let me know if you can fix this issue by now.

I am having the same issue, any progress?

I have tried everything but it still isn't working. For now I have just made a new file and the new file is working.

Omar Nunez Yes that is what I did. :)

Omar Nunez Yes that is what I did. :)