- Open the storyboard file, go to the table view, and select the prototype cell.
- Change its Style from Attribute Inspector tab to Custom.
- Change the cell height to 70 pixels.
- From the Object Library, drag a UIImageView to add it as a subview to the custom cell. Add it at location (0, 0) with the same size as the custom cell.
- Add Autolayout constraints to the image view as follows:
FoodImage.leading = Superview.leading FoodImage.top = Superview.top FoodImage.trailing = Superview.trailing FoodImage.bottom = Superview.bottom
- Open the Attribute Inspector tab and change the image name to Sushi. Change the mode to Aspect Fill to make the image fill the size, but keeping the aspect ratio:
- Now, drag a UILabel from Object Library ...