atirit
atirit

Reputation: 1574

Can't make outlet to custom class from UITableViewCell

I am unable to make an @IBOutlet to my custom class from the elements in my prototype cell. I tried dragging from the element to the class; I let go of the blue line, and nothing happens.

Here are my files if you want to poke around.

Thanks in advance!

Upvotes: 3

Views: 4575

Answers (3)

Antek
Antek

Reputation: 739

sometimes, some xcode tricks 'n hacks work, for example:

  • removing class name in storyboard for a cell;
  • restarting xcode;
  • cleaning project;
  • removing outlets and trying to prepare them again;
  • adding outlets using various techniques (ctrl+drag from storyboard, drag from an outlet defined in class file, drag from outlets tab - 'add new outlet')
  • removing cell class inheritance, then adding outlet, then adding inheritance back again

Upvotes: 2

Ali
Ali

Reputation: 2487

Make sure the CustomtableViewCell class is a Cocoa Touch Class file and not a swift file

Upvotes: 1

Daniel Hall
Daniel Hall

Reputation: 13679

This is the issue:

Missing Custom Class Name

Changing to this should fix this problem:

Provided Custom Class Name

Upvotes: 12

Related Questions