1

I am a beginner in iOS development, and now i am trying to learn to make Instagram clone app. i have 3 table view cell in one table view controller

  1. a static header cell
  2. media cell to show up the photo
  3. a comment cell

and I have set the autolayout constraint for all those 3 table view cells, per the screenshot below

enter image description here

but when i run the app, the header cell and the comment cell have some autolayout issues. but the media cell seems okay, it construct as i want it. it seems that the comment cell and header cell attached to the top left side of the table view cell container

enter image description here

the profile picture image view makes me suspicious, because if i delete the profile picture and just put the username and follow button, the autolayout worked.

i put this contraints for the profile image : top, leading and bottom space constraint to view + aspect ratio

i don't know why the autolayout issue only occured for header and comment cell. the media cell is perfect as i am expected

Agung Laksana
  • 781
  • 1
  • 12
  • 26

0 Answers0