Declare the label as a property in the custom cell class. In the table view controller, alloc
or dequeue
the cell as your custom type, not as UITableViewCell
. In the Xcode storyboard, control drag from the cell itself (for example, the far bottom right corner) to the label that is in the cell to connect the outlet.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…