uchicago-mobi / MPCS51030-2017-Winter-Forum

7 stars 0 forks source link

Assignment 7 Specification #140

Closed alexliu0809 closed 7 years ago

alexliu0809 commented 7 years ago

Hi, I saw on the website that there is tip like this: "Tip: Make sure to adjust the contentMode property of the image view in the cell." I wonder what does this mean?

susanstevens commented 7 years ago

Take a look at this tutorial: http://useyourloaf.com/blog/stretching-redrawing-and-positioning-with-contentmode/. It explains the different contentMode options for images. You'll want to make sure you set your images' content mode in such a way that the images are not stretched or distorted in the collection view cells.

tabinks commented 7 years ago

Unless an image is the exact size of the UIImageView your image will need to be resized to fit. Using contentMode you control how the resizing will occur (eg. fill aspect, stretch, etc.).