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 trialWilliam Choi
6,121 PointsGetting an expected member name following error?
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("WeatherCell") as! UITableViewCell
let dailyWeather = weeklyWeather[indexPath.row]
cell.textLabel?.text = dailyWeather.day
return cell
}
on the line cell.textLabel?.text = dailyWeather.day it says that there is an expected member name following the . after textLabel? im not sure why and would like to understand whats going on. thanks in advance
William Choi
6,121 PointsTo be honest I actually dont know, Ive been trying to figure out what type it is and im not to sure.
William Choi
6,121 PointsTo be honest I actually dont know, Ive been trying to figure out what type it is and im not to sure.
1 Answer
Kristofer Doman
18,307 PointsI'm honestly not sure what your exact problem is, but from a glance I feel like this line:
let cell = tableView.dequeueReusableCellWithIdentifier("WeatherCell") as! UITableViewCell
is supposed to be "as! WeatherTableViewCell" maybe?
William Choi
6,121 PointsThat wasnt it but thanks anyway, I just closed it and reopened it and now it seems to work from some reason haha
Jo Albright
5,199 PointsJo Albright
5,199 PointsCan you explain what dailyWeather type is? The ".day" may not make sense to the computer and be throwing the error.