0

I was wondering if anyone knows hot to fix this issue. When I run the app, the image gets cut off instead of displayed. I have attached photos to show in detail.

enter image description here

enter image description here

Bista
  • 7,869
  • 3
  • 27
  • 55
CoderCody
  • 103
  • 1
  • 9
  • Check out http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights It doesn't look like you have any constraints. You may just have to set constraints on the image view. – Kendel Aug 28 '16 at 23:00

2 Answers2

1

Since you have two kind of Cells in the Table View, you have to set the height of both cells programatically inside heightForRowAtIndexPath.

Currently, you have only one cell size and I think it is default to 44.0.

Bista
  • 7,869
  • 3
  • 27
  • 55
  • 1
    I was able to solve it already by doing what you said. It stinks Xcode can't use storyboard to know the height when working with more then one cell. – CoderCody Aug 30 '16 at 01:12
0

May be you doesn't set imageview's constraints properly.

Set top, bottom, left, rignt constraint of imageview with tableviewcell frame properly. Give a aspect ratio size of the imageview. And return UITableViewAutomaticDimension from heightForRowAtIndexPath and estimatedHeightForRowAtIndexPath delegate functions. This will work !!

Rabindra Nath Nandi
  • 1,433
  • 1
  • 15
  • 28