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
Ryan Johnston
Courses Plus Student 33 PointsCan someone help please? Trying to show Parse.com data inside UILabel
Hi,
After following a tutorial to get data from my Parse account I am able to show it in a table view however I am looking to show it in a UILabel instead. I am rather new to Swift so l apologise if this is an easy task!
THe tutorial I followed is this and the data I am showing is sensor readings from an Arduino and Ultrasonic Sensor: https://medium.com/swift-programming/ios-swift-parse-com-tutorial-set-up-xcode-project-part-1-of-3-f50842aa95a
Thanks,
Ryan Johnston
Donald White
5,743 PointsDonald White
5,743 PointsIf I'm understanding the question, you'll likely need to add an IBOutlet variable and connect it to your view controller. You can do this easily by navigating to the storyboard, choose the UILabel you wish to use. Make sure the assistant editor is open and you have the view controller swift file visible. Then control click + drag from your UILabel to your view controller and create an IBOutlet. Name it appropriately and you can begin to use it in your code.
Once you have your data from Parse:
self.uilabelname.text = parseobject.variablename