Skip to content

Commit

Permalink
#159 Update to PureLayout v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
1and2papa committed Oct 12, 2015
1 parent 528a95a commit 36425bd
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions 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
Expand All @@ -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
2 changes: 1 addition & 1 deletion CTAssetsPickerController/CTAssetCheckmark.m
Expand Up @@ -80,7 +80,7 @@ - (void)updateConstraints
{
CGSize size = [UIImage ctassetsPickerImageNamed:@"CheckmarkShadow"].size;

[UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[self autoSetDimensionsToSize:size];
}];

Expand Down
4 changes: 2 additions & 2 deletions CTAssetsPickerController/CTAssetCollectionViewCell.m
Expand Up @@ -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];
}];

Expand Down
2 changes: 1 addition & 1 deletion CTAssetsPickerController/CTAssetPlayButton.m
Expand Up @@ -152,7 +152,7 @@ - (void)updateConstraints
{
CGSize size = [UIImage ctassetsPickerImageNamed:@"VideoPlayButtonMask"].size;

[UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[self autoSetDimensionsToSize:size];
}];

Expand Down
8 changes: 4 additions & 4 deletions CTAssetsPickerController/CTAssetScrollView.m
Expand Up @@ -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];
Expand All @@ -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];
}];
Expand Down
2 changes: 1 addition & 1 deletion CTAssetsPickerController/CTAssetSelectionButton.m
Expand Up @@ -95,7 +95,7 @@ - (void)updateConstraints
{
CGSize size = [UIImage ctassetsPickerImageNamed:@"CheckmarkUnselected"].size;

[UIView autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired forConstraints:^{
[self autoSetDimensionsToSize:size];
}];

Expand Down
4 changes: 2 additions & 2 deletions CTAssetsPickerController/CTAssetThumbnailStacks.m
Expand Up @@ -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];
}];
Expand Down
2 changes: 1 addition & 1 deletion CTAssetsPickerController/CTAssetsGridViewCell.m
Expand Up @@ -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];
Expand Down
14 changes: 7 additions & 7 deletions CTAssetsPickerDemo.xcodeproj/project.pbxproj
Expand Up @@ -82,9 +82,9 @@
AD6CDA481AC55BEE008C6AC2 /* UICollectionView+CTAssetsPickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+CTAssetsPickerController.h"; sourceTree = "<group>"; };
AD6CDA491AC55BEE008C6AC2 /* UICollectionView+CTAssetsPickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UICollectionView+CTAssetsPickerController.m"; sourceTree = "<group>"; };
AD716C401AB81E78007F7A4C /* CTAssetThumbnailStacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetThumbnailStacks.h; sourceTree = "<group>"; };
AD716C411AB81E78007F7A4C /* CTAssetThumbnailStacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetThumbnailStacks.m; sourceTree = "<group>"; };
AD716C411AB81E78007F7A4C /* CTAssetThumbnailStacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetThumbnailStacks.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
AD9BB2481B295EE2001F9809 /* CTAssetCheckmark.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCheckmark.h; sourceTree = "<group>"; };
AD9BB2491B295EE2001F9809 /* CTAssetCheckmark.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCheckmark.m; sourceTree = "<group>"; };
AD9BB2491B295EE2001F9809 /* CTAssetCheckmark.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetCheckmark.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
ADA073021B45118F009FB7C7 /* CTMaxSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTMaxSelectionViewController.h; sourceTree = "<group>"; };
ADA073031B45118F009FB7C7 /* CTMaxSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTMaxSelectionViewController.m; sourceTree = "<group>"; };
ADA073051B4515AF009FB7C7 /* CTPhotosViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTPhotosViewController.h; sourceTree = "<group>"; };
Expand All @@ -96,9 +96,9 @@
ADA0730E1B462C98009FB7C7 /* CTLastWeekViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTLastWeekViewController.h; sourceTree = "<group>"; };
ADA0730F1B462C98009FB7C7 /* CTLastWeekViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTLastWeekViewController.m; sourceTree = "<group>"; };
ADB628801B258708005E9932 /* CTAssetPlayButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetPlayButton.h; sourceTree = "<group>"; };
ADB628811B258708005E9932 /* CTAssetPlayButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetPlayButton.m; sourceTree = "<group>"; };
ADB628811B258708005E9932 /* CTAssetPlayButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetPlayButton.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
ADC0FAD81BB5015800C049EE /* CTAssetSelectionButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTAssetSelectionButton.h; sourceTree = "<group>"; };
ADC0FAD91BB5015800C049EE /* CTAssetSelectionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTAssetSelectionButton.m; sourceTree = "<group>"; };
ADC0FAD91BB5015800C049EE /* CTAssetSelectionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetSelectionButton.m; sourceTree = "<group>"; 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 = "<group>"; };
ADD965CB1AAD4C49002A26A2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand All @@ -117,9 +117,9 @@
ADD966021AAD5780002A26A2 /* CTAssetItemViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetItemViewController.h; sourceTree = "<group>"; };
ADD966031AAD5780002A26A2 /* CTAssetItemViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetItemViewController.m; sourceTree = "<group>"; };
ADD966041AAD5780002A26A2 /* CTAssetScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetScrollView.h; sourceTree = "<group>"; };
ADD966051AAD5780002A26A2 /* CTAssetScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetScrollView.m; sourceTree = "<group>"; };
ADD966051AAD5780002A26A2 /* CTAssetScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetScrollView.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
ADD966061AAD5780002A26A2 /* CTAssetCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCollectionViewCell.h; sourceTree = "<group>"; };
ADD966071AAD5780002A26A2 /* CTAssetCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCollectionViewCell.m; sourceTree = "<group>"; };
ADD966071AAD5780002A26A2 /* CTAssetCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetCollectionViewCell.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
ADD966081AAD5780002A26A2 /* CTAssetCollectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetCollectionViewController.h; sourceTree = "<group>"; };
ADD966091AAD5780002A26A2 /* CTAssetCollectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetCollectionViewController.m; sourceTree = "<group>"; };
ADD9660A1AAD5780002A26A2 /* CTAssetsPageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsPageViewController.h; sourceTree = "<group>"; };
Expand All @@ -130,7 +130,7 @@
ADD9660F1AAD5780002A26A2 /* CTAssetsGridViewFooter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewFooter.h; sourceTree = "<group>"; };
ADD966101AAD5780002A26A2 /* CTAssetsGridViewFooter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewFooter.m; sourceTree = "<group>"; };
ADD966111AAD5780002A26A2 /* CTAssetsGridViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewCell.h; sourceTree = "<group>"; };
ADD966121AAD5780002A26A2 /* CTAssetsGridViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewCell.m; sourceTree = "<group>"; };
ADD966121AAD5780002A26A2 /* CTAssetsGridViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CTAssetsGridViewCell.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
ADD966131AAD5780002A26A2 /* CTAssetsGridViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsGridViewController.h; sourceTree = "<group>"; };
ADD966141AAD5780002A26A2 /* CTAssetsGridViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAssetsGridViewController.m; sourceTree = "<group>"; };
ADD966151AAD5780002A26A2 /* CTAssetsViewControllerTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAssetsViewControllerTransition.h; sourceTree = "<group>"; };
Expand Down

0 comments on commit 36425bd

Please sign in to comment.