简体   繁体   中英

Connecting label to UITableViewCell

I've created several tables in the past but I believe it's something with the way I'm doing it that Xcode doesn't like this time.

I have several xib files with a UIView inside. These together creates a slideview like snapchat.

In one of these xib files I have a UIView. In this I have a UITableView and a UITableViewCell. I have set up a prototype cell with an identifier "cell". I've set up the delegate and dataSource as I usually do.

I made a UITableViewCell class and set up the class for the prototype cell.

Here's where the trouble is: I wanna connect my labels on the cell to the UITableViewCell class and make IBOutlets. But Xcode doesn't let me do it. It simply doesn't connect them.

Any suggestions on why I can't do it or if there's a way around??

Change class of your UITableViewCell to your custom class in xib. (in utilities section,there is option called custom class)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM