Znam mnóstwo pytań, ale nie może wydawać się znaleźć odpowiedźDodawanie obrazka do komórki
Mam Tableview ale nie można dodać zdjęcie do celi
cell.imageView.image = UIImage(named: "osx_design_view_messages")
ten Kod powinien działać, ponieważ zasadniczo skopiowałem go z odpowiedzi na pytanie, ale z jakiegoś powodu nie działa. Jakieś sugestie?
Im przy Swift na drodze
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
{
let cellIdentifier = "cell"
var cell : UITableViewCell
cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) as UITableViewCell
cell.textLabel.text = self.recipies[indexPath.row]
var image : UIImage = UIImage(named: "osx_design_view_messages")
return cell
}
Możesz opublikować całą funkcję cellForRowAtIndexPath? – Dash