Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 4282c57

Browse files
committed
Merge pull request #143 from jeroenleenarts/patch-1
When comparing the size of the image and the imageview's size. The origin of the image view should not be considered.
2 parents 5cd9faf + 6f3aef9 commit 4282c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ParseUI/Classes/Cells/PFCollectionViewCell.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ - (void)layoutSubviews {
5656

5757
// Adapt content mode of _imageView to fit the image in bounds if the layout frame is smaller or center if it's bigger.
5858
if (!CGRectIsEmpty(imageViewFrame)) {
59-
if (CGRectContainsRect(PFRectMakeWithSize(_imageView.image.size), imageViewFrame)) {
59+
if (CGRectContainsRect(PFRectMakeWithSize(_imageView.image.size), PFRectMakeWithSize(imageViewFrame.size))) {
6060
_imageView.contentMode = UIViewContentModeScaleAspectFit;
6161
} else {
6262
_imageView.contentMode = UIViewContentModeCenter;

0 commit comments

Comments
 (0)