Skip to content

Commit

Permalink
scale up image
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Dec 12, 2017
1 parent 2934a0f commit 9c8945c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TLPhotoPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
s.version = '1.3.8'
s.version = '1.3.9'
s.summary = 'multiple phassets picker for iOS lib. like facebook'

# This description is used to generate tags and improve search results.
Expand Down
5 changes: 3 additions & 2 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ extension TLPhotosPickerViewController {
guard let layout = self.collectionView.collectionViewLayout as? UICollectionViewFlowLayout else { return }
let count = CGFloat(self.configure.numberOfColumn)
let width = (self.view.frame.size.width-(5*(count-1)))/count
self.thumbnailSize = CGSize(width: width, height: width)
layout.itemSize = self.thumbnailSize
let scale = UIScreen.main.scale
self.thumbnailSize = CGSize(width: width*scale, height: width*scale)
layout.itemSize = CGSize(width: width, height: width)
self.collectionView.collectionViewLayout = layout
self.placeholderThumbnail = centerAtRect(image: self.configure.placeholderIcon, rect: CGRect(x: 0, y: 0, width: width, height: width))
self.cameraImage = centerAtRect(image: self.configure.cameraIcon, rect: CGRect(x: 0, y: 0, width: width, height: width), bgColor: self.configure.cameraBgColor)
Expand Down

0 comments on commit 9c8945c

Please sign in to comment.