From 9c8945c17d9dad8d291325e1956c7233dde3aa48 Mon Sep 17 00:00:00 2001 From: tilltue Date: Wed, 13 Dec 2017 01:34:40 +0900 Subject: [PATCH] scale up image --- TLPhotoPicker.podspec | 2 +- TLPhotoPicker/Classes/TLPhotosPickerViewController.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TLPhotoPicker.podspec b/TLPhotoPicker.podspec index 85d4a85a..086e3008 100644 --- a/TLPhotoPicker.podspec +++ b/TLPhotoPicker.podspec @@ -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. diff --git a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift index 91740910..eba636f1 100644 --- a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift +++ b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift @@ -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)