Tutorial 2 Table view

Hi I m currently following the tutorial 2 and I have an error (Thread 1: signal SIGABRT) about this code:
let label = cell.viewWithTag(1000) as! UILabel
error is : Could not cast value of type UITableViewCell to UILabel.

Can someone help me?

It sounds as if you set the tag to the wrong view - the table view cell instead of the label. Can you check which view has the tag value of 1000 in interface Builder and make sure that it is indeed the label and that the table view cell does not have a tag set (or at least, it is not set to 1000)?

Hi Fahim,

You are right. Thx for your help.

This topic was automatically closed after 166 days. New replies are no longer allowed.