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 trialimelda cloutier
Courses Plus Student 2,597 PointsfunFactLabel.text bring error. value of type 'uiview' has no member text
help
2 Answers
arnavthecoder
3,453 PointsCan I see your outlet? Your outlet for this label should be
@IBOutlet weak var funFactLabel: UILabel!
Your error is telling you that funFactLabel is assigned as a UIView, so when you try to assign text to the "label", it doesn't recognize it. If you have any questions, feel free to reply.
Good Luck, Arnav
imelda cloutier
Courses Plus Student 2,597 Pointsfound my answer on youtube. somehow my link from the label to the text disappeared. I just deleted the code and redo the linkage
alexander88
10,824 Pointsalexander88
10,824 PointsI'm having the same problem. I realized I didn't make my connection weak so I went and remade it (not sure if you have to go through the linking process shown of if you can just shortcut it and edit solely the code). It's still giving me problems though, saying:
Value of type 'UILabel' has no member 'txt'
This is the code I have currently:
''' import UIKit
class ViewController: UIViewController {
} '''