diff --git a/Demo/AppDelegate.swift b/Demo/AppDelegate.swift index ecf83c0..9cd8a3f 100644 --- a/Demo/AppDelegate.swift +++ b/Demo/AppDelegate.swift @@ -22,7 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json index 9dd60fd..f26e486 100644 --- a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -89,6 +89,11 @@ "idiom" : "ipad", "filename" : "167.png", "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Demo/DemoListViewController.swift b/Demo/DemoListViewController.swift index 67e67d4..4f8a7d2 100644 --- a/Demo/DemoListViewController.swift +++ b/Demo/DemoListViewController.swift @@ -88,6 +88,8 @@ class DemoListViewController: UITableViewController, NohanaImagePickerController handler(false) case .authorized: handler(true) + default: + break } } diff --git a/NohanaImagePicker/AssetDetailListViewController.swift b/NohanaImagePicker/AssetDetailListViewController.swift old mode 100644 new mode 100755 index 06cd7e3..036c9df --- a/NohanaImagePicker/AssetDetailListViewController.swift +++ b/NohanaImagePicker/AssetDetailListViewController.swift @@ -26,6 +26,7 @@ class AssetDetailListViewController: AssetListViewController { } } + @IBOutlet weak var imageCollectionView: UICollectionView! @IBOutlet weak var pickButton: UIButton! override var cellSize: CGSize { @@ -37,7 +38,9 @@ class AssetDetailListViewController: AssetListViewController { if let nohanaImagePickerController = nohanaImagePickerController { let droppedImage: UIImage? = nohanaImagePickerController.config.image.droppedLarge ?? UIImage(named: "btn_select_l", in: nohanaImagePickerController.assetBundle, compatibleWith: nil) let pickedImage: UIImage? = nohanaImagePickerController.config.image.pickedLarge ?? UIImage(named: "btn_selected_l", in: nohanaImagePickerController.assetBundle, compatibleWith: nil) + let backgroundColor: UIColor = nohanaImagePickerController.config.color.background ?? .white + imageCollectionView.backgroundColor = backgroundColor pickButton.setImage(droppedImage, for: UIControl.State()) pickButton.setImage(pickedImage, for: .selected) } diff --git a/NohanaImagePicker/AssetListViewController.swift b/NohanaImagePicker/AssetListViewController.swift index 8b71c3a..5d128a7 100644 --- a/NohanaImagePicker/AssetListViewController.swift +++ b/NohanaImagePicker/AssetListViewController.swift @@ -38,7 +38,7 @@ class AssetListViewController: UICollectionViewController, UICollectionViewDeleg if UIApplication.shared.statusBarOrientation.isPortrait { numberOfColumns = nohanaImagePickerController.numberOfColumnsInPortrait } - let cellMargin: CGFloat = 2 + let cellMargin: CGFloat = 1 let cellWidth = (view.frame.width - cellMargin * (CGFloat(numberOfColumns) - 1)) / CGFloat(numberOfColumns) return CGSize(width: cellWidth, height: cellWidth) } diff --git a/NohanaImagePicker/ExpandingAnimationController.swift b/NohanaImagePicker/ExpandingAnimationController.swift old mode 100644 new mode 100755 index 0482be5..1b36547 --- a/NohanaImagePicker/ExpandingAnimationController.swift +++ b/NohanaImagePicker/ExpandingAnimationController.swift @@ -56,7 +56,7 @@ class ExpandingAnimationController: NSObject, UIViewControllerAnimatedTransition transitionContext.containerView.addSubview(expandingImageView) toVC.view.alpha = 0 toVC.collectionView?.isHidden = true - toVC.view.backgroundColor = UIColor.black + toVC.view.backgroundColor = .white fromCell.alpha = 0 UIView.animate( diff --git a/NohanaImagePicker/NohanaImagePicker.storyboard b/NohanaImagePicker/NohanaImagePicker.storyboard index 729c97b..fba370e 100644 --- a/NohanaImagePicker/NohanaImagePicker.storyboard +++ b/NohanaImagePicker/NohanaImagePicker.storyboard @@ -1,19 +1,18 @@ - + - - + - + @@ -23,18 +22,18 @@ - + - +