0

I created a header section for my UITableView following this post: https://stackoverflow.com/a/11396643/1568886. The issue I'm having now is accessing the buttons and label within the cell. When I connect the button and labels as outlets to the TableViewController Xcode throws an error:

/Users/ericky/Desktop/sample/sample-master/sample/en.lproj/MainStoryboard.storyboard: Couldn't compile connection: <IBCocoaTouchOutletConnection:0x7f8005e14430  <IBProxyObject: 0x7f8005e18260> => userProfileImage => <IBUIImageView: 0x7f8005e0d640>>

My view looks like:

enter image description here

How do I access the UI elements within the cell?

Community
  • 1
  • 1
GOAT
  • 601
  • 2
  • 13
  • 25

1 Answers1

2

You need to create a custom UITableViewCell, create a class for it and connect the buttons and labels to the class you created instead of the TableViewController. I used this tutorial to learn how to do it:

http://www.appcoda.com/customize-table-view-cells-for-uitableview/

David L
  • 4,347
  • 3
  • 18
  • 30