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
Nicolas Moroz
76 PointsTemperature labels not showing in cells
No errors, but label is not showing in table cell. I have my outlet defined in my custom cell as "maxlabel" and the cell code is as follows:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! DailyWeatherTableViewCell
cell.maxlabel.text = maxarray[indexPath.row] as? String
return cell
}
Nicolas Moroz
76 PointsMartin, I changed the array to "test" and used the Center Vertically Constraint and the word "Test" was all the way to the left of the screen barely visible. How do I get the label to show on the right side of the cell?
Martin Wildfeuer
Courses Plus Student 11,071 PointsMartin Wildfeuer
Courses Plus Student 11,071 PointsYour code looks right, so let's try a view things:
Let me know if that helps!