diff --git a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json index a324f8c..9dd60fd 100644 --- a/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -32,6 +42,16 @@ "filename" : "180.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", diff --git a/Demo/DemoListViewController.swift b/Demo/DemoListViewController.swift index 93bae8b..3af643a 100644 --- a/Demo/DemoListViewController.swift +++ b/Demo/DemoListViewController.swift @@ -29,6 +29,7 @@ class DemoListViewController: UITableViewController, NohanaImagePickerController Cell(title: "Large thumbnail", selector: #selector(DemoListViewController.showLargeThumbnailPicker)), Cell(title: "No toolbar", selector: #selector(DemoListViewController.showNoToolbarPicker)), Cell(title: "Disable to pick assets", selector: #selector(DemoListViewController.showDisableToPickAssetsPicker)), + Cell(title: "Custom UI", selector: #selector(DemoListViewController.showCustomUIPicker)), ] override func viewDidAppear(_ animated: Bool) { @@ -123,6 +124,15 @@ class DemoListViewController: UITableViewController, NohanaImagePickerController present(picker, animated: true, completion: nil) } + @objc + func showCustomUIPicker() { + let picker = NohanaImagePickerController() + picker.delegate = self + picker.assetBundle = Bundle.main + present(picker, animated: true, completion: nil) + } + + // MARK: - NohanaImagePickerControllerDelegate func nohanaImagePickerDidCancel(_ picker: NohanaImagePickerController) { diff --git a/NohanaImagePicker/Images.xcassets/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/Contents.json diff --git a/NohanaImagePicker/Images.xcassets/btn_select_l.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_l.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/Contents.json diff --git a/NohanaImagePicker/Images.xcassets/btn_select_l.imageset/btn_select_l@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_l.imageset/btn_select_l@2x.png rename to Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@2x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_select_l.imageset/btn_select_l@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_l.imageset/btn_select_l@3x.png rename to Demo/Resources/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@3x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_select_m.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_m.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/Contents.json diff --git a/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@2x.png new file mode 100644 index 0000000..48313b8 Binary files /dev/null and b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@2x.png differ diff --git a/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@3x.png new file mode 100644 index 0000000..d80368e Binary files /dev/null and b/Demo/Resources/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@3x.png differ diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/Contents.json diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png rename to Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png rename to Demo/Resources/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/Contents.json diff --git a/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png new file mode 100644 index 0000000..418c397 Binary files /dev/null and b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png differ diff --git a/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png new file mode 100644 index 0000000..1a45974 Binary files /dev/null and b/Demo/Resources/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png differ diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/Contents.json diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/Contents.json b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/Contents.json similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/Contents.json rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/Contents.json diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png diff --git a/NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png b/Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png rename to Demo/Resources/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png diff --git a/Demo/Resources/en.lproj/NohanaImagePicker.strings b/Demo/Resources/en.lproj/NohanaImagePicker.strings new file mode 100644 index 0000000..3ff0f81 --- /dev/null +++ b/Demo/Resources/en.lproj/NohanaImagePicker.strings @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2016 nohana, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +"albumlist.title" = "Photos📗"; +"albumlist.empty.message" = "No Photos🤔"; +"albumlist.empty.description" = "Take some photos with Camera app."; +"albumlist.moment.title" = "Moment"; +"toolbar.title.nolimit" = "Selected : %ld"; +"toolbar.title.haslimit" = "Selected Items: %ld / %ld"; diff --git a/Demo/Resources/ja.lproj/NohanaImagePicker.strings b/Demo/Resources/ja.lproj/NohanaImagePicker.strings new file mode 100644 index 0000000..3e058d9 --- /dev/null +++ b/Demo/Resources/ja.lproj/NohanaImagePicker.strings @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2016 nohana, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +"albumlist.title" = "アルバム📗"; +"albumlist.empty.message" = "アルバムに\n写真がありません🤔"; +"albumlist.empty.description" = "カメラで写真を撮影しましょう"; +"albumlist.moment.title" = "日付から選択"; +"toolbar.title.nolimit" = "%ld枚選択中"; +"toolbar.title.haslimit" = "%ld枚選択中(最大%ld枚)"; diff --git a/NohanaImagePicker.xcodeproj/project.pbxproj b/NohanaImagePicker.xcodeproj/project.pbxproj index 5acaff1..06e21bc 100644 --- a/NohanaImagePicker.xcodeproj/project.pbxproj +++ b/NohanaImagePicker.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 3569CAA81EC1918E000C41C0 /* NohanaImagePicker.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3569CAA41EC1918E000C41C0 /* NohanaImagePicker.strings */; }; + 3569CAA91EC1918E000C41C0 /* NohanaImagePicker.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3569CAA61EC1918E000C41C0 /* NohanaImagePicker.xcassets */; }; F202573A1C7343D20069B33A /* ImageName.swift in Sources */ = {isa = PBXBuildFile; fileRef = F20257391C7343D20069B33A /* ImageName.swift */; }; F202573C1C7418920069B33A /* PickedAssetList.swift in Sources */ = {isa = PBXBuildFile; fileRef = F202573B1C7418920069B33A /* PickedAssetList.swift */; }; F208E5541CD7370B00FFC9F6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F208E5531CD7370B00FFC9F6 /* AppDelegate.swift */; }; @@ -21,7 +23,7 @@ F218D7DE1C6C3A5B001FCED1 /* AlbumCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F218D7DD1C6C3A5B001FCED1 /* AlbumCell.swift */; }; F23554261C69D19C00796DCA /* NohanaImagePicker.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F23554251C69D19C00796DCA /* NohanaImagePicker.storyboard */; }; F23554281C69D5DB00796DCA /* NohanaImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F23554271C69D5DB00796DCA /* NohanaImagePickerController.swift */; }; - F237249B1C6DCF96005D1E8A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F237249A1C6DCF96005D1E8A /* Images.xcassets */; }; + F237249B1C6DCF96005D1E8A /* NohanaImagePicker.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F237249A1C6DCF96005D1E8A /* NohanaImagePicker.xcassets */; }; F23CC89E1CB745C800BCE443 /* ActivityIndicatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F23CC89D1CB745C800BCE443 /* ActivityIndicatable.swift */; }; F24EB6901C68AEED0002EC86 /* AlbumListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F24EB68F1C68AEED0002EC86 /* AlbumListViewController.swift */; }; F25C10C21C8ED9BF007453C3 /* MomentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F25C10C11C8ED9BF007453C3 /* MomentViewController.swift */; }; @@ -71,6 +73,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 3569CAA51EC1918E000C41C0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/NohanaImagePicker.strings; sourceTree = ""; }; + 3569CAA61EC1918E000C41C0 /* NohanaImagePicker.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = NohanaImagePicker.xcassets; sourceTree = ""; }; + 3569CAA71EC1918E000C41C0 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/NohanaImagePicker.strings; sourceTree = ""; }; F20257391C7343D20069B33A /* ImageName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageName.swift; sourceTree = ""; }; F202573B1C7418920069B33A /* PickedAssetList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PickedAssetList.swift; sourceTree = ""; }; F208E5511CD7370B00FFC9F6 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -85,7 +90,7 @@ F218D7DD1C6C3A5B001FCED1 /* AlbumCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumCell.swift; sourceTree = ""; }; F23554251C69D19C00796DCA /* NohanaImagePicker.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NohanaImagePicker.storyboard; sourceTree = ""; }; F23554271C69D5DB00796DCA /* NohanaImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NohanaImagePickerController.swift; sourceTree = ""; }; - F237249A1C6DCF96005D1E8A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + F237249A1C6DCF96005D1E8A /* NohanaImagePicker.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = NohanaImagePicker.xcassets; sourceTree = ""; }; F23CC89D1CB745C800BCE443 /* ActivityIndicatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityIndicatable.swift; sourceTree = ""; }; F24EB68F1C68AEED0002EC86 /* AlbumListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlbumListViewController.swift; sourceTree = ""; }; F25C10C11C8ED9BF007453C3 /* MomentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MomentViewController.swift; sourceTree = ""; }; @@ -132,9 +137,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3569CAA31EC1918E000C41C0 /* Resources */ = { + isa = PBXGroup; + children = ( + 3569CAA41EC1918E000C41C0 /* NohanaImagePicker.strings */, + 3569CAA61EC1918E000C41C0 /* NohanaImagePicker.xcassets */, + ); + path = Resources; + sourceTree = ""; + }; F208E5521CD7370B00FFC9F6 /* Demo */ = { isa = PBXGroup; children = ( + 3569CAA31EC1918E000C41C0 /* Resources */, F208E5531CD7370B00FFC9F6 /* AppDelegate.swift */, F208E5681CD738CD00FFC9F6 /* DemoListViewController.swift */, F208E5571CD7370B00FFC9F6 /* Main.storyboard */, @@ -163,7 +178,7 @@ children = ( F23554251C69D19C00796DCA /* NohanaImagePicker.storyboard */, F27029CD1C71C43A001647AB /* NohanaImagePicker.strings */, - F237249A1C6DCF96005D1E8A /* Images.xcassets */, + F237249A1C6DCF96005D1E8A /* NohanaImagePicker.xcassets */, ); name = Resources; sourceTree = ""; @@ -346,8 +361,10 @@ buildActionMask = 2147483647; files = ( F208E55E1CD7370B00FFC9F6 /* LaunchScreen.storyboard in Resources */, + 3569CAA91EC1918E000C41C0 /* NohanaImagePicker.xcassets in Resources */, F208E55B1CD7370B00FFC9F6 /* Assets.xcassets in Resources */, F208E5591CD7370B00FFC9F6 /* Main.storyboard in Resources */, + 3569CAA81EC1918E000C41C0 /* NohanaImagePicker.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -357,7 +374,7 @@ files = ( F23554261C69D19C00796DCA /* NohanaImagePicker.storyboard in Resources */, F27029CB1C71C43A001647AB /* NohanaImagePicker.strings in Resources */, - F237249B1C6DCF96005D1E8A /* Images.xcassets in Resources */, + F237249B1C6DCF96005D1E8A /* NohanaImagePicker.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -417,6 +434,15 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 3569CAA41EC1918E000C41C0 /* NohanaImagePicker.strings */ = { + isa = PBXVariantGroup; + children = ( + 3569CAA51EC1918E000C41C0 /* en */, + 3569CAA71EC1918E000C41C0 /* ja */, + ); + name = NohanaImagePicker.strings; + sourceTree = ""; + }; F208E5571CD7370B00FFC9F6 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/Contents.json new file mode 100644 index 0000000..5e4b2c9 --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "btn_select_l@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "btn_select_l@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@2x.png new file mode 100644 index 0000000..3d1cb81 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@2x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@3x.png new file mode 100644 index 0000000..706f1f9 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_l.imageset/btn_select_l@3x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/Contents.json new file mode 100644 index 0000000..a4c6bec --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "btn_select_m@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "btn_select_m@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/Images.xcassets/btn_select_m.imageset/btn_select_m@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_m.imageset/btn_select_m@2x.png rename to NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@2x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_select_m.imageset/btn_select_m@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_select_m.imageset/btn_select_m@3x.png rename to NohanaImagePicker/NohanaImagePicker.xcassets/btn_select_m.imageset/btn_select_m@3x.png diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/Contents.json new file mode 100644 index 0000000..8d2c67f --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "btn_selected_l@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "btn_selected_l@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png new file mode 100644 index 0000000..f5c27b9 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@2x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png new file mode 100644 index 0000000..3430330 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_l.imageset/btn_selected_l@3x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/Contents.json new file mode 100644 index 0000000..307b92b --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "btn_selected_m@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "btn_selected_m@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png rename to NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@2x.png diff --git a/NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png similarity index 100% rename from NohanaImagePicker/Images.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png rename to NohanaImagePicker/NohanaImagePicker.xcassets/btn_selected_m.imageset/btn_selected_m@3x.png diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/Contents.json new file mode 100644 index 0000000..6f14b6e --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "icon_photosize_alert_s@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icon_photosize_alert_s@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png new file mode 100644 index 0000000..34f67ea Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@2x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png new file mode 100644 index 0000000..80f0203 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_alert_s.imageset/icon_photosize_alert_s@3x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/Contents.json b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/Contents.json new file mode 100644 index 0000000..e884163 --- /dev/null +++ b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "icon_photosize_low_s@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icon_photosize_low_s@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png new file mode 100644 index 0000000..e4fee63 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@2x.png differ diff --git a/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png new file mode 100644 index 0000000..68218a2 Binary files /dev/null and b/NohanaImagePicker/NohanaImagePicker.xcassets/icon_photosize_low_s.imageset/icon_photosize_low_s@3x.png differ diff --git a/NohanaImagePicker/NohanaImagePickerController.swift b/NohanaImagePicker/NohanaImagePickerController.swift index e679070..f7dc442 100644 --- a/NohanaImagePicker/NohanaImagePickerController.swift +++ b/NohanaImagePicker/NohanaImagePickerController.swift @@ -49,7 +49,7 @@ open class NohanaImagePickerController: UIViewController { open var canPickAsset = { (asset:Asset) -> Bool in return true } - lazy var assetBundle:Bundle = { + open lazy var assetBundle:Bundle = { let bundle = Bundle(for: type(of: self)) if let path = bundle.path(forResource: "NohanaImagePicker", ofType: "bundle") { return Bundle(path: path)! @@ -99,7 +99,7 @@ open class NohanaImagePickerController: UIViewController { super.viewDidLoad() // show albumListViewController - let storyboard = UIStoryboard(name: "NohanaImagePicker", bundle: assetBundle) + let storyboard = UIStoryboard(name: "NohanaImagePicker", bundle: Bundle(for: type(of: self))) let viewControllerId = enableExpandingPhotoAnimation ? "EnableAnimationNavigationController" : "DisableAnimationNavigationController" guard let navigationController = storyboard.instantiateViewController(withIdentifier: viewControllerId) as? UINavigationController else { fatalError("navigationController init failed.")