3

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!

atirit
  • 1,492
  • 5
  • 18
  • 30

3 Answers3

12

This is the issue:

Missing Custom Class Name

Changing to this should fix this problem:

Provided Custom Class Name

Daniel Hall
  • 13,457
  • 4
  • 41
  • 37
2

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
Antek
  • 721
  • 1
  • 4
  • 27
1

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

Ali
  • 2,427
  • 22
  • 25