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 trialZachary Kinnear
Courses Plus Student 2,269 PointsHi I am just wondering what is wrong with this code. I appears the Xcode has updated. Thanks
I have followed the steps I am just wondering if there is a minor error. When i run the app it says that it has failed.
Muratalin Appas
1,725 PointsHello,
Try reconnecting the IBoutlet "funFactLabel" from Main.storyboard to ViewController.swift.
2 Answers
William Benson
1,119 Pointsclass ViewController: UIViewController {
@IBOutlet var funFactLabel: UIView!
override func viewDidLoad() {
super.viewDidLoad()
funFactLabel.text = "an interesting fact" // this line is giving me the error:
Value type of 'UIView' has no member 'text'
Carmen Ibarcena
iOS Development Techdegree Student 8,296 Pointscode should go like this. what you have wrong is that you are putting @IBOutlet var funFactLabel: UIView! and it is not UIView is UILabel. @IBOutlet weak var funFactLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
funFactLabel.text = "An Intersting fact!"
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
} Hope this help!
Andres Aguero
30,545 PointsAndres Aguero
30,545 PointsHi Zachary, can you post your code so that we can help you.
Thanks