diff --git a/CTAssetsPickerController.podspec b/CTAssetsPickerController.podspec index 36f1daa9..9ab9dfbf 100644 --- a/CTAssetsPickerController.podspec +++ b/CTAssetsPickerController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'CTAssetsPickerController' - spec.version = '3.0.4' + spec.version = '3.1.0' spec.summary = 'iOS control that allows picking multiple photos and videos from user\'s photo library.' spec.description = <<-DESC @@ -17,11 +17,11 @@ Pod::Spec.new do |spec| spec.social_media_url = 'https://twitter.com/chiunam' spec.platform = :ios, '8.0' spec.ios.deployment_target = '8.0' - spec.source = { :git => 'https://github.com/chiunam/CTAssetsPickerController.git', :tag => 'v3.0.4' } + spec.source = { :git => 'https://github.com/chiunam/CTAssetsPickerController.git', :tag => 'v3.1.0' } spec.public_header_files = 'CTAssetsPickerController/*.h' spec.source_files = 'CTAssetsPickerController/**/*.{h,m}' spec.resource_bundles = { 'CTAssetsPickerController' => ['CTAssetsPickerController/Resources/CTAssetsPicker.xcassets/*/*.png', 'CTAssetsPickerController/Resources/*.lproj'] } spec.ios.frameworks = 'Photos' spec.requires_arc = true - spec.dependency 'PureLayout', '~> 2.0.0' + spec.dependency 'PureLayout', '~> 3.0.0' end diff --git a/CTAssetsPickerController/CTAssetCheckmark.m b/CTAssetsPickerController/CTAssetCheckmark.m index dfd93b6c..e6e19a6d 100644 --- a/CTAssetsPickerController/CTAssetCheckmark.m +++ b/CTAssetsPickerController/CTAssetCheckmark.m @@ -80,7 +80,7 @@ - (void)updateConstraints { CGSize size = [UIImage ctassetsPickerImageNamed:@"CheckmarkShadow"].size; - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [self autoSetDimensionsToSize:size]; }]; diff --git a/CTAssetsPickerController/CTAssetCollectionViewCell.m b/CTAssetsPickerController/CTAssetCollectionViewCell.m index 50a59c99..e06b2dcb 100644 --- a/CTAssetsPickerController/CTAssetCollectionViewCell.m +++ b/CTAssetsPickerController/CTAssetCollectionViewCell.m @@ -229,11 +229,11 @@ - (void)updateConstraints CGFloat top = self.thumbnailStacks.edgeInsets.top; size.height += top; - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [self.thumbnailStacks autoSetDimensionsToSize:size]; }]; - [UIView autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ [self.thumbnailStacks autoPinEdgesToSuperviewMarginsExcludingEdge:ALEdgeTrailing]; }]; diff --git a/CTAssetsPickerController/CTAssetPlayButton.m b/CTAssetsPickerController/CTAssetPlayButton.m index 1a67593e..bb7f4975 100644 --- a/CTAssetsPickerController/CTAssetPlayButton.m +++ b/CTAssetsPickerController/CTAssetPlayButton.m @@ -152,7 +152,7 @@ - (void)updateConstraints { CGSize size = [UIImage ctassetsPickerImageNamed:@"VideoPlayButtonMask"].size; - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [self autoSetDimensionsToSize:size]; }]; diff --git a/CTAssetsPickerController/CTAssetScrollView.m b/CTAssetsPickerController/CTAssetScrollView.m index 6e439601..6696b177 100644 --- a/CTAssetsPickerController/CTAssetScrollView.m +++ b/CTAssetsPickerController/CTAssetScrollView.m @@ -160,13 +160,13 @@ - (void)updateSelectionButtonIfNeeded - (void)updateProgressConstraints { - [UIView autoSetPriority:UILayoutPriorityDefaultLow forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultLow forConstraints:^{ [self.progressView autoConstrainAttribute:ALAttributeLeading toAttribute:ALAttributeLeading ofView:self.superview withMultiplier:1 relation:NSLayoutRelationEqual]; [self.progressView autoConstrainAttribute:ALAttributeTrailing toAttribute:ALAttributeTrailing ofView:self.superview withMultiplier:1 relation:NSLayoutRelationEqual]; [self.progressView autoConstrainAttribute:ALAttributeBottom toAttribute:ALAttributeBottom ofView:self.superview withMultiplier:1 relation:NSLayoutRelationEqual]; }]; - [UIView autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ [self.progressView autoConstrainAttribute:ALAttributeLeading toAttribute:ALAttributeLeading ofView:self.imageView withMultiplier:1 relation:NSLayoutRelationGreaterThanOrEqual]; [self.progressView autoConstrainAttribute:ALAttributeTrailing toAttribute:ALAttributeTrailing ofView:self.imageView withMultiplier:1 relation:NSLayoutRelationLessThanOrEqual]; [self.progressView autoConstrainAttribute:ALAttributeBottom toAttribute:ALAttributeBottom ofView:self.imageView withMultiplier:1 relation:NSLayoutRelationLessThanOrEqual]; @@ -184,12 +184,12 @@ - (void)updateButtonsConstraints [self.playButton autoAlignAxis:ALAxisVertical toSameAxisOfView:self.superview]; [self.playButton autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.superview]; - [UIView autoSetPriority:UILayoutPriorityDefaultLow forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultLow forConstraints:^{ [self.selectionButton autoConstrainAttribute:ALAttributeTrailing toAttribute:ALAttributeTrailing ofView:self.superview withOffset:-self.layoutMargins.right relation:NSLayoutRelationEqual]; [self.selectionButton autoConstrainAttribute:ALAttributeBottom toAttribute:ALAttributeBottom ofView:self.superview withOffset:-self.layoutMargins.bottom relation:NSLayoutRelationEqual]; }]; - [UIView autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ [self.selectionButton autoConstrainAttribute:ALAttributeTrailing toAttribute:ALAttributeTrailing ofView:self.imageView withOffset:-self.layoutMargins.right relation:NSLayoutRelationLessThanOrEqual]; [self.selectionButton autoConstrainAttribute:ALAttributeBottom toAttribute:ALAttributeBottom ofView:self.imageView withOffset:-self.layoutMargins.bottom relation:NSLayoutRelationLessThanOrEqual]; }]; diff --git a/CTAssetsPickerController/CTAssetSelectionButton.m b/CTAssetsPickerController/CTAssetSelectionButton.m index de37f129..5b138dce 100644 --- a/CTAssetsPickerController/CTAssetSelectionButton.m +++ b/CTAssetsPickerController/CTAssetSelectionButton.m @@ -95,7 +95,7 @@ - (void)updateConstraints { CGSize size = [UIImage ctassetsPickerImageNamed:@"CheckmarkUnselected"].size; - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [self autoSetDimensionsToSize:size]; }]; diff --git a/CTAssetsPickerController/CTAssetThumbnailStacks.m b/CTAssetsPickerController/CTAssetThumbnailStacks.m index 7cecf7c9..bd0f019c 100644 --- a/CTAssetsPickerController/CTAssetThumbnailStacks.m +++ b/CTAssetsPickerController/CTAssetThumbnailStacks.m @@ -110,11 +110,11 @@ - (void)updateConstraints CGFloat inset = (index * delta * 3); - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [thumbnailView autoSetDimensionsToSize:size]; }]; - [UIView autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityDefaultHigh forConstraints:^{ [thumbnailView autoAlignAxisToSuperviewAxis:ALAxisVertical]; [thumbnailView autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:inset]; }]; diff --git a/CTAssetsPickerController/CTAssetsGridViewCell.m b/CTAssetsPickerController/CTAssetsGridViewCell.m index 5aba005d..95b21ef7 100644 --- a/CTAssetsPickerController/CTAssetsGridViewCell.m +++ b/CTAssetsPickerController/CTAssetsGridViewCell.m @@ -138,7 +138,7 @@ - (void)updateConstraints { if (!self.didSetupConstraints) { - [UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{ + [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{ [self.backgroundView autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsZero]; [self.disabledView autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsZero]; [self.highlightedView autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsZero]; diff --git a/CTAssetsPickerDemo.xcodeproj/project.pbxproj b/CTAssetsPickerDemo.xcodeproj/project.pbxproj index 41ac9bc9..d899071b 100644 --- a/CTAssetsPickerDemo.xcodeproj/project.pbxproj +++ b/CTAssetsPickerDemo.xcodeproj/project.pbxproj @@ -82,9 +82,9 @@ AD6CDA481AC55BEE008C6AC2 /* UICollectionView+CTAssetsPickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+CTAssetsPickerController.h"; sourceTree = ""; }; AD6CDA491AC55BEE008C6AC2 /* UICollectionView+CTAssetsPickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UICollectionView+CTAssetsPickerController.m"; sourceTree = ""; }; AD716C401AB81E78007F7A4C /* CTAssetThumbnailStacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetThumbnailStacks.h; sourceTree = ""; }; - AD716C411AB81E78007F7A4C /* CTAssetThumbnailStacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetThumbnailStacks.m; sourceTree = ""; }; + AD716C411AB81E78007F7A4C /* CTAssetThumbnailStacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetThumbnailStacks.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; AD9BB2481B295EE2001F9809 /* CTAssetCheckmark.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCheckmark.h; sourceTree = ""; }; - AD9BB2491B295EE2001F9809 /* CTAssetCheckmark.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCheckmark.m; sourceTree = ""; }; + AD9BB2491B295EE2001F9809 /* CTAssetCheckmark.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetCheckmark.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADA073021B45118F009FB7C7 /* CTMaxSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTMaxSelectionViewController.h; sourceTree = ""; }; ADA073031B45118F009FB7C7 /* CTMaxSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTMaxSelectionViewController.m; sourceTree = ""; }; ADA073051B4515AF009FB7C7 /* CTPhotosViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTPhotosViewController.h; sourceTree = ""; }; @@ -96,9 +96,9 @@ ADA0730E1B462C98009FB7C7 /* CTLastWeekViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTLastWeekViewController.h; sourceTree = ""; }; ADA0730F1B462C98009FB7C7 /* CTLastWeekViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTLastWeekViewController.m; sourceTree = ""; }; ADB628801B258708005E9932 /* CTAssetPlayButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetPlayButton.h; sourceTree = ""; }; - ADB628811B258708005E9932 /* CTAssetPlayButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetPlayButton.m; sourceTree = ""; }; + ADB628811B258708005E9932 /* CTAssetPlayButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetPlayButton.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADC0FAD81BB5015800C049EE /* CTAssetSelectionButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTAssetSelectionButton.h; sourceTree = ""; }; - ADC0FAD91BB5015800C049EE /* CTAssetSelectionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTAssetSelectionButton.m; sourceTree = ""; }; + ADC0FAD91BB5015800C049EE /* CTAssetSelectionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetSelectionButton.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADD965C61AAD4C49002A26A2 /* CTAssetsPickerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CTAssetsPickerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; ADD965CA1AAD4C49002A26A2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; ADD965CB1AAD4C49002A26A2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -117,9 +117,9 @@ ADD966021AAD5780002A26A2 /* CTAssetItemViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetItemViewController.h; sourceTree = ""; }; ADD966031AAD5780002A26A2 /* CTAssetItemViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetItemViewController.m; sourceTree = ""; }; ADD966041AAD5780002A26A2 /* CTAssetScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetScrollView.h; sourceTree = ""; }; - ADD966051AAD5780002A26A2 /* CTAssetScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetScrollView.m; sourceTree = ""; }; + ADD966051AAD5780002A26A2 /* CTAssetScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetScrollView.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADD966061AAD5780002A26A2 /* CTAssetCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCollectionViewCell.h; sourceTree = ""; }; - ADD966071AAD5780002A26A2 /* CTAssetCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCollectionViewCell.m; sourceTree = ""; }; + ADD966071AAD5780002A26A2 /* CTAssetCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetCollectionViewCell.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADD966081AAD5780002A26A2 /* CTAssetCollectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCollectionViewController.h; sourceTree = ""; }; ADD966091AAD5780002A26A2 /* CTAssetCollectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCollectionViewController.m; sourceTree = ""; }; ADD9660A1AAD5780002A26A2 /* CTAssetsPageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsPageViewController.h; sourceTree = ""; }; @@ -130,7 +130,7 @@ ADD9660F1AAD5780002A26A2 /* CTAssetsGridViewFooter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewFooter.h; sourceTree = ""; }; ADD966101AAD5780002A26A2 /* CTAssetsGridViewFooter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewFooter.m; sourceTree = ""; }; ADD966111AAD5780002A26A2 /* CTAssetsGridViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewCell.h; sourceTree = ""; }; - ADD966121AAD5780002A26A2 /* CTAssetsGridViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewCell.m; sourceTree = ""; }; + ADD966121AAD5780002A26A2 /* CTAssetsGridViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetsGridViewCell.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; ADD966131AAD5780002A26A2 /* CTAssetsGridViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewController.h; sourceTree = ""; }; ADD966141AAD5780002A26A2 /* CTAssetsGridViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewController.m; sourceTree = ""; }; ADD966151AAD5780002A26A2 /* CTAssetsViewControllerTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsViewControllerTransition.h; sourceTree = ""; };