Compare commits
16 Commits
fix/build-
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
52716045fc | |
|
|
2bcf6d33df | |
|
|
c19996eddb | |
|
|
42e4b4fcf3 | |
|
|
9362d7ebd1 | |
|
|
324f4bf207 | |
|
|
f39a38a615 | |
|
|
5c7102fad6 | |
|
|
f44c660e17 | |
|
|
f86c28822b | |
|
|
51e3c6c870 | |
|
|
78a1861f04 | |
|
|
7160ddb436 | |
|
|
d28c68a2c2 | |
|
|
4334d458eb | |
|
|
60216c5f90 |
|
|
@ -1 +1 @@
|
|||
4.0
|
||||
4.2
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@
|
|||
"idiom" : "ipad",
|
||||
"filename" : "167.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ class DemoListViewController: UITableViewController, NohanaImagePickerController
|
|||
handler(false)
|
||||
case .authorized:
|
||||
handler(true)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'NohanaImagePicker'
|
||||
s.version = '0.9.0'
|
||||
s.version = '0.9.3'
|
||||
s.summary = 'A multiple image picker for iOS app.'
|
||||
s.homepage = 'https://github.com/nohana/NohanaImagePicker'
|
||||
s.homepage = 'https://github.com/TouchInstinct/NohanaImagePicker'
|
||||
s.license = { :type => 'Apache License v2', :file => 'LICENSE' }
|
||||
s.author = { 'nohana' => 'development@nohana.co.jp' }
|
||||
s.source = { :git => 'https://github.com/nohana/NohanaImagePicker.git', :tag => s.version.to_s }
|
||||
s.source = {
|
||||
:git => 'https://github.com/TouchInstinct/NohanaImagePicker.git',
|
||||
:tag => s.version.to_s }
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.source_files = 'NohanaImagePicker/*.swift'
|
||||
s.resource_bundles = {
|
||||
'NohanaImagePicker' => ['NohanaImagePicker/*.{xcassets,storyboard,lproj}']
|
||||
'NohanaImagePicker' => ['NohanaImagePicker/**/*.{xcassets,storyboard,lproj}', "Resources/NohanaImagePicker.storyboard"]
|
||||
}
|
||||
s.frameworks = 'UIKit', 'Photos'
|
||||
end
|
||||
end
|
||||
|
|
@ -70,6 +70,7 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
23D1CD93207CEB1200F8115E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/NohanaImagePicker.strings; sourceTree = "<group>"; };
|
||||
3569CAA61EC1918E000C41C0 /* NohanaImagePicker.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = NohanaImagePicker.xcassets; sourceTree = "<group>"; };
|
||||
3590F1F51EC1A79400F32E06 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/NohanaImagePicker.strings; sourceTree = "<group>"; };
|
||||
F202573B1C7418920069B33A /* PickedAssetList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PickedAssetList.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -313,7 +314,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0720;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 1000;
|
||||
ORGANIZATIONNAME = nohana;
|
||||
TargetAttributes = {
|
||||
F208E5501CD7370B00FFC9F6 = {
|
||||
|
|
@ -335,6 +336,7 @@
|
|||
Base,
|
||||
ja,
|
||||
ru,
|
||||
de,
|
||||
);
|
||||
mainGroup = F2C08D6A1C68651900B00181;
|
||||
productRefGroup = F2C08D751C68651900B00181 /* Products */;
|
||||
|
|
@ -445,6 +447,7 @@
|
|||
F27029CC1C71C43A001647AB /* en */,
|
||||
F27029CF1C71C4FE001647AB /* ja */,
|
||||
3590F1F51EC1A79400F32E06 /* ru */,
|
||||
23D1CD93207CEB1200F8115E /* de */,
|
||||
);
|
||||
name = NohanaImagePicker.strings;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -495,12 +498,14 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
|
|
@ -553,12 +558,14 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
|
|
@ -610,7 +617,7 @@
|
|||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
|
@ -631,7 +638,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1000"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
|
|
@ -56,7 +55,6 @@
|
|||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
|
|
|||
|
|
@ -23,22 +23,22 @@ class AlbumListEmptyIndicator: UILabel {
|
|||
centerStyle.alignment = NSTextAlignment.center
|
||||
|
||||
let messageAttributes = [
|
||||
NSAttributedStringKey.foregroundColor : config.color.empty ?? UIColor(red: 0x88/0xff, green: 0x88/0xff, blue: 0x88/0xff, alpha: 1),
|
||||
NSAttributedStringKey.font : UIFont.systemFont(ofSize: 26),
|
||||
NSAttributedStringKey.paragraphStyle : centerStyle
|
||||
NSAttributedString.Key.foregroundColor : config.color.empty ?? UIColor(red: 0x88/0xff, green: 0x88/0xff, blue: 0x88/0xff, alpha: 1),
|
||||
NSAttributedString.Key.font : UIFont.systemFont(ofSize: 26),
|
||||
NSAttributedString.Key.paragraphStyle : centerStyle
|
||||
]
|
||||
let messageText = NSAttributedString(string: message, attributes: messageAttributes)
|
||||
|
||||
let descriptionAttributes = [
|
||||
NSAttributedStringKey.foregroundColor : config.color.empty ?? UIColor(red: 0x88/0xff, green: 0x88/0xff, blue: 0x88/0xff, alpha: 1),
|
||||
NSAttributedStringKey.font : UIFont.systemFont(ofSize: 14),
|
||||
NSAttributedStringKey.paragraphStyle : centerStyle
|
||||
NSAttributedString.Key.foregroundColor : config.color.empty ?? UIColor(red: 0x88/0xff, green: 0x88/0xff, blue: 0x88/0xff, alpha: 1),
|
||||
NSAttributedString.Key.font : UIFont.systemFont(ofSize: 14),
|
||||
NSAttributedString.Key.paragraphStyle : centerStyle
|
||||
]
|
||||
let descriptionText = NSAttributedString(string: description, attributes: descriptionAttributes)
|
||||
|
||||
let attributedText = NSMutableAttributedString()
|
||||
attributedText.append(messageText)
|
||||
attributedText.append(NSAttributedString(string: "\n\n", attributes: [NSAttributedStringKey.font : UIFont.systemFont(ofSize: 6)]))
|
||||
attributedText.append(NSAttributedString(string: "\n\n", attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 6)]))
|
||||
attributedText.append(descriptionText)
|
||||
|
||||
self.numberOfLines = 0
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class AlbumListViewController: UITableViewController, EmptyIndicatable, Activity
|
|||
var isLoading = true
|
||||
|
||||
func setUpActivityIndicator() {
|
||||
activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray)
|
||||
activityIndicator = UIActivityIndicatorView(style: .gray)
|
||||
let screenRect = Size.screenRectWithoutAppBar(self)
|
||||
activityIndicator?.center = CGPoint(x: screenRect.size.width / 2, y: screenRect.size.height / 2)
|
||||
activityIndicator?.startAnimating()
|
||||
|
|
@ -261,7 +261,7 @@ extension UIViewController {
|
|||
|
||||
let infoButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
|
||||
infoButton.isEnabled = false
|
||||
infoButton.setTitleTextAttributes([NSAttributedStringKey.font: UIFont.systemFont(ofSize: 14), NSAttributedStringKey.foregroundColor: UIColor.black], for: UIControlState())
|
||||
infoButton.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), NSAttributedString.Key.foregroundColor: UIColor.black], for: UIControl.State())
|
||||
self.toolbarItems = [leftSpace, infoButton, rightSpace]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class AnimatableNavigationController: UINavigationController, UINavigationContro
|
|||
self.delegate = self
|
||||
}
|
||||
|
||||
func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
|
||||
func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
|
||||
|
||||
switch operation {
|
||||
case .push where fromVC is AssetListViewController:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class AssetCell: UICollectionViewCell {
|
|||
let droppedImage: UIImage? = nohanaImagePickerController.config.image.droppedSmall ?? UIImage(named: "btn_select_m", in: nohanaImagePickerController.assetBundle, compatibleWith: nil)
|
||||
let pickedImage: UIImage? = nohanaImagePickerController.config.image.pickedSmall ?? UIImage(named: "btn_selected_m", in: nohanaImagePickerController.assetBundle, compatibleWith: nil)
|
||||
|
||||
pickButton.setImage(droppedImage, for: UIControlState())
|
||||
pickButton.setImage(droppedImage, for: UIControl.State())
|
||||
pickButton.setImage(pickedImage, for: .selected)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class AssetDetailListViewController: AssetListViewController {
|
|||
}
|
||||
}
|
||||
|
||||
@IBOutlet weak var imageCollectionView: UICollectionView!
|
||||
@IBOutlet weak var pickButton: UIButton!
|
||||
|
||||
override var cellSize: CGSize {
|
||||
|
|
@ -37,8 +38,10 @@ 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
|
||||
|
||||
pickButton.setImage(droppedImage, for: UIControlState())
|
||||
imageCollectionView.backgroundColor = backgroundColor
|
||||
pickButton.setImage(droppedImage, for: UIControl.State())
|
||||
pickButton.setImage(pickedImage, for: .selected)
|
||||
}
|
||||
}
|
||||
|
|
@ -76,7 +79,7 @@ class AssetDetailListViewController: AssetListViewController {
|
|||
}
|
||||
DispatchQueue.main.async {
|
||||
let toIndexPath = IndexPath(item: indexPath.item, section: 0)
|
||||
self.collectionView?.scrollToItem(at: toIndexPath, at: UICollectionViewScrollPosition.centeredHorizontally, animated: false)
|
||||
self.collectionView?.scrollToItem(at: toIndexPath, at: UICollectionView.ScrollPosition.centeredHorizontally, animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ class AssetListViewController: UICollectionViewController, UICollectionViewDeleg
|
|||
return CGSize.zero
|
||||
}
|
||||
var numberOfColumns = nohanaImagePickerController.numberOfColumnsInLandscape
|
||||
if UIInterfaceOrientationIsPortrait(UIApplication.shared.statusBarOrientation) {
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class ContractingAnimationController: NSObject, UIViewControllerAnimatedTransiti
|
|||
UIView.animate(
|
||||
withDuration: transitionDuration(using: transitionContext),
|
||||
delay: 0,
|
||||
options: UIViewAnimationOptions(),
|
||||
options: UIView.AnimationOptions(),
|
||||
animations: {
|
||||
toVC.view.alpha = 1
|
||||
contractingImageView.frame = Size.contractingAnimationToCellRect(toVC, toCell: toCell)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class MomentViewController: AssetListViewController, ActivityIndicatable {
|
|||
|
||||
override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
|
||||
switch kind {
|
||||
case UICollectionElementKindSectionHeader:
|
||||
case UICollectionView.elementKindSectionHeader:
|
||||
let album = momentAlbumList[indexPath.section]
|
||||
guard let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "MomentHeader", for: indexPath) as? MomentSectionHeaderView else {
|
||||
fatalError("failed to create MomentHeader")
|
||||
|
|
@ -125,7 +125,7 @@ class MomentViewController: AssetListViewController, ActivityIndicatable {
|
|||
var isLoading = true
|
||||
|
||||
func setUpActivityIndicator() {
|
||||
activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray)
|
||||
activityIndicator = UIActivityIndicatorView(style: .gray)
|
||||
let screenRect = Size.screenRectWithoutAppBar(self)
|
||||
activityIndicator?.center = CGPoint(x: screenRect.size.width / 2, y: screenRect.size.height / 2)
|
||||
activityIndicator?.startAnimating()
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_0" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Album List View Controller-->
|
||||
<scene sceneID="q2I-uS-c5w">
|
||||
<objects>
|
||||
<tableViewController id="KD8-91-yw0" customClass="AlbumListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableViewController storyboardIdentifier="AlbumListViewController" id="KD8-91-yw0" customClass="AlbumListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="Nh8-55-S0b">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
|
@ -23,18 +22,18 @@
|
|||
<rect key="frame" x="0.0" y="28" width="320" height="82"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="HiQ-6b-xqZ" id="Nuf-ja-Ajg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="82"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="286" height="82"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Igm-UH-WUI">
|
||||
<rect key="frame" x="12" y="6" width="70" height="70"/>
|
||||
<rect key="frame" x="20" y="6" width="70" height="70"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="70" id="Vc2-EG-fnZ"/>
|
||||
<constraint firstAttribute="height" constant="70" id="xiw-gz-cfn"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Album Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YSz-MM-h6f">
|
||||
<rect key="frame" x="100" y="31.5" width="187" height="19.5"/>
|
||||
<rect key="frame" x="108" y="31.5" width="178" height="19.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
|
@ -59,11 +58,11 @@
|
|||
<rect key="frame" x="0.0" y="110" width="320" height="52"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="URZ-ke-kYw" id="ZzC-oj-tew">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="52"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="286" height="52"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Moment Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nzC-P1-sBf">
|
||||
<rect key="frame" x="16" y="18" width="271" height="16"/>
|
||||
<rect key="frame" x="24" y="18" width="262" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="tPC-2Q-2pd"/>
|
||||
</constraints>
|
||||
|
|
@ -107,38 +106,40 @@
|
|||
<!--Asset List View Controller-->
|
||||
<scene sceneID="29G-N1-dd5">
|
||||
<objects>
|
||||
<collectionViewController id="5jk-x3-LYk" customClass="AssetListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionViewController storyboardIdentifier="AssetListViewController" id="5jk-x3-LYk" customClass="AssetListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="cLH-x9-2VN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="2" minimumInteritemSpacing="2" id="xXL-vg-bZb">
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="1" minimumInteritemSpacing="1" id="xXL-vg-bZb">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="44" height="44"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="8" maxX="0.0" maxY="2"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="AssetCell" id="gNu-ad-t1d" customClass="AssetCell" customModule="NohanaImagePicker" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="8" width="78" height="78"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="78" height="78"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="78" height="78"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WKb-lP-sq5">
|
||||
<rect key="frame" x="-8" y="-8" width="94" height="94"/>
|
||||
<rect key="frame" x="0.0" y="20" width="78" height="58"/>
|
||||
</imageView>
|
||||
<view hidden="YES" alpha="0.29999999999999999" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MT5-kg-1gq">
|
||||
<rect key="frame" x="-8" y="-8" width="94" height="94"/>
|
||||
<rect key="frame" x="0.0" y="20" width="78" height="58"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oDB-be-mWY">
|
||||
<rect key="frame" x="42" y="-8" width="44" height="44"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="bottom" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oDB-be-mWY">
|
||||
<rect key="frame" x="26" y="26" width="44" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="44" id="7Yd-sj-A9c"/>
|
||||
<constraint firstAttribute="height" constant="44" id="Biw-rC-p8x"/>
|
||||
</constraints>
|
||||
<state key="normal" image="btn_select_m"/>
|
||||
<connections>
|
||||
<action selector="didPushPickButton:" destination="gNu-ad-t1d" eventType="touchUpInside" id="gAj-yS-7xL"/>
|
||||
</connections>
|
||||
|
|
@ -146,15 +147,15 @@
|
|||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="oDB-be-mWY" secondAttribute="trailing" constant="-8" id="0u6-oO-0PG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oDB-be-mWY" secondAttribute="trailing" constant="8" id="0u6-oO-0PG"/>
|
||||
<constraint firstItem="WKb-lP-sq5" firstAttribute="leading" secondItem="gNu-ad-t1d" secondAttribute="leadingMargin" constant="-8" id="Gen-Gr-Deg"/>
|
||||
<constraint firstItem="oDB-be-mWY" firstAttribute="top" secondItem="gNu-ad-t1d" secondAttribute="topMargin" constant="-8" id="HMs-XU-000"/>
|
||||
<constraint firstItem="MT5-kg-1gq" firstAttribute="top" secondItem="gNu-ad-t1d" secondAttribute="topMargin" constant="-8" id="ISy-ev-P19"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="WKb-lP-sq5" secondAttribute="bottom" constant="-8" id="Lnf-5f-guH"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="MT5-kg-1gq" secondAttribute="trailing" constant="-8" id="QL8-B4-uFE"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="MT5-kg-1gq" secondAttribute="bottom" constant="-8" id="RNL-zl-et0"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="WKb-lP-sq5" secondAttribute="trailing" constant="-8" id="TF3-Wc-2HZ"/>
|
||||
<constraint firstItem="MT5-kg-1gq" firstAttribute="leading" secondItem="gNu-ad-t1d" secondAttribute="leadingMargin" constant="-8" id="afC-Dk-wv1"/>
|
||||
<constraint firstAttribute="bottom" secondItem="oDB-be-mWY" secondAttribute="bottom" constant="8" id="hKA-oO-Fmk"/>
|
||||
<constraint firstItem="WKb-lP-sq5" firstAttribute="top" secondItem="gNu-ad-t1d" secondAttribute="topMargin" constant="-8" id="l0l-Ge-QIn"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="78" height="78"/>
|
||||
|
|
@ -167,7 +168,7 @@
|
|||
</collectionViewCell>
|
||||
</cells>
|
||||
<collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="AssetListFooter" id="N6q-ob-hkI">
|
||||
<rect key="frame" x="0.0" y="88" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="78" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</collectionReusableView>
|
||||
<connections>
|
||||
|
|
@ -192,7 +193,7 @@
|
|||
<!--Asset Detail List View Controller-->
|
||||
<scene sceneID="jjo-0p-7dH">
|
||||
<objects>
|
||||
<collectionViewController id="r7t-t8-AuE" customClass="AssetDetailListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionViewController storyboardIdentifier="AssetDetailListViewController" id="r7t-t8-AuE" customClass="AssetDetailListViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" dataMode="prototypes" id="wIU-KV-n3W">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
|
@ -211,7 +212,7 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" maximumZoomScale="3" translatesAutoresizingMaskIntoConstraints="NO" id="hM8-Xr-3HX">
|
||||
<rect key="frame" x="-8" y="-8" width="336" height="336"/>
|
||||
<rect key="frame" x="0.0" y="20" width="320" height="300"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Jr7-IN-pxL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="320"/>
|
||||
|
|
@ -268,6 +269,7 @@
|
|||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="320" height="568"/>
|
||||
<connections>
|
||||
<outlet property="imageCollectionView" destination="wIU-KV-n3W" id="9kr-es-gvr"/>
|
||||
<outlet property="pickButton" destination="c4C-Sf-Krj" id="Bam-Wm-TRa"/>
|
||||
</connections>
|
||||
</collectionViewController>
|
||||
|
|
@ -316,7 +318,7 @@
|
|||
<!--Moment View Controller-->
|
||||
<scene sceneID="kJ6-NP-kmc">
|
||||
<objects>
|
||||
<collectionViewController id="FOz-K3-QuR" customClass="MomentViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionViewController storyboardIdentifier="MomentViewController" id="FOz-K3-QuR" customClass="MomentViewController" customModule="NohanaImagePicker" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="J9r-MB-y52">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
|
@ -336,14 +338,14 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TB3-Xf-nik">
|
||||
<rect key="frame" x="-8" y="-8" width="94" height="94"/>
|
||||
<rect key="frame" x="0.0" y="20" width="78" height="58"/>
|
||||
</imageView>
|
||||
<view hidden="YES" alpha="0.30000001192092896" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SnZ-bd-Zia">
|
||||
<rect key="frame" x="-8" y="-8" width="94" height="94"/>
|
||||
<rect key="frame" x="0.0" y="20" width="78" height="58"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vrt-tc-b54">
|
||||
<rect key="frame" x="42" y="-8" width="44" height="44"/>
|
||||
<rect key="frame" x="34" y="26" width="44" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="44" id="BX8-gP-86t"/>
|
||||
<constraint firstAttribute="height" constant="44" id="RUG-gG-ieX"/>
|
||||
|
|
@ -357,7 +359,6 @@
|
|||
<constraints>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="SnZ-bd-Zia" secondAttribute="bottom" constant="-8" id="1hA-eS-4fw"/>
|
||||
<constraint firstItem="SnZ-bd-Zia" firstAttribute="leading" secondItem="hn9-bM-eId" secondAttribute="leadingMargin" constant="-8" id="57F-oY-ykD"/>
|
||||
<constraint firstItem="vrt-tc-b54" firstAttribute="top" secondItem="hn9-bM-eId" secondAttribute="topMargin" constant="-8" id="Djb-rK-T7y"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="vrt-tc-b54" secondAttribute="trailing" constant="-8" id="KEs-ry-rwP"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="TB3-Xf-nik" secondAttribute="trailing" constant="-8" id="XM8-uU-hsZ"/>
|
||||
<constraint firstItem="TB3-Xf-nik" firstAttribute="top" secondItem="hn9-bM-eId" secondAttribute="topMargin" constant="-8" id="avn-LP-mMH"/>
|
||||
|
|
@ -365,6 +366,7 @@
|
|||
<constraint firstAttribute="trailingMargin" secondItem="SnZ-bd-Zia" secondAttribute="trailing" constant="-8" id="kX3-02-UOR"/>
|
||||
<constraint firstItem="SnZ-bd-Zia" firstAttribute="top" secondItem="hn9-bM-eId" secondAttribute="topMargin" constant="-8" id="vZV-H0-2Fs"/>
|
||||
<constraint firstItem="TB3-Xf-nik" firstAttribute="leading" secondItem="hn9-bM-eId" secondAttribute="leadingMargin" constant="-8" id="wGD-kd-Ibg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="vrt-tc-b54" secondAttribute="bottom" constant="8" id="z5g-3Q-yNU"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="78" height="78"/>
|
||||
<connections>
|
||||
|
|
@ -380,7 +382,7 @@
|
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aNJ-Oh-VhZ">
|
||||
<rect key="frame" x="4" y="13" width="120" height="17"/>
|
||||
<rect key="frame" x="12" y="13.5" width="120" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="21" id="KSm-hH-VZX"/>
|
||||
<constraint firstAttribute="width" constant="120" id="QzC-0j-DZA"/>
|
||||
|
|
@ -395,7 +397,7 @@
|
|||
</variation>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Location" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Aa-PA-AHS">
|
||||
<rect key="frame" x="124" y="15.5" width="192" height="14.5"/>
|
||||
<rect key="frame" x="132" y="15" width="176" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
|
@ -441,8 +443,11 @@
|
|||
<point key="canvasLocation" x="1751" y="965"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="btn_select_m" width="44" height="44"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="vma-iJ-kti"/>
|
||||
<segue reference="Bed-w3-B1Q"/>
|
||||
<segue reference="tQI-o9-h2w"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ open class NohanaImagePickerController: UIViewController {
|
|||
guard let navigationController = storyboard.instantiateViewController(withIdentifier: viewControllerId) as? UINavigationController else {
|
||||
fatalError("navigationController init failed.")
|
||||
}
|
||||
addChildViewController(navigationController)
|
||||
addChild(navigationController)
|
||||
view.addSubview(navigationController.view)
|
||||
navigationController.didMove(toParentViewController: self)
|
||||
navigationController.didMove(toParent: self)
|
||||
|
||||
// setup albumListViewController
|
||||
guard let albumListViewController = navigationController.topViewController as? AlbumListViewController else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import Photos
|
|||
open class PhotoKitAssetList: ItemList {
|
||||
|
||||
fileprivate let mediaType: MediaType
|
||||
open let assetList: PHAssetCollection
|
||||
public let assetList: PHAssetCollection
|
||||
fileprivate var fetchResult: PHFetchResult<PHAsset>!
|
||||
|
||||
init(album: PHAssetCollection, mediaType: MediaType) {
|
||||
|
|
|
|||
|
|
@ -42,8 +42,20 @@ struct Size {
|
|||
}
|
||||
|
||||
static func screenRectWithoutAppBar(_ viewController: UIViewController) -> CGRect {
|
||||
let appBarHeight = Size.appBarHeight(viewController)
|
||||
let toolbarHeight = Size.toolbarHeight(viewController)
|
||||
let appBarHeight: CGFloat = {
|
||||
if #available(iOS 11.0, *) {
|
||||
return viewController.view.safeAreaInsets.top
|
||||
} else {
|
||||
return Size.appBarHeight(viewController)
|
||||
}
|
||||
}()
|
||||
let toolbarHeight: CGFloat = {
|
||||
if #available(iOS 11.0, *) {
|
||||
return viewController.view.safeAreaInsets.bottom
|
||||
} else {
|
||||
return Size.toolbarHeight(viewController)
|
||||
}
|
||||
}()
|
||||
return CGRect(
|
||||
x: 0,
|
||||
y: appBarHeight,
|
||||
|
|
|
|||
|
|
@ -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" = "Fotos";
|
||||
"albumlist.empty.message" = "Keine Fotos";
|
||||
"albumlist.empty.description" = "Nimm Fotos mit der Kamera App auf.";
|
||||
"albumlist.moment.title" = "Moment";
|
||||
"toolbar.title.nolimit" = "Ausgewählte Fotos: %ld";
|
||||
"toolbar.title.haslimit" = "Ausgewählte Fotos: %ld / %ld";
|
||||
21
README.md
21
README.md
|
|
@ -72,7 +72,7 @@ picker.canPickAsset = { (asset:Asset) -> Bool in
|
|||
|
||||
## Installation
|
||||
|
||||
### Carthage (preferable)
|
||||
### Carthage
|
||||
|
||||
Use [Carthage](https://github.com/Carthage/Carthage).
|
||||
|
||||
|
|
@ -81,23 +81,12 @@ Use [Carthage](https://github.com/Carthage/Carthage).
|
|||
- If you want to use Swift2.3, add `github "nohana/NohanaImagePicker", "0.6.1"` instead.
|
||||
- If you want to use Swift2.2, add `github "nohana/NohanaImagePicker", "0.5.0"` instead.
|
||||
- Run `carthage update`.
|
||||
- Add following lines to your Info.plist:
|
||||
|
||||
### Framework with CocoaPods
|
||||
|
||||
Use [CocoaPods](https://cocoapods.org/).
|
||||
|
||||
- Try; ``pod try NohanaImagePicker``
|
||||
|
||||
- Add the followings to your Podfile:
|
||||
|
||||
```ruby
|
||||
use_frameworks!
|
||||
pod "NohanaImagePicker"
|
||||
```
|
||||
|
||||
- If you want to use Swift2.3 write `pod "NohanaImagePicker", "0.6.1"` instead of `pod "NohanaImagePicker"`.
|
||||
|
||||
- Run `pod install`.
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>To pick some photos.</string>
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue