Skip to content

Commit

Permalink
Merge pull request hyperoslo#330 from weslindsay/no-images-available-…
Browse files Browse the repository at this point in the history
…glitch

No Images Available animation glitch
  • Loading branch information
onmyway133 authored Aug 12, 2017
2 parents 0bdecf6 + 7383b04 commit df3f728
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/ImageGallery/ImageGalleryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ open class ImageGalleryView: UIView {
width: configuration.indicatorWidth, height: configuration.indicatorHeight)
collectionView.frame = CGRect(x: 0, y: topSeparator.frame.height, width: totalWidth, height: collectionFrame - topSeparator.frame.height)
collectionSize = CGSize(width: collectionView.frame.height, height: collectionView.frame.height)
noImagesLabel.center = CGPoint(x: bounds.width / 2, y: (bounds.height + Dimensions.galleryBarHeight) / 2)

collectionView.reloadData()
}
Expand All @@ -149,7 +150,7 @@ open class ImageGalleryView: UIView {
if threshold > height || self.collectionView.alpha != 0 {
self.noImagesLabel.alpha = 0
} else {
self.noImagesLabel.center = CGPoint(x: self.bounds.width / 2, y: height / 2)
self.noImagesLabel.center = CGPoint(x: self.bounds.width / 2, y: (height + Dimensions.galleryBarHeight) / 2)
self.noImagesLabel.alpha = (height > threshold) ? 1 : (height - Dimensions.galleryBarHeight) / threshold
}
})
Expand Down

0 comments on commit df3f728

Please sign in to comment.