Amarjit Dhillon
Amarjit Dhillon

Reputation: 2816

The photoImageView outlet from the ViewController to the UIImageView is invalid. Outlets cannot be connected to repeating content

I am adding the ImageView in Table View but I am getting the above error when I compile it? Do I need to add class for cell

enter image description here

Upvotes: 0

Views: 1824

Answers (2)

Devang Tandel
Devang Tandel

Reputation: 3008

Outlets cannot be connected to repeating content

You are getting this error message because you have given Outlet to cell's imagevView in viewController's class.

You cannot give outlet directly.

You have to create Subclass of UITableviewCell and will be able to give outlet to any of cell's content.

or You can give Tag to specific view And access the view with tag when required.

Upvotes: 3

Siyavash
Siyavash

Reputation: 980

"Create a table view cell subclass and set it as the class of the prototype. Add the outlets to that class and connect them. Now when you configure the cell you can access the outlets." More info

Upvotes: 1

Related Questions