1

I've been trying for 2 days in a row to fix a custom cell I created. I'm new to iOS, so I've been reading that I must set constraint if use autolayout is enabled.

Even though I set some constraints, the issue is still there, so I'm guessing either ways the iOS Simulator has a bug I'm not aware of, or there was something missing in the 10+ guides & tutorials I have already read. Yes, I made my research, I've read several articles including:

The custom cell is being created in the storyboard, here's a picture containing the contraints:

(The UIImageView's view mode is set to center)

And here's a picture of the iOS Simulator:

EDIT: I also deleted all constraints, but the result is the same, the iOS Simulator renders it the same way

SOLUTION: This is so stupid, my UIImageView pointer was called *imageView and it seems UITableViewCell has a pointer with the same name so whenever I called it, mine was being ignored, and instead was called the superclass' one, resulting not in what I thought it was a resize issue, but a superposition

Community
  • 1
  • 1
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206
  • 1
    Your tableview has constraint errors. Click on the little red circle to the right of "Events Table View Controller Scene" and fix them. After you've fixed and updated your constraints then all the constraints should be blue. – Robotic Cat Aug 08 '14 at 19:28

1 Answers1

-1

Try selecting the UIImageView, opening up the inspector tab, and checking if the UIImageView is set to "Clip Subviews".

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Brandon A
  • 8,153
  • 3
  • 42
  • 77