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
Gil Aguilar
8,813 PointsPlaylist App - UIView does not have a member named 'image'
I come to the part where we get the build for the build to test the image size and what not for the Playlist App ... and I get this error I looked online for an answer but not sure if it is that I overlooked something or if there is no such thing as image but i looked at my code .... here is my code ... let me know if I need to post other lines of code ...
import UIKit
class PlaylistDetailViewController: UIViewController {
var playlist: Playlist?
@IBOutlet weak var playlistCoverImage: UIView!
@IBOutlet weak var playlistTitle: UILabel!
@IBOutlet weak var playlistDescription: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
if playlist != nil {
//The error occurs below
playlistCoverImage.image = playlist!.icon
playlistCoverImage.backgroundColor = playlist!.backgroundColor
playlistTitle.text = playlist!.title
playlistDescription.text = playlist!.description
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}