Repository: SnapKit/Masonry Branch: master Commit: 8bd77ea92bbe Files: 221 Total size: 577.0 KB Directory structure: gitextract_pa1zs8l1/ ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CodeSnippets/ │ ├── Masonry Constraint Make.codesnippet │ ├── Masonry Constraint Remake.codesnippet │ └── Masonry Constraint Update.codesnippet ├── Examples/ │ ├── Masonry iOS Examples/ │ │ ├── Images.xcassets/ │ │ │ └── Contents.json │ │ ├── Launch Screen.storyboard │ │ ├── MASAppDelegate.h │ │ ├── MASAppDelegate.m │ │ ├── MASExampleAnimatedView.h │ │ ├── MASExampleAnimatedView.m │ │ ├── MASExampleArrayView.h │ │ ├── MASExampleArrayView.m │ │ ├── MASExampleAspectFitView.h │ │ ├── MASExampleAspectFitView.m │ │ ├── MASExampleAttributeChainingView.h │ │ ├── MASExampleAttributeChainingView.m │ │ ├── MASExampleBasicView.h │ │ ├── MASExampleBasicView.m │ │ ├── MASExampleConstantsView.h │ │ ├── MASExampleConstantsView.m │ │ ├── MASExampleDebuggingView.h │ │ ├── MASExampleDebuggingView.m │ │ ├── MASExampleDistributeView.h │ │ ├── MASExampleDistributeView.m │ │ ├── MASExampleLabelView.h │ │ ├── MASExampleLabelView.m │ │ ├── MASExampleLayoutGuideViewController.h │ │ ├── MASExampleLayoutGuideViewController.m │ │ ├── MASExampleListViewController.h │ │ ├── MASExampleListViewController.m │ │ ├── MASExampleMarginView.h │ │ ├── MASExampleMarginView.m │ │ ├── MASExampleRemakeView.h │ │ ├── MASExampleRemakeView.m │ │ ├── MASExampleSafeAreaLayoutGuideViewController.h │ │ ├── MASExampleSafeAreaLayoutGuideViewController.m │ │ ├── MASExampleScrollView.h │ │ ├── MASExampleScrollView.m │ │ ├── MASExampleSidesView.h │ │ ├── MASExampleSidesView.m │ │ ├── MASExampleUpdateView.h │ │ ├── MASExampleUpdateView.m │ │ ├── MASExampleViewController.h │ │ ├── MASExampleViewController.m │ │ ├── Masonry iOS Examples-Info.plist │ │ ├── Masonry iOS Examples-Prefix.pch │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ └── Masonry iOS Examples.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── xcshareddata/ │ └── xcschemes/ │ └── Masonry iOS Examples.xcscheme ├── ISSUE_TEMPLATE.md ├── LICENSE ├── Masonry/ │ ├── Info.plist │ ├── MASCompositeConstraint.h │ ├── MASCompositeConstraint.m │ ├── MASConstraint+Private.h │ ├── MASConstraint.h │ ├── MASConstraint.m │ ├── MASConstraintMaker.h │ ├── MASConstraintMaker.m │ ├── MASLayoutConstraint.h │ ├── MASLayoutConstraint.m │ ├── MASUtilities.h │ ├── MASViewAttribute.h │ ├── MASViewAttribute.m │ ├── MASViewConstraint.h │ ├── MASViewConstraint.m │ ├── Masonry.h │ ├── NSArray+MASAdditions.h │ ├── NSArray+MASAdditions.m │ ├── NSArray+MASShorthandAdditions.h │ ├── NSLayoutConstraint+MASDebugAdditions.h │ ├── NSLayoutConstraint+MASDebugAdditions.m │ ├── View+MASAdditions.h │ ├── View+MASAdditions.m │ ├── View+MASShorthandAdditions.h │ ├── ViewController+MASAdditions.h │ └── ViewController+MASAdditions.m ├── Masonry.podspec ├── Masonry.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── Masonry.xccheckout │ └── xcshareddata/ │ └── xcschemes/ │ ├── Masonry OSX.xcscheme │ └── Masonry iOS.xcscheme ├── Masonry.xcworkspace/ │ └── contents.xcworkspacedata ├── Podfile ├── Pods/ │ ├── Expecta/ │ │ ├── Expecta/ │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── EXPBlockDefinedMatcher.m │ │ │ ├── EXPDefines.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── EXPDoubleTuple.m │ │ │ ├── EXPExpect.h │ │ │ ├── EXPExpect.m │ │ │ ├── EXPFloatTuple.h │ │ │ ├── EXPFloatTuple.m │ │ │ ├── EXPMatcher.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── EXPUnsupportedObject.m │ │ │ ├── Expecta.h │ │ │ ├── ExpectaObject.h │ │ │ ├── ExpectaObject.m │ │ │ ├── ExpectaSupport.h │ │ │ ├── ExpectaSupport.m │ │ │ ├── Matchers/ │ │ │ │ ├── EXPMatcherHelpers.h │ │ │ │ ├── EXPMatcherHelpers.m │ │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ │ ├── EXPMatchers+beCloseTo.m │ │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ │ ├── EXPMatchers+beFalsy.m │ │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ │ ├── EXPMatchers+beGreaterThan.m │ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m │ │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ │ ├── EXPMatchers+beIdenticalTo.m │ │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ │ ├── EXPMatchers+beInTheRangeOf.m │ │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ │ ├── EXPMatchers+beInstanceOf.m │ │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ │ ├── EXPMatchers+beKindOf.m │ │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ │ ├── EXPMatchers+beLessThan.m │ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m │ │ │ │ ├── EXPMatchers+beNil.h │ │ │ │ ├── EXPMatchers+beNil.m │ │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ │ ├── EXPMatchers+beSubclassOf.m │ │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ │ ├── EXPMatchers+beSupersetOf.m │ │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ │ ├── EXPMatchers+beTruthy.m │ │ │ │ ├── EXPMatchers+beginWith.h │ │ │ │ ├── EXPMatchers+beginWith.m │ │ │ │ ├── EXPMatchers+conformTo.h │ │ │ │ ├── EXPMatchers+conformTo.m │ │ │ │ ├── EXPMatchers+contain.h │ │ │ │ ├── EXPMatchers+contain.m │ │ │ │ ├── EXPMatchers+endWith.h │ │ │ │ ├── EXPMatchers+endWith.m │ │ │ │ ├── EXPMatchers+equal.h │ │ │ │ ├── EXPMatchers+equal.m │ │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ │ ├── EXPMatchers+haveCountOf.m │ │ │ │ ├── EXPMatchers+match.h │ │ │ │ ├── EXPMatchers+match.m │ │ │ │ ├── EXPMatchers+postNotification.h │ │ │ │ ├── EXPMatchers+postNotification.m │ │ │ │ ├── EXPMatchers+raise.h │ │ │ │ ├── EXPMatchers+raise.m │ │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ │ ├── EXPMatchers+raiseWithReason.m │ │ │ │ ├── EXPMatchers+respondTo.h │ │ │ │ ├── EXPMatchers+respondTo.m │ │ │ │ └── EXPMatchers.h │ │ │ ├── NSObject+Expecta.h │ │ │ ├── NSValue+Expecta.h │ │ │ └── NSValue+Expecta.m │ │ ├── LICENSE │ │ └── README.md │ ├── Local Podspecs/ │ │ └── Masonry.podspec.json │ ├── Pods.xcodeproj/ │ │ └── project.pbxproj │ └── Target Support Files/ │ ├── Expecta/ │ │ ├── Expecta-dummy.m │ │ ├── Expecta-prefix.pch │ │ └── Expecta.xcconfig │ ├── Masonry/ │ │ ├── Masonry-dummy.m │ │ ├── Masonry-prefix.pch │ │ └── Masonry.xcconfig │ ├── Pods-Masonry iOS Examples/ │ │ ├── Pods-Masonry iOS Examples-acknowledgements.markdown │ │ ├── Pods-Masonry iOS Examples-acknowledgements.plist │ │ ├── Pods-Masonry iOS Examples-dummy.m │ │ ├── Pods-Masonry iOS Examples-frameworks.sh │ │ ├── Pods-Masonry iOS Examples-resources.sh │ │ ├── Pods-Masonry iOS Examples.debug.xcconfig │ │ └── Pods-Masonry iOS Examples.release.xcconfig │ ├── Pods-Masonry iOS Tests/ │ │ ├── Pods-Masonry iOS Tests-acknowledgements.markdown │ │ ├── Pods-Masonry iOS Tests-acknowledgements.plist │ │ ├── Pods-Masonry iOS Tests-dummy.m │ │ ├── Pods-Masonry iOS Tests-frameworks.sh │ │ ├── Pods-Masonry iOS Tests-resources.sh │ │ ├── Pods-Masonry iOS Tests.debug.xcconfig │ │ └── Pods-Masonry iOS Tests.release.xcconfig │ └── Pods-MasonryTestsLoader/ │ ├── Pods-MasonryTestsLoader-acknowledgements.markdown │ ├── Pods-MasonryTestsLoader-acknowledgements.plist │ ├── Pods-MasonryTestsLoader-dummy.m │ ├── Pods-MasonryTestsLoader-frameworks.sh │ ├── Pods-MasonryTestsLoader-resources.sh │ ├── Pods-MasonryTestsLoader.debug.xcconfig │ └── Pods-MasonryTestsLoader.release.xcconfig ├── README.md ├── Tests/ │ ├── GcovTestObserver.m │ ├── Masonry Tests.xcodeproj/ │ │ ├── project.pbxproj │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ └── Masonry iOS Tests.xcscheme │ ├── MasonryTests-Info.plist │ ├── MasonryTests-Prefix.pch │ ├── MasonryTestsLoader/ │ │ ├── CASAppDelegate.h │ │ ├── CASAppDelegate.m │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage/ │ │ │ └── Contents.json │ │ ├── MasonryTestsLoader-Info.plist │ │ ├── MasonryTestsLoader-Prefix.pch │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ ├── NSObject+MASSubscriptSupport.h │ ├── Specs/ │ │ ├── MASCompositeConstraintSpec.m │ │ ├── MASConstraintDelegateMock.h │ │ ├── MASConstraintDelegateMock.m │ │ ├── MASConstraintMakerSpec.m │ │ ├── MASViewAttributeSpec.m │ │ ├── MASViewConstraintSpec.m │ │ ├── NSArray+MASAdditionsSpec.m │ │ ├── NSLayoutConstraint+MASDebugAdditionsSpec.m │ │ ├── View+MASAdditionsSpec.m │ │ └── ViewController+MASAdditionsSpec.m │ └── XCTest+Spec.h └── script/ ├── coveralls.sh └── exportenv.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode build/* *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata profile *.moved-aside # Desktop Servies .DS_Store script/env.sh DerivedData/ /Masonry.xcworkspace/xcshareddata/Masonry.xccheckout ================================================ FILE: .travis.yml ================================================ --- language: objective-c osx_image: xcode9 before_install: - sudo easy_install cpp-coveralls - gem install xcpretty -N - export LANG=en_US.UTF-8 script: - set -o pipefail - xcodebuild -workspace 'Masonry.xcworkspace' -scheme 'Masonry iOS Tests' -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.0' clean test ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c - xcodebuild -workspace 'Masonry.xcworkspace' -scheme 'Masonry iOS' -configuration Debug -sdk iphonesimulator clean build ARCHS=i386 VALID_ARCHS=i386 ONLY_ACTIVE_ARCH=NO | xcpretty -c - xcodebuild -workspace 'Masonry.xcworkspace' -scheme 'Masonry OSX' -configuration Debug clean build | xcpretty -c after_success: - ./script/coveralls.sh ================================================ FILE: CHANGELOG.md ================================================ v1.0.2 ====== * Bug fix for array greaterThanOrEqualTo or lessthanOrEqualTo attributes ([#377](https://github.com/SnapKit/Masonry/pull/377)) * Bug fix for Podfile so examples work again ([#374](https://github.com/SnapKit/Masonry/pull/374)) * Improve view distribution performance ([#374](https://github.com/SnapKit/Masonry/pull/362)) * Unshare pod schemes ([#374](https://github.com/SnapKit/Masonry/pull/352)) v1.0.1 ====== #### - Added support for first/last baselines Two additional attributes `NSLayoutAttributeFirstBaseline` and `NSLayoutAttributeLastBaseline` are now supported v1.0.0 ====== #### - Officially v1.0.0 Fixes some issues with install/uninstall vs activate/deactivate and modernises the project files v0.6.4 ====== #### - Add support for tvOS v0.6.3 ====== #### - Add support for view distribution ([pingyourid](https://github.com/pingyourid)) https://github.com/SnapKit/Masonry/pull/225 v0.6.2 ====== #### - Add support for iOS 8 margin attributes ([CraigSiemens](https://github.com/CraigSiemens)) https://github.com/SnapKit/Masonry/pull/163 #### - Add support for leading and trailing insets ([montehurd](https://github.com/montehurd)) https://github.com/SnapKit/Masonry/pull/168 #### - Add support for Cartage ([erichoracek](https://github.com/erichoracek)) https://github.com/SnapKit/Masonry/pull/182 #### - Fix memory usage of updateConstraints v0.6.1 ====== #### - Fix unused variable warning when compiled with NSAssert turned off #### - Add aspect fit example ([kouky](https://github.com/kouky)) https://github.com/SnapKit/Masonry/pull/148 v0.6.0 ====== #### - Improved support of iOS 8 As of iOS 8 there is `active` property of `NSLayoutConstraint` available, which allows to (de)activate constraint without searching closest common superview. #### - Added support of iPhone 6 and iPhone 6+ to test project v0.5.3 ====== #### - Fixed compilation errors on xcode6 beta https://github.com/Masonry/Masonry/pull/84 v0.5.2 ====== #### - Fixed compilation warning with Shorthand view Additions https://github.com/cloudkite/Masonry/issues/71 v0.5.1 ====== #### - Fixed compilation error when using objective-c++ ([nickynick](https://github.com/nickynick)) https://github.com/cloudkite/Masonry/pull/69 v0.5.0 ====== #### - Fixed bug in `mas_updateConstraints` ([Rolken](https://github.com/Rolken)) Was not checking that the constraint relation was equivalent https://github.com/cloudkite/Masonry/pull/65 #### - Added `mas_remakeConstraints` ([nickynick](https://github.com/nickynick)) Similar to `mas_updateConstraints` however instead of trying to update existing constraints it Removes all constraints previously defined and installed for the view, allowing you to provide replacements without hassle. https://github.com/cloudkite/Masonry/pull/63 #### - Added Autoboxing for scalar/struct attribute values ([nickynick](https://github.com/nickynick)) Autoboxing allows you to write equality relations and offsets by passing primitive values and structs ```obj-c make.top.mas_equalTo(42); make.height.mas_equalTo(20); make.size.mas_equalTo(CGSizeMake(50, 100)); make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0)); make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0)); ``` by default these autoboxing macros are prefix with `mas_` If you want the unprefixed version you need to add `MAS_SHORTHAND_GLOBALS` before importing Masonry.h (ie in your Prefix.pch) https://github.com/cloudkite/Masonry/pull/62 #### - Added ability to chain view attributes Composites are great for defining multiple attributes at once. The following example makes top, left, bottom, right equal to `superview`. ```obj-c make.edges.equalTo(superview).insets(padding); ``` However if only three of the sides are equal to `superview` then we need to repeat quite a bit of code ```obj-c make.left.equalTo(superview).insets(padding); make.right.equalTo(superview).insets(padding); make.bottom.equalTo(superview).insets(padding); // top needs to be equal to `otherView` make.top.equalTo(otherView).insets(padding); ``` This change makes it possible to chain view attributes to improve readability ```obj-c make.left.right.and.bottom.equalTo(superview).insets(padding); make.top.equalTo(otherView).insets(padding); ``` https://github.com/cloudkite/Masonry/pull/56 v0.4.0 ======= #### - Fixed Xcode auto-complete support ([nickynick](https://github.com/nickynick)) ***Breaking Changes*** If you are holding onto any instances of masonry constraints ie ```obj-c // in public/private interface @property (nonatomic, strong) id topConstraint; ``` You will need to change this to ```obj-c // in public/private interface @property (nonatomic, strong) MASConstraint *topConstraint; ``` Instead of using protocols Masonry now uses an abstract base class for constraints in order to get Xcode auto-complete support see http://stackoverflow.com/questions/14534223/ v0.3.2 ======= #### - Added support for Mac OSX animator proxy ([pfandrade](https://github.com/pfandrade)) ```objective-c self.leftConstraint.animator.offset(20); ``` #### - Added setter methods for NSLayoutConstraint constant proxies like `offset`, `centerOffset`, `insets`, `sizeOffset`. now you can update these values using more natural syntax ```objective-c self.edgesConstraint.insets(UIEdgeInsetsMake(20, 10, 15, 5)); ``` can now be written as: ```objective-c self.edgesConstraint.insets = UIEdgeInsetsMake(20, 10, 15, 5); ``` v0.3.1 ======= #### - Added way to specify the same set of constraints to multiple views in an array ([danielrhammond](https://github.com/danielrhammond)) ```objective-c [@[view1, view2, view3] mas_makeConstraints:^(MASConstraintMaker *make) { make.baseline.equalTo(superView.mas_centerY); make.width.equalTo(@100); }]; ``` v0.3.0 ======= #### - Added `- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block` which will update existing constraints if possible, otherwise it will add them. This makes it easier to use Masonry within the `UIView` `- (void)updateConstraints` method which is the recommended place for adding/updating constraints by apple. #### - Updated examples for iOS7, added a few new examples. #### - Added -isEqual: and -hash to MASViewAttribute [CraigSiemens]. ================================================ FILE: CodeSnippets/Masonry Constraint Make.codesnippet ================================================ IDECodeSnippetCompletionPrefix mas_make IDECodeSnippetCompletionScopes CodeBlock IDECodeSnippetContents [<#view#> mas_makeConstraints:^(MASConstraintMaker *make){ <#code#> }]; IDECodeSnippetIdentifier 4A0A057B-8C17-43BB-BDBA-3A315A942EF8 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetTitle Masonry Constraint Make IDECodeSnippetUserSnippet IDECodeSnippetVersion 2 ================================================ FILE: CodeSnippets/Masonry Constraint Remake.codesnippet ================================================ IDECodeSnippetCompletionPrefix mas_remake IDECodeSnippetCompletionScopes CodeBlock IDECodeSnippetContents [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make){ <#code#> }]; IDECodeSnippetIdentifier 53203A7C-0C2C-493C-9CAE-8900D9AB68A8 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetTitle Masonry Constraint Remake IDECodeSnippetUserSnippet IDECodeSnippetVersion 2 ================================================ FILE: CodeSnippets/Masonry Constraint Update.codesnippet ================================================ IDECodeSnippetCompletionPrefix mas_update IDECodeSnippetCompletionScopes CodeBlock IDECodeSnippetContents [<#view#> mas_updateConstraints:^(MASConstraintMaker *make){ <#code#> }]; IDECodeSnippetIdentifier CF088737-121D-4166-97B0-D8AB63696B08 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetTitle Masonry Constraint Update IDECodeSnippetUserSnippet IDECodeSnippetVersion 2 ================================================ FILE: Examples/Masonry iOS Examples/Images.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Examples/Masonry iOS Examples/Launch Screen.storyboard ================================================ ================================================ FILE: Examples/Masonry iOS Examples/MASAppDelegate.h ================================================ // // MASAppDelegate.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASAppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; @end ================================================ FILE: Examples/Masonry iOS Examples/MASAppDelegate.m ================================================ // // MASAppDelegate.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASAppDelegate.h" #import "MASExampleListViewController.h" @implementation MASAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; // Override point for customization after application launch. self.window.backgroundColor = UIColor.whiteColor; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:MASExampleListViewController.new]; self.window.rootViewController = navigationController; [self.window makeKeyAndVisible]; return YES; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAnimatedView.h ================================================ // // MASExampleAnimatedView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleAnimatedView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAnimatedView.m ================================================ // // MASExampleAnimatedView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleAnimatedView.h" @interface MASExampleAnimatedView () @property (nonatomic, strong) NSMutableArray *animatableConstraints; @property (nonatomic, assign) int padding; @property (nonatomic, assign) BOOL animating; @end @implementation MASExampleAnimatedView - (id)init { self = [super init]; if (!self) return nil; UIView *greenView = UIView.new; greenView.backgroundColor = UIColor.greenColor; greenView.layer.borderColor = UIColor.blackColor.CGColor; greenView.layer.borderWidth = 2; [self addSubview:greenView]; UIView *redView = UIView.new; redView.backgroundColor = UIColor.redColor; redView.layer.borderColor = UIColor.blackColor.CGColor; redView.layer.borderWidth = 2; [self addSubview:redView]; UIView *blueView = UIView.new; blueView.backgroundColor = UIColor.blueColor; blueView.layer.borderColor = UIColor.blackColor.CGColor; blueView.layer.borderWidth = 2; [self addSubview:blueView]; UIView *superview = self; int padding = self.padding = 10; UIEdgeInsets paddingInsets = UIEdgeInsetsMake(self.padding, self.padding, self.padding, self.padding); self.animatableConstraints = NSMutableArray.new; [greenView mas_makeConstraints:^(MASConstraintMaker *make) { [self.animatableConstraints addObjectsFromArray:@[ make.edges.equalTo(superview).insets(paddingInsets).priorityLow(), make.bottom.equalTo(blueView.mas_top).offset(-padding), ]]; make.size.equalTo(redView); make.height.equalTo(blueView.mas_height); }]; [redView mas_makeConstraints:^(MASConstraintMaker *make) { [self.animatableConstraints addObjectsFromArray:@[ make.edges.equalTo(superview).insets(paddingInsets).priorityLow(), make.left.equalTo(greenView.mas_right).offset(padding), make.bottom.equalTo(blueView.mas_top).offset(-padding), ]]; make.size.equalTo(greenView); make.height.equalTo(blueView.mas_height); }]; [blueView mas_makeConstraints:^(MASConstraintMaker *make) { [self.animatableConstraints addObjectsFromArray:@[ make.edges.equalTo(superview).insets(paddingInsets).priorityLow(), ]]; make.height.equalTo(greenView.mas_height); make.height.equalTo(redView.mas_height); }]; return self; } - (void)didMoveToWindow { [self layoutIfNeeded]; if (self.window) { self.animating = YES; [self animateWithInvertedInsets:NO]; } } - (void)willMoveToWindow:(UIWindow *)newWindow { self.animating = newWindow != nil; } - (void)animateWithInvertedInsets:(BOOL)invertedInsets { if (!self.animating) return; int padding = invertedInsets ? 100 : self.padding; UIEdgeInsets paddingInsets = UIEdgeInsetsMake(padding, padding, padding, padding); for (MASConstraint *constraint in self.animatableConstraints) { constraint.insets = paddingInsets; } [UIView animateWithDuration:1 animations:^{ [self layoutIfNeeded]; } completion:^(BOOL finished) { //repeat! [self animateWithInvertedInsets:!invertedInsets]; }]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleArrayView.h ================================================ // // MASExampleArrayView.h // Masonry iOS Examples // // Created by Daniel Hammond on 11/26/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleArrayView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleArrayView.m ================================================ // // MASExampleArrayView.m // Masonry iOS Examples // // Created by Daniel Hammond on 11/26/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleArrayView.h" static CGFloat const kArrayExampleIncrement = 10.0; @interface MASExampleArrayView () @property (nonatomic, assign) CGFloat offset; @property (nonatomic, strong) NSArray *buttonViews; @end @implementation MASExampleArrayView - (id)init { self = [super init]; if (!self) return nil; UIButton *raiseButton = [UIButton buttonWithType:UIButtonTypeSystem]; [raiseButton setTitle:@"Raise" forState:UIControlStateNormal]; [raiseButton addTarget:self action:@selector(raiseAction) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:raiseButton]; UIButton *centerButton = [UIButton buttonWithType:UIButtonTypeSystem]; [centerButton setTitle:@"Center" forState:UIControlStateNormal]; [centerButton addTarget:self action:@selector(centerAction) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:centerButton]; UIButton *lowerButton = [UIButton buttonWithType:UIButtonTypeSystem]; [lowerButton setTitle:@"Lower" forState:UIControlStateNormal]; [lowerButton addTarget:self action:@selector(lowerAction) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:lowerButton]; [lowerButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self).with.offset(10.0); }]; [centerButton mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self); }]; [raiseButton mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self).with.offset(-10); }]; self.buttonViews = @[ raiseButton, lowerButton, centerButton ]; return self; } - (void)centerAction { self.offset = 0.0; } - (void)raiseAction { self.offset -= kArrayExampleIncrement; } - (void)lowerAction { self.offset += kArrayExampleIncrement; } - (void)setOffset:(CGFloat)offset { _offset = offset; [self setNeedsUpdateConstraints]; } - (void)updateConstraints { [self.buttonViews updateConstraints:^(MASConstraintMaker *make) { make.baseline.equalTo(self.mas_centerY).with.offset(self.offset); }]; //according to apple super should be called at end of method [super updateConstraints]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAspectFitView.h ================================================ // // MASExampleAspectFitView.h // Masonry iOS Examples // // Created by Michael Koukoullis on 19/01/2015. // Copyright (c) 2015 Jonas Budelmann. All rights reserved. // #import @interface MASExampleAspectFitView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAspectFitView.m ================================================ // // MASExampleAspectFitView.m // Masonry iOS Examples // // Created by Michael Koukoullis on 19/01/2015. // Copyright (c) 2015 Jonas Budelmann. All rights reserved. // #import "MASExampleAspectFitView.h" @interface MASExampleAspectFitView () @property UIView *topView; @property UIView *topInnerView; @property UIView *bottomView; @property UIView *bottomInnerView; @end @implementation MASExampleAspectFitView // Designated initializer - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:CGRectZero]; if (self) { // Create views self.topView = [[UIView alloc] initWithFrame:CGRectZero]; self.topInnerView = [[UIView alloc] initWithFrame:CGRectZero]; self.bottomView = [[UIView alloc] initWithFrame:CGRectZero]; self.bottomInnerView = [[UIView alloc] initWithFrame:CGRectZero]; // Set background colors UIColor *blueColor = [UIColor colorWithRed:0.663 green:0.796 blue:0.996 alpha:1]; [self.topView setBackgroundColor:blueColor]; UIColor *lightGreenColor = [UIColor colorWithRed:0.784 green:0.992 blue:0.851 alpha:1]; [self.topInnerView setBackgroundColor:lightGreenColor]; UIColor *pinkColor = [UIColor colorWithRed:0.992 green:0.804 blue:0.941 alpha:1]; [self.bottomView setBackgroundColor:pinkColor]; UIColor *darkGreenColor = [UIColor colorWithRed:0.443 green:0.780 blue:0.337 alpha:1]; [self.bottomInnerView setBackgroundColor:darkGreenColor]; // Layout top and bottom views to each take up half of the window [self addSubview:self.topView]; [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.and.top.equalTo(self); }]; [self addSubview:self.bottomView]; [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.and.bottom.equalTo(self); make.top.equalTo(self.topView.mas_bottom); make.height.equalTo(self.topView); }]; // Inner views are configured for aspect fit with ratio of 3:1 [self.topView addSubview:self.topInnerView]; [self.topInnerView mas_makeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(self.topInnerView.mas_height).multipliedBy(3); make.width.and.height.lessThanOrEqualTo(self.topView); make.width.and.height.equalTo(self.topView).with.priorityLow(); make.center.equalTo(self.topView); }]; [self.bottomView addSubview:self.bottomInnerView]; [self.bottomInnerView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.equalTo(self.bottomInnerView.mas_width).multipliedBy(3); make.width.and.height.lessThanOrEqualTo(self.bottomView); make.width.and.height.equalTo(self.bottomView).with.priorityLow(); make.center.equalTo(self.bottomView); }]; } return self; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAttributeChainingView.h ================================================ // // MASExampleAttributeChainingView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 31/03/14. // Copyright (c) 2014 Jonas Budelmann. All rights reserved. // #import @interface MASExampleAttributeChainingView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleAttributeChainingView.m ================================================ // // MASExampleAttributeChainingView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 31/03/14. // Copyright (c) 2014 Jonas Budelmann. All rights reserved. // #import "MASExampleAttributeChainingView.h" @implementation MASExampleAttributeChainingView - (id)init { self = [super init]; if (!self) return nil; UIView *greenView = UIView.new; greenView.backgroundColor = UIColor.greenColor; greenView.layer.borderColor = UIColor.blackColor.CGColor; greenView.layer.borderWidth = 2; [self addSubview:greenView]; UIView *redView = UIView.new; redView.backgroundColor = UIColor.redColor; redView.layer.borderColor = UIColor.blackColor.CGColor; redView.layer.borderWidth = 2; [self addSubview:redView]; UIView *blueView = UIView.new; blueView.backgroundColor = UIColor.blueColor; blueView.layer.borderColor = UIColor.blackColor.CGColor; blueView.layer.borderWidth = 2; [self addSubview:blueView]; UIView *superview = self; UIEdgeInsets padding = UIEdgeInsetsMake(15, 10, 15, 10); [greenView mas_makeConstraints:^(MASConstraintMaker *make) { // chain attributes make.top.and.left.equalTo(superview).insets(padding); // which is the equivalent of // make.top.greaterThanOrEqualTo(superview).insets(padding); // make.left.greaterThanOrEqualTo(superview).insets(padding); make.bottom.equalTo(blueView.mas_top).insets(padding); make.right.equalTo(redView.mas_left).insets(padding); make.width.equalTo(redView.mas_width); make.height.equalTo(@[redView, blueView]); }]; [redView mas_makeConstraints:^(MASConstraintMaker *make) { // chain attributes make.top.and.right.equalTo(superview).insets(padding); make.left.equalTo(greenView.mas_right).insets(padding); make.bottom.equalTo(blueView.mas_top).insets(padding); make.width.equalTo(greenView.mas_width); make.height.equalTo(@[greenView, blueView]); }]; [blueView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(greenView.mas_bottom).insets(padding); // chain attributes make.left.right.and.bottom.equalTo(superview).insets(padding); make.height.equalTo(@[greenView, redView]); }]; return self; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleBasicView.h ================================================ // // MASExampleBasicView.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASExampleBasicView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleBasicView.m ================================================ // // MASExampleBasicView.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASExampleBasicView.h" @implementation MASExampleBasicView - (id)init { self = [super init]; if (!self) return nil; UIView *greenView = UIView.new; greenView.backgroundColor = UIColor.greenColor; greenView.layer.borderColor = UIColor.blackColor.CGColor; greenView.layer.borderWidth = 2; [self addSubview:greenView]; UIView *redView = UIView.new; redView.backgroundColor = UIColor.redColor; redView.layer.borderColor = UIColor.blackColor.CGColor; redView.layer.borderWidth = 2; [self addSubview:redView]; UIView *blueView = UIView.new; blueView.backgroundColor = UIColor.blueColor; blueView.layer.borderColor = UIColor.blackColor.CGColor; blueView.layer.borderWidth = 2; [self addSubview:blueView]; UIView *superview = self; int padding = 10; //if you want to use Masonry without the mas_ prefix //define MAS_SHORTHAND before importing Masonry.h see Masonry iOS Examples-Prefix.pch [greenView makeConstraints:^(MASConstraintMaker *make) { make.top.greaterThanOrEqualTo(superview.top).offset(padding); make.left.equalTo(superview.left).offset(padding); make.bottom.equalTo(blueView.top).offset(-padding); make.right.equalTo(redView.left).offset(-padding); make.width.equalTo(redView.width); make.height.equalTo(redView.height); make.height.equalTo(blueView.height); }]; //with is semantic and option [redView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding); //with with make.left.equalTo(greenView.mas_right).offset(padding); //without with make.bottom.equalTo(blueView.mas_top).offset(-padding); make.right.equalTo(superview.mas_right).offset(-padding); make.width.equalTo(greenView.mas_width); make.height.equalTo(@[greenView, blueView]); //can pass array of views }]; [blueView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(greenView.mas_bottom).offset(padding); make.left.equalTo(superview.mas_left).offset(padding); make.bottom.equalTo(superview.mas_bottom).offset(-padding); make.right.equalTo(superview.mas_right).offset(-padding); make.height.equalTo(@[greenView.mas_height, redView.mas_height]); //can pass array of attributes }]; return self; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleConstantsView.h ================================================ // // MASExampleConstantsView.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASExampleConstantsView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleConstantsView.m ================================================ // // MASExampleConstantsView.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASExampleConstantsView.h" @implementation MASExampleConstantsView - (id)init { self = [super init]; if (!self) return nil; UIView *purpleView = UIView.new; purpleView.backgroundColor = UIColor.purpleColor; purpleView.layer.borderColor = UIColor.blackColor.CGColor; purpleView.layer.borderWidth = 2; [self addSubview:purpleView]; UIView *orangeView = UIView.new; orangeView.backgroundColor = UIColor.orangeColor; orangeView.layer.borderColor = UIColor.blackColor.CGColor; orangeView.layer.borderWidth = 2; [self addSubview:orangeView]; //example of using constants [purpleView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(@20); make.left.equalTo(@20); make.bottom.equalTo(@-20); make.right.equalTo(@-20); }]; // auto-boxing macros allow you to simply use scalars and structs, they will be wrapped automatically [orangeView mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(CGPointMake(0, 50)); make.size.equalTo(CGSizeMake(200, 100)); }]; return self; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleDebuggingView.h ================================================ // // MASExampleDebuggingView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleDebuggingView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleDebuggingView.m ================================================ // // MASExampleDebuggingView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleDebuggingView.h" @implementation MASExampleDebuggingView - (id)init { self = [super init]; if (!self) return nil; UIView *greenView = UIView.new; greenView.backgroundColor = UIColor.greenColor; greenView.layer.borderColor = UIColor.blackColor.CGColor; greenView.layer.borderWidth = 2; [self addSubview:greenView]; UIView *redView = UIView.new; redView.backgroundColor = UIColor.redColor; redView.layer.borderColor = UIColor.blackColor.CGColor; redView.layer.borderWidth = 2; [self addSubview:redView]; UILabel *blueView = UILabel.new; blueView.backgroundColor = UIColor.blueColor; blueView.numberOfLines = 3; blueView.textAlignment = NSTextAlignmentCenter; blueView.font = [UIFont systemFontOfSize:24]; blueView.textColor = UIColor.whiteColor; blueView.text = @"this should look broken! check your console!"; blueView.layer.borderColor = UIColor.blackColor.CGColor; blueView.layer.borderWidth = 2; [self addSubview:blueView]; UIView *superview = self; int padding = 10; //you can attach debug keys to views like so: // greenView.mas_key = @"greenView"; // redView.mas_key = @"redView"; // blueView.mas_key = @"blueView"; // superview.mas_key = @"superview"; //OR you can attach keys automagically like so: MASAttachKeys(greenView, redView, blueView, superview); [blueView mas_makeConstraints:^(MASConstraintMaker *make) { //you can also attach debug keys to constaints make.edges.equalTo(@1).key(@"ConflictingConstraint"); //composite constraint keys will be indexed make.height.greaterThanOrEqualTo(@5000).key(@"ConstantConstraint"); make.top.equalTo(greenView.mas_bottom).offset(padding); make.left.equalTo(superview.mas_left).offset(padding); make.bottom.equalTo(superview.mas_bottom).offset(-padding).key(@"BottomConstraint"); make.right.equalTo(superview.mas_right).offset(-padding); make.height.equalTo(greenView.mas_height); make.height.equalTo(redView.mas_height).key(@340954); //anything can be a key }]; [greenView makeConstraints:^(MASConstraintMaker *make) { make.top.greaterThanOrEqualTo(superview.top).offset(padding); make.left.equalTo(superview.left).offset(padding); make.bottom.equalTo(blueView.top).offset(-padding); make.right.equalTo(redView.left).offset(-padding); make.width.equalTo(redView.width); make.height.equalTo(redView.height); make.height.equalTo(blueView.height); }]; //with is semantic and option [redView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding); make.left.equalTo(greenView.mas_right).offset(padding); make.bottom.equalTo(blueView.mas_top).offset(-padding); make.right.equalTo(superview.mas_right).offset(-padding); make.width.equalTo(greenView.mas_width); make.height.equalTo(@[greenView, blueView]); }]; return self; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleDistributeView.h ================================================ // // MASExampleDistributeView.h // Masonry iOS Examples // // Created by bibibi on 15/8/6. // Copyright (c) 2015年 Jonas Budelmann. All rights reserved. // #import @interface MASExampleDistributeView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleDistributeView.m ================================================ // // MASExampleDistributeView.m // Masonry iOS Examples // // Created by bibibi on 15/8/6. // Copyright (c) 2015年 Jonas Budelmann. All rights reserved. // #import "MASExampleDistributeView.h" @implementation MASExampleDistributeView - (id)init { self = [super init]; if (!self) return nil; NSMutableArray *arr = @[].mutableCopy; for (int i = 0; i < 4; i++) { UIView *view = UIView.new; view.backgroundColor = [self randomColor]; view.layer.borderColor = UIColor.blackColor.CGColor; view.layer.borderWidth = 2; [self addSubview:view]; [arr addObject:view]; } unsigned int type = arc4random()%4; switch (type) { case 0: [arr mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedSpacing:20 leadSpacing:5 tailSpacing:5]; [arr makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(@60); make.height.equalTo(@60); }]; break; case 1: [arr mas_distributeViewsAlongAxis:MASAxisTypeVertical withFixedSpacing:20 leadSpacing:5 tailSpacing:5]; [arr makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(@0); make.width.equalTo(@60); }]; break; case 2: [arr mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedItemLength:30 leadSpacing:200 tailSpacing:30]; [arr makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(@60); make.height.equalTo(@60); }]; break; case 3: [arr mas_distributeViewsAlongAxis:MASAxisTypeVertical withFixedItemLength:30 leadSpacing:30 tailSpacing:200]; [arr makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(@0); make.width.equalTo(@60); }]; break; default: break; } return self; } - (UIColor *)randomColor { CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleLabelView.h ================================================ // // MASExampleLabelView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 24/10/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleLabelView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleLabelView.m ================================================ // // MASExampleLabelView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 24/10/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleLabelView.h" static UIEdgeInsets const kPadding = {10, 10, 10, 10}; @interface MASExampleLabelView () @property (nonatomic, strong) UILabel *shortLabel; @property (nonatomic, strong) UILabel *longLabel; @end @implementation MASExampleLabelView - (id)init { self = [super init]; if (!self) return nil; // text courtesy of http://baconipsum.com/ self.shortLabel = UILabel.new; self.shortLabel.numberOfLines = 1; self.shortLabel.textColor = [UIColor purpleColor]; self.shortLabel.lineBreakMode = NSLineBreakByTruncatingTail; self.shortLabel.text = @"Bacon"; [self addSubview:self.shortLabel]; self.longLabel = UILabel.new; self.longLabel.numberOfLines = 8; self.longLabel.textColor = [UIColor darkGrayColor]; self.longLabel.lineBreakMode = NSLineBreakByTruncatingTail; self.longLabel.text = @"Bacon ipsum dolor sit amet spare ribs fatback kielbasa salami, tri-tip jowl pastrami flank short loin rump sirloin. Tenderloin frankfurter chicken biltong rump chuck filet mignon pork t-bone flank ham hock."; [self addSubview:self.longLabel]; [self.longLabel makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.left).insets(kPadding); make.top.equalTo(self.top).insets(kPadding); }]; [self.shortLabel makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.longLabel.lastBaseline); make.right.equalTo(self.right).insets(kPadding); }]; return self; } - (void)layoutSubviews { [super layoutSubviews]; // for multiline UILabel's you need set the preferredMaxLayoutWidth // you need to do this after [super layoutSubviews] as the frames will have a value from Auto Layout at this point // stay tuned for new easier way todo this coming soon to Masonry CGFloat width = CGRectGetMinX(self.shortLabel.frame) - kPadding.left; width -= CGRectGetMinX(self.longLabel.frame); self.longLabel.preferredMaxLayoutWidth = width; // need to layoutSubviews again as frames need to recalculated with preferredLayoutWidth [super layoutSubviews]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleLayoutGuideViewController.h ================================================ // // MASExampleLayoutGuideViewController.h // Masonry iOS Examples // // Created by Jonas Budelmann on 26/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleLayoutGuideViewController : UIViewController @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleLayoutGuideViewController.m ================================================ // // MASExampleLayoutGuideViewController.m // Masonry iOS Examples // // Created by Jonas Budelmann on 26/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleLayoutGuideViewController.h" @interface MASExampleLayoutGuideViewController () @end @implementation MASExampleLayoutGuideViewController - (id)init { self = [super init]; if (!self) return nil; self.title = @"Layout Guides"; return self; } - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; UIView *topView = UIView.new; topView.backgroundColor = UIColor.greenColor; topView.layer.borderColor = UIColor.blackColor.CGColor; topView.layer.borderWidth = 2; [self.view addSubview:topView]; UIView *topSubview = UIView.new; topSubview.backgroundColor = UIColor.blueColor; topSubview.layer.borderColor = UIColor.blackColor.CGColor; topSubview.layer.borderWidth = 2; [topView addSubview:topSubview]; UIView *bottomView = UIView.new; bottomView.backgroundColor = UIColor.redColor; bottomView.layer.borderColor = UIColor.blackColor.CGColor; bottomView.layer.borderWidth = 2; [self.view addSubview:bottomView]; [topView makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.mas_topLayoutGuide); make.left.equalTo(self.view); make.right.equalTo(self.view); make.height.equalTo(@40); }]; [topSubview makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.mas_topLayoutGuide); make.centerX.equalTo(@0); make.width.equalTo(@20); make.height.equalTo(@20); }]; [bottomView makeConstraints:^(MASConstraintMaker *make) { make.bottom.equalTo(self.mas_bottomLayoutGuide); make.left.equalTo(self.view); make.right.equalTo(self.view); make.height.equalTo(@40); }]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleListViewController.h ================================================ // // MASExampleListViewController.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASExampleListViewController : UITableViewController @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleListViewController.m ================================================ // // MASExampleListViewController.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASExampleListViewController.h" #import "MASExampleViewController.h" #import "MASExampleBasicView.h" #import "MASExampleConstantsView.h" #import "MASExampleSidesView.h" #import "MASExampleAnimatedView.h" #import "MASExampleDebuggingView.h" #import "MASExampleLabelView.h" #import "MASExampleUpdateView.h" #import "MASExampleRemakeView.h" #import "MASExampleScrollView.h" #import "MASExampleLayoutGuideViewController.h" #import "MASExampleSafeAreaLayoutGuideViewController.h" #import "MASExampleArrayView.h" #import "MASExampleAttributeChainingView.h" #import "MASExampleAspectFitView.h" #import "MASExampleMarginView.h" #import "MASExampleDistributeView.h" static NSString * const kMASCellReuseIdentifier = @"kMASCellReuseIdentifier"; @interface MASExampleListViewController () @property (nonatomic, strong) NSArray *exampleControllers; @end @implementation MASExampleListViewController - (id)init { self = [super init]; if (!self) return nil; self.title = @"Examples"; self.exampleControllers = @[ [[MASExampleViewController alloc] initWithTitle:@"Basic" viewClass:MASExampleBasicView.class], [[MASExampleViewController alloc] initWithTitle:@"Update Constraints" viewClass:MASExampleUpdateView.class], [[MASExampleViewController alloc] initWithTitle:@"Remake Constraints" viewClass:MASExampleRemakeView.class], [[MASExampleViewController alloc] initWithTitle:@"Using Constants" viewClass:MASExampleConstantsView.class], [[MASExampleViewController alloc] initWithTitle:@"Composite Edges" viewClass:MASExampleSidesView.class], [[MASExampleViewController alloc] initWithTitle:@"Aspect Fit" viewClass:MASExampleAspectFitView.class], [[MASExampleViewController alloc] initWithTitle:@"Basic Animated" viewClass:MASExampleAnimatedView.class], [[MASExampleViewController alloc] initWithTitle:@"Debugging Helpers" viewClass:MASExampleDebuggingView.class], [[MASExampleViewController alloc] initWithTitle:@"Bacony Labels" viewClass:MASExampleLabelView.class], [[MASExampleViewController alloc] initWithTitle:@"UIScrollView" viewClass:MASExampleScrollView.class], [[MASExampleViewController alloc] initWithTitle:@"Array" viewClass:MASExampleArrayView.class], [[MASExampleViewController alloc] initWithTitle:@"Attribute Chaining" viewClass:MASExampleAttributeChainingView.class], [[MASExampleViewController alloc] initWithTitle:@"Margins" viewClass:MASExampleMarginView.class], [[MASExampleViewController alloc] initWithTitle:@"Views Distribute" viewClass:MASExampleDistributeView.class], ]; if ([UIViewController instancesRespondToSelector:@selector(topLayoutGuide)]) { self.exampleControllers = [self.exampleControllers arrayByAddingObject:[[MASExampleLayoutGuideViewController alloc] init]]; } if ([UIView instancesRespondToSelector:@selector(safeAreaLayoutGuide)]) { self.exampleControllers = [self.exampleControllers arrayByAddingObject:[[MASExampleSafeAreaLayoutGuideViewController alloc] init]]; } return self; } - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; [self.tableView registerClass:UITableViewCell.class forCellReuseIdentifier:kMASCellReuseIdentifier]; } #pragma mark - UITableViewDataSource - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController *viewController = self.exampleControllers[indexPath.row]; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kMASCellReuseIdentifier forIndexPath:indexPath]; cell.textLabel.text = viewController.title; return cell; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.exampleControllers.count; } #pragma mark - UITableViewDelegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController *viewController = self.exampleControllers[indexPath.row]; [self.navigationController pushViewController:viewController animated:YES]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleMarginView.h ================================================ // // MASExampleMarginView.h // Masonry iOS Examples // // Created by Craig Siemens on 2015-02-23. // Copyright (c) 2015 Jonas Budelmann. All rights reserved. // #import @interface MASExampleMarginView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleMarginView.m ================================================ // // MASExampleMarginView.m // Masonry iOS Examples // // Created by Craig Siemens on 2015-02-23. // Copyright (c) 2015 Jonas Budelmann. All rights reserved. // #import "MASExampleMarginView.h" @implementation MASExampleMarginView - (instancetype)init { self = [super init]; if (!self) return nil; UIView *lastView = self; for (int i = 0; i < 10; i++) { UIView *view = UIView.new; view.backgroundColor = [self randomColor]; view.layer.borderColor = UIColor.blackColor.CGColor; view.layer.borderWidth = 2; view.layoutMargins = UIEdgeInsetsMake(5, 10, 15, 20); [self addSubview:view]; [view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(lastView.topMargin); make.bottom.equalTo(lastView.bottomMargin); make.left.equalTo(lastView.leftMargin); make.right.equalTo(lastView.rightMargin); }]; lastView = view; } return self; } - (UIColor *)randomColor { CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleRemakeView.h ================================================ // // MASExampleRemakeView.h // Masonry iOS Examples // // Created by Sam Symons on 2014-06-22. // Copyright (c) 2014 Jonas Budelmann. All rights reserved. // #import @interface MASExampleRemakeView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleRemakeView.m ================================================ // // MASExampleRemakeView.m // Masonry iOS Examples // // Created by Sam Symons on 2014-06-22. // Copyright (c) 2014 Jonas Budelmann. All rights reserved. // #import "MASExampleRemakeView.h" @interface MASExampleRemakeView () @property (nonatomic, strong) UIButton *movingButton; @property (nonatomic, assign) BOOL topLeft; - (void)toggleButtonPosition; @end @implementation MASExampleRemakeView - (id)init { self = [super init]; if (!self) return nil; self.movingButton = [UIButton buttonWithType:UIButtonTypeSystem]; [self.movingButton setTitle:@"Move Me!" forState:UIControlStateNormal]; self.movingButton.layer.borderColor = UIColor.greenColor.CGColor; self.movingButton.layer.borderWidth = 3; [self.movingButton addTarget:self action:@selector(toggleButtonPosition) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:self.movingButton]; self.topLeft = YES; return self; } + (BOOL)requiresConstraintBasedLayout { return YES; } // this is Apple's recommended place for adding/updating constraints - (void)updateConstraints { [self.movingButton remakeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(100)); make.height.equalTo(@(100)); if (self.topLeft) { make.left.equalTo(self.left).with.offset(10); make.top.equalTo(self.top).with.offset(10); } else { make.bottom.equalTo(self.bottom).with.offset(-10); make.right.equalTo(self.right).with.offset(-10); } }]; //according to apple super should be called at end of method [super updateConstraints]; } - (void)toggleButtonPosition { self.topLeft = !self.topLeft; // tell constraints they need updating [self setNeedsUpdateConstraints]; // update constraints now so we can animate the change [self updateConstraintsIfNeeded]; [UIView animateWithDuration:0.4 animations:^{ [self layoutIfNeeded]; }]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleSafeAreaLayoutGuideViewController.h ================================================ // // MASExampleSafeAreaLayoutGuideViewController.h // Masonry iOS Examples // // Created by MingLQ on 2017-09-27. // Copyright © 2017 MingLQ. All rights reserved. // #import @interface MASExampleSafeAreaLayoutGuideViewController : UIViewController @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleSafeAreaLayoutGuideViewController.m ================================================ // // MASExampleSafeAreaLayoutGuideViewController.m // Masonry iOS Examples // // Created by MingLQ on 2017-09-27. // Copyright © 2017 MingLQ. All rights reserved. // #import "MASExampleSafeAreaLayoutGuideViewController.h" @interface MASExampleSafeAreaLayoutGuideViewController () @end @implementation MASExampleSafeAreaLayoutGuideViewController - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { self.title = @"Safe Area Layout Guides"; } return self; } - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; UIView *view1 = [UIView new]; view1.backgroundColor = [UIColor redColor]; [self.view addSubview:view1]; UIView *view2 = [UIView new]; view2.backgroundColor = [UIColor greenColor]; [self.view addSubview:view2]; UIView *view3 = [UIView new]; view3.backgroundColor = [UIColor blueColor]; [self.view addSubview:view3]; UIView *leftView = [self viewWithName:@"LY"]; UIView *rightView = [self viewWithName:@"RY"]; UIView *topView = [self viewWithName:@"TX"]; UIView *bottomView = [self viewWithName:@"BX"]; UIView *leftTopView = [self viewWithName:@"LT"]; UIView *rightTopView = [self viewWithName:@"RT"]; UIView *leftBottomView = [self viewWithName:@"LB"]; UIView *rightBottomView = [self viewWithName:@"RB"]; UIView *centerView = [self viewWithName:@"XY"]; const CGFloat size = 50.0; [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.view.mas_safeAreaLayoutGuide).inset(10.0); }]; [view2 mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(self.view.mas_safeAreaLayoutGuide).sizeOffset(CGSizeMake(- 40.0, - 40.0)); }]; [view3 mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.equalTo(self.view.mas_safeAreaLayoutGuide).sizeOffset(CGSizeMake(- 60.0, - 60.0)); make.height.equalTo(self.view.mas_safeAreaLayoutGuide).sizeOffset(CGSizeMake(- 60.0, - 60.0)); }]; [leftTopView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.top.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(@(size)); }]; [rightTopView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight); make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop); make.width.height.equalTo(@(size)); }]; [leftBottomView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.view.mas_safeAreaLayoutGuideLeft); make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom); make.width.height.equalTo(@(size)); }]; [rightBottomView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.bottom.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(@(size)); }]; [leftView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.centerY.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(@(size)); }]; [rightView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight); make.centerY.equalTo(self.view.mas_safeAreaLayoutGuideCenterY); make.width.height.equalTo(@(size)); }]; [topView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop); make.centerX.equalTo(self.view.mas_safeAreaLayoutGuideCenterX); make.width.height.equalTo(@(size)); }]; [bottomView mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.centerX.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(@(size)); }]; [centerView mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.view.mas_safeAreaLayoutGuide); make.width.height.equalTo(@(size)); }]; } - (UIView *)viewWithName:(NSString *)name { UILabel *label = [UILabel new]; label.text = name; label.textAlignment = NSTextAlignmentCenter; label.textColor = [UIColor blackColor]; label.backgroundColor = [UIColor yellowColor]; [self.view addSubview:label]; return label; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleScrollView.h ================================================ // // MASExampleScrollView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 20/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleScrollView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleScrollView.m ================================================ // // MASExampleScrollView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 20/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleScrollView.h" /** * UIScrollView and Auto Layout don't play very nicely together see * https://developer.apple.com/library/ios/technotes/tn2154/_index.html * * This is an example of one workaround * * for another approach see https://github.com/bizz84/MVScrollViewAutoLayout */ @interface MASExampleScrollView () @property (strong, nonatomic) UIScrollView* scrollView; @end @implementation MASExampleScrollView - (id)init { self = [super init]; if (!self) return nil; UIScrollView *scrollView = UIScrollView.new; self.scrollView = scrollView; scrollView.backgroundColor = [UIColor grayColor]; [self addSubview:scrollView]; [self.scrollView makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self); }]; [self generateContent]; return self; } - (void)generateContent { UIView* contentView = UIView.new; [self.scrollView addSubview:contentView]; [contentView makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.scrollView); make.width.equalTo(self.scrollView); }]; UIView *lastView; CGFloat height = 25; for (int i = 0; i < 10; i++) { UIView *view = UIView.new; view.backgroundColor = [self randomColor]; [contentView addSubview:view]; UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTap:)]; [view addGestureRecognizer:singleTap]; [view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(lastView ? lastView.bottom : @0); make.left.equalTo(@0); make.width.equalTo(contentView.width); make.height.equalTo(@(height)); }]; height += 25; lastView = view; } [contentView makeConstraints:^(MASConstraintMaker *make) { make.bottom.equalTo(lastView.bottom); }]; } - (UIColor *)randomColor { CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; } - (void)singleTap:(UITapGestureRecognizer*)sender { [sender.view setAlpha:sender.view.alpha / 1.20]; // To see something happen on screen when you tap :O [self.scrollView scrollRectToVisible:sender.view.frame animated:YES]; }; @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleSidesView.h ================================================ // // MASExampleSidesView.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASExampleSidesView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleSidesView.m ================================================ // // MASExampleSidesView.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASExampleSidesView.h" @implementation MASExampleSidesView - (id)init { self = [super init]; if (!self) return nil; UIView *lastView = self; for (int i = 0; i < 10; i++) { UIView *view = UIView.new; view.backgroundColor = [self randomColor]; view.layer.borderColor = UIColor.blackColor.CGColor; view.layer.borderWidth = 2; [self addSubview:view]; [view mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(lastView).insets(UIEdgeInsetsMake(5, 10, 15, 20)); }]; lastView = view; } return self; } - (UIColor *)randomColor { CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleUpdateView.h ================================================ // // MASExampleUpdateView.h // Masonry iOS Examples // // Created by Jonas Budelmann on 3/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface MASExampleUpdateView : UIView @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleUpdateView.m ================================================ // // MASExampleUpdateView.m // Masonry iOS Examples // // Created by Jonas Budelmann on 3/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASExampleUpdateView.h" @interface MASExampleUpdateView () @property (nonatomic, strong) UIButton *growingButton; @property (nonatomic, assign) CGSize buttonSize; @end @implementation MASExampleUpdateView - (id)init { self = [super init]; if (!self) return nil; self.growingButton = [UIButton buttonWithType:UIButtonTypeSystem]; [self.growingButton setTitle:@"Grow Me!" forState:UIControlStateNormal]; self.growingButton.layer.borderColor = UIColor.greenColor.CGColor; self.growingButton.layer.borderWidth = 3; [self.growingButton addTarget:self action:@selector(didTapGrowButton:) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:self.growingButton]; self.buttonSize = CGSizeMake(100, 100); return self; } + (BOOL)requiresConstraintBasedLayout { return YES; } // this is Apple's recommended place for adding/updating constraints - (void)updateConstraints { [self.growingButton updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self); make.width.equalTo(@(self.buttonSize.width)).priorityLow(); make.height.equalTo(@(self.buttonSize.height)).priorityLow(); make.width.lessThanOrEqualTo(self); make.height.lessThanOrEqualTo(self); }]; //according to apple super should be called at end of method [super updateConstraints]; } - (void)didTapGrowButton:(UIButton *)button { self.buttonSize = CGSizeMake(self.buttonSize.width * 1.3, self.buttonSize.height * 1.3); // tell constraints they need updating [self setNeedsUpdateConstraints]; // update constraints now so we can animate the change [self updateConstraintsIfNeeded]; [UIView animateWithDuration:0.4 animations:^{ [self layoutIfNeeded]; }]; } @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleViewController.h ================================================ // // MASExampleOneViewController.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import @interface MASExampleViewController : UIViewController - (id)initWithTitle:(NSString *)title viewClass:(Class)viewClass; @end ================================================ FILE: Examples/Masonry iOS Examples/MASExampleViewController.m ================================================ // // MASExampleOneViewController.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASExampleViewController.h" #import "MASExampleBasicView.h" @interface MASExampleViewController () @property (nonatomic, strong) Class viewClass; @end @implementation MASExampleViewController - (id)initWithTitle:(NSString *)title viewClass:(Class)viewClass { self = [super init]; if (!self) return nil; self.title = title; self.viewClass = viewClass; return self; } - (void)loadView { self.view = self.viewClass.new; self.view.backgroundColor = [UIColor whiteColor]; } #ifdef __IPHONE_7_0 - (UIRectEdge)edgesForExtendedLayout { return UIRectEdgeNone; } #endif @end ================================================ FILE: Examples/Masonry iOS Examples/Masonry iOS Examples-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UILaunchStoryboardName Launch Screen UIRequiredDeviceCapabilities armv7 UIRequiresFullScreen UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: Examples/Masonry iOS Examples/Masonry iOS Examples-Prefix.pch ================================================ // // Prefix header for all source files of the 'Masonry iOS Examples' target in the 'Masonry iOS Examples' project // #import #ifndef __IPHONE_3_0 #warning "This project uses features only available in iOS SDK 3.0 and later." #endif #ifdef __OBJC__ #import #import #import //define this constant if you want to use Masonry without the 'mas_' prefix #define MAS_SHORTHAND //define this constant if you want to enable auto-boxing for default syntax #define MAS_SHORTHAND_GLOBALS #import "Masonry.h" #endif ================================================ FILE: Examples/Masonry iOS Examples/en.lproj/InfoPlist.strings ================================================ /* Localized versions of Info.plist keys */ ================================================ FILE: Examples/Masonry iOS Examples/main.m ================================================ // // main.m // Masonry iOS Examples // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import #import "MASAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([MASAppDelegate class])); } } ================================================ FILE: Examples/Masonry iOS Examples.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 00FC4A321B7359D700DCA999 /* MASExampleDistributeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 00FC4A311B7359D700DCA999 /* MASExampleDistributeView.m */; }; 27A27D461A6CF0C400D34F52 /* MASExampleAspectFitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27A27D451A6CF0C400D34F52 /* MASExampleAspectFitView.m */; }; 3C02224919D0C4EC00507321 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3C02224819D0C4EC00507321 /* Images.xcassets */; }; 3DB1CAD5184538E200E91FC5 /* MASExampleArrayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB1CAD4184538E200E91FC5 /* MASExampleArrayView.m */; }; 44C0E6AF1A9B9C55003C70CF /* MASExampleMarginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 44C0E6AE1A9B9C55003C70CF /* MASExampleMarginView.m */; }; 4BEB55B61957394E008C862B /* MASExampleRemakeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BEB55B51957394E008C862B /* MASExampleRemakeView.m */; }; 6C87DADA5AB046D9A3181A65 /* libPods-Masonry iOS Examples.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BDC1B8303EED42A2B01B94B1 /* libPods-Masonry iOS Examples.a */; }; DD175E6A182639FB0099129A /* MASExampleUpdateView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD175E69182639FB0099129A /* MASExampleUpdateView.m */; }; DD32C3FD18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD32C3FC18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.m */; }; DD52F22B179CAD57005CD195 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD52F22A179CAD57005CD195 /* UIKit.framework */; }; DD52F22D179CAD57005CD195 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD52F22C179CAD57005CD195 /* Foundation.framework */; }; DD52F22F179CAD57005CD195 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD52F22E179CAD57005CD195 /* CoreGraphics.framework */; }; DD52F235179CAD57005CD195 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DD52F233179CAD57005CD195 /* InfoPlist.strings */; }; DD52F237179CAD57005CD195 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F236179CAD57005CD195 /* main.m */; }; DD52F23B179CAD57005CD195 /* MASAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F23A179CAD57005CD195 /* MASAppDelegate.m */; }; DD52F251179CADC0005CD195 /* MASExampleBasicView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F248179CADC0005CD195 /* MASExampleBasicView.m */; }; DD52F252179CADC0005CD195 /* MASExampleConstantsView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F24A179CADC0005CD195 /* MASExampleConstantsView.m */; }; DD52F253179CADC0005CD195 /* MASExampleListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F24C179CADC0005CD195 /* MASExampleListViewController.m */; }; DD52F254179CADC0005CD195 /* MASExampleSidesView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F24E179CADC0005CD195 /* MASExampleSidesView.m */; }; DD52F255179CADC0005CD195 /* MASExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD52F250179CADC0005CD195 /* MASExampleViewController.m */; }; DD653E4A1843E61500D1EC5A /* MASExampleLayoutGuideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD653E491843E61500D1EC5A /* MASExampleLayoutGuideViewController.m */; }; DD7CC17617ACE990007A469E /* MASExampleDebuggingView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD7CC17517ACE990007A469E /* MASExampleDebuggingView.m */; }; DD9B4D35183CC980002BF408 /* MASExampleScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD9B4D34183CC980002BF408 /* MASExampleScrollView.m */; }; DDDF60CC181915E300BF7B8B /* MASExampleLabelView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDDF60CB181915E300BF7B8B /* MASExampleLabelView.m */; }; DDF3875C179D648D00178773 /* MASExampleAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDF3875B179D648D00178773 /* MASExampleAnimatedView.m */; }; DFBACE591F7B76E40047F15A /* MASExampleSafeAreaLayoutGuideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DFBACE581F7B76E40047F15A /* MASExampleSafeAreaLayoutGuideViewController.m */; }; DFBACE5D1F7B86860047F15A /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DFBACE5C1F7B86860047F15A /* Launch Screen.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 00FC4A301B7359D700DCA999 /* MASExampleDistributeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleDistributeView.h; sourceTree = ""; }; 00FC4A311B7359D700DCA999 /* MASExampleDistributeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleDistributeView.m; sourceTree = ""; }; 27A27D441A6CF0C400D34F52 /* MASExampleAspectFitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleAspectFitView.h; sourceTree = ""; }; 27A27D451A6CF0C400D34F52 /* MASExampleAspectFitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleAspectFitView.m; sourceTree = ""; }; 321AA59CF7B045B6D503D2E5 /* Pods-Masonry iOS Examples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Masonry iOS Examples.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples.release.xcconfig"; sourceTree = ""; }; 3C02224819D0C4EC00507321 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 3DB1CAD3184538E200E91FC5 /* MASExampleArrayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleArrayView.h; sourceTree = ""; }; 3DB1CAD4184538E200E91FC5 /* MASExampleArrayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleArrayView.m; sourceTree = ""; }; 44C0E6AD1A9B9C55003C70CF /* MASExampleMarginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleMarginView.h; sourceTree = ""; }; 44C0E6AE1A9B9C55003C70CF /* MASExampleMarginView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleMarginView.m; sourceTree = ""; }; 4BEB55B41957394E008C862B /* MASExampleRemakeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleRemakeView.h; sourceTree = ""; }; 4BEB55B51957394E008C862B /* MASExampleRemakeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleRemakeView.m; sourceTree = ""; }; 50B25D0621957AEB87C3FCC2 /* Pods-Masonry iOS Examples.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Masonry iOS Examples.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples.debug.xcconfig"; sourceTree = ""; }; BDC1B8303EED42A2B01B94B1 /* libPods-Masonry iOS Examples.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Masonry iOS Examples.a"; sourceTree = BUILT_PRODUCTS_DIR; }; DD175E68182639FB0099129A /* MASExampleUpdateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleUpdateView.h; sourceTree = ""; }; DD175E69182639FB0099129A /* MASExampleUpdateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleUpdateView.m; sourceTree = ""; }; DD32C3FB18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleAttributeChainingView.h; sourceTree = ""; }; DD32C3FC18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleAttributeChainingView.m; sourceTree = ""; }; DD52F227179CAD57005CD195 /* Masonry iOS Examples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Masonry iOS Examples.app"; sourceTree = BUILT_PRODUCTS_DIR; }; DD52F22A179CAD57005CD195 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DD52F22C179CAD57005CD195 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DD52F22E179CAD57005CD195 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DD52F232179CAD57005CD195 /* Masonry iOS Examples-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Masonry iOS Examples-Info.plist"; sourceTree = ""; }; DD52F234179CAD57005CD195 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; DD52F236179CAD57005CD195 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DD52F238179CAD57005CD195 /* Masonry iOS Examples-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Masonry iOS Examples-Prefix.pch"; sourceTree = ""; }; DD52F239179CAD57005CD195 /* MASAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MASAppDelegate.h; sourceTree = ""; }; DD52F23A179CAD57005CD195 /* MASAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MASAppDelegate.m; sourceTree = ""; }; DD52F247179CADC0005CD195 /* MASExampleBasicView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleBasicView.h; sourceTree = ""; }; DD52F248179CADC0005CD195 /* MASExampleBasicView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleBasicView.m; sourceTree = ""; }; DD52F249179CADC0005CD195 /* MASExampleConstantsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleConstantsView.h; sourceTree = ""; }; DD52F24A179CADC0005CD195 /* MASExampleConstantsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleConstantsView.m; sourceTree = ""; }; DD52F24B179CADC0005CD195 /* MASExampleListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleListViewController.h; sourceTree = ""; }; DD52F24C179CADC0005CD195 /* MASExampleListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleListViewController.m; sourceTree = ""; }; DD52F24D179CADC0005CD195 /* MASExampleSidesView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleSidesView.h; sourceTree = ""; }; DD52F24E179CADC0005CD195 /* MASExampleSidesView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleSidesView.m; sourceTree = ""; }; DD52F24F179CADC0005CD195 /* MASExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleViewController.h; sourceTree = ""; }; DD52F250179CADC0005CD195 /* MASExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleViewController.m; sourceTree = ""; }; DD653E481843E61500D1EC5A /* MASExampleLayoutGuideViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleLayoutGuideViewController.h; sourceTree = ""; }; DD653E491843E61500D1EC5A /* MASExampleLayoutGuideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleLayoutGuideViewController.m; sourceTree = ""; }; DD7CC17417ACE990007A469E /* MASExampleDebuggingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleDebuggingView.h; sourceTree = ""; }; DD7CC17517ACE990007A469E /* MASExampleDebuggingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleDebuggingView.m; sourceTree = ""; }; DD9B4D33183CC980002BF408 /* MASExampleScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleScrollView.h; sourceTree = ""; }; DD9B4D34183CC980002BF408 /* MASExampleScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleScrollView.m; sourceTree = ""; }; DDDF60CA181915E300BF7B8B /* MASExampleLabelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleLabelView.h; sourceTree = ""; }; DDDF60CB181915E300BF7B8B /* MASExampleLabelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleLabelView.m; sourceTree = ""; }; DDF3875A179D648D00178773 /* MASExampleAnimatedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASExampleAnimatedView.h; sourceTree = ""; }; DDF3875B179D648D00178773 /* MASExampleAnimatedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASExampleAnimatedView.m; sourceTree = ""; }; DFBACE571F7B76E30047F15A /* MASExampleSafeAreaLayoutGuideViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MASExampleSafeAreaLayoutGuideViewController.h; sourceTree = ""; }; DFBACE581F7B76E40047F15A /* MASExampleSafeAreaLayoutGuideViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MASExampleSafeAreaLayoutGuideViewController.m; sourceTree = ""; }; DFBACE5C1F7B86860047F15A /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ DD52F224179CAD57005CD195 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DD52F22B179CAD57005CD195 /* UIKit.framework in Frameworks */, DD52F22D179CAD57005CD195 /* Foundation.framework in Frameworks */, DD52F22F179CAD57005CD195 /* CoreGraphics.framework in Frameworks */, 6C87DADA5AB046D9A3181A65 /* libPods-Masonry iOS Examples.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ DD52F21E179CAD57005CD195 = { isa = PBXGroup; children = ( DD52F230179CAD57005CD195 /* Masonry iOS Examples */, DD52F229179CAD57005CD195 /* Frameworks */, DD52F228179CAD57005CD195 /* Products */, DF14AF6879B23556F891E1F7 /* Pods */, ); sourceTree = ""; }; DD52F228179CAD57005CD195 /* Products */ = { isa = PBXGroup; children = ( DD52F227179CAD57005CD195 /* Masonry iOS Examples.app */, ); name = Products; sourceTree = ""; }; DD52F229179CAD57005CD195 /* Frameworks */ = { isa = PBXGroup; children = ( DD52F22A179CAD57005CD195 /* UIKit.framework */, DD52F22C179CAD57005CD195 /* Foundation.framework */, DD52F22E179CAD57005CD195 /* CoreGraphics.framework */, BDC1B8303EED42A2B01B94B1 /* libPods-Masonry iOS Examples.a */, ); name = Frameworks; sourceTree = ""; }; DD52F230179CAD57005CD195 /* Masonry iOS Examples */ = { isa = PBXGroup; children = ( DD52F239179CAD57005CD195 /* MASAppDelegate.h */, DD52F23A179CAD57005CD195 /* MASAppDelegate.m */, DD52F257179CADCB005CD195 /* Controllers */, DD52F256179CADC4005CD195 /* Views */, 3C02224819D0C4EC00507321 /* Images.xcassets */, DD52F231179CAD57005CD195 /* Supporting Files */, DFBACE5C1F7B86860047F15A /* Launch Screen.storyboard */, ); path = "Masonry iOS Examples"; sourceTree = ""; }; DD52F231179CAD57005CD195 /* Supporting Files */ = { isa = PBXGroup; children = ( DD52F232179CAD57005CD195 /* Masonry iOS Examples-Info.plist */, DD52F233179CAD57005CD195 /* InfoPlist.strings */, DD52F236179CAD57005CD195 /* main.m */, DD52F238179CAD57005CD195 /* Masonry iOS Examples-Prefix.pch */, ); name = "Supporting Files"; sourceTree = ""; }; DD52F256179CADC4005CD195 /* Views */ = { isa = PBXGroup; children = ( DD52F247179CADC0005CD195 /* MASExampleBasicView.h */, DD52F248179CADC0005CD195 /* MASExampleBasicView.m */, DD52F249179CADC0005CD195 /* MASExampleConstantsView.h */, DD52F24A179CADC0005CD195 /* MASExampleConstantsView.m */, DD52F24D179CADC0005CD195 /* MASExampleSidesView.h */, DD52F24E179CADC0005CD195 /* MASExampleSidesView.m */, 27A27D441A6CF0C400D34F52 /* MASExampleAspectFitView.h */, 27A27D451A6CF0C400D34F52 /* MASExampleAspectFitView.m */, DDF3875A179D648D00178773 /* MASExampleAnimatedView.h */, DDF3875B179D648D00178773 /* MASExampleAnimatedView.m */, DD7CC17417ACE990007A469E /* MASExampleDebuggingView.h */, DD7CC17517ACE990007A469E /* MASExampleDebuggingView.m */, DDDF60CA181915E300BF7B8B /* MASExampleLabelView.h */, DDDF60CB181915E300BF7B8B /* MASExampleLabelView.m */, DD175E68182639FB0099129A /* MASExampleUpdateView.h */, DD175E69182639FB0099129A /* MASExampleUpdateView.m */, 4BEB55B41957394E008C862B /* MASExampleRemakeView.h */, 4BEB55B51957394E008C862B /* MASExampleRemakeView.m */, DD9B4D33183CC980002BF408 /* MASExampleScrollView.h */, DD9B4D34183CC980002BF408 /* MASExampleScrollView.m */, 3DB1CAD3184538E200E91FC5 /* MASExampleArrayView.h */, 3DB1CAD4184538E200E91FC5 /* MASExampleArrayView.m */, DD32C3FB18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.h */, DD32C3FC18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.m */, 44C0E6AD1A9B9C55003C70CF /* MASExampleMarginView.h */, 44C0E6AE1A9B9C55003C70CF /* MASExampleMarginView.m */, 00FC4A301B7359D700DCA999 /* MASExampleDistributeView.h */, 00FC4A311B7359D700DCA999 /* MASExampleDistributeView.m */, ); name = Views; sourceTree = ""; }; DD52F257179CADCB005CD195 /* Controllers */ = { isa = PBXGroup; children = ( DD52F24B179CADC0005CD195 /* MASExampleListViewController.h */, DD52F24C179CADC0005CD195 /* MASExampleListViewController.m */, DD52F24F179CADC0005CD195 /* MASExampleViewController.h */, DD52F250179CADC0005CD195 /* MASExampleViewController.m */, DD653E481843E61500D1EC5A /* MASExampleLayoutGuideViewController.h */, DD653E491843E61500D1EC5A /* MASExampleLayoutGuideViewController.m */, DFBACE571F7B76E30047F15A /* MASExampleSafeAreaLayoutGuideViewController.h */, DFBACE581F7B76E40047F15A /* MASExampleSafeAreaLayoutGuideViewController.m */, ); name = Controllers; sourceTree = ""; }; DF14AF6879B23556F891E1F7 /* Pods */ = { isa = PBXGroup; children = ( 50B25D0621957AEB87C3FCC2 /* Pods-Masonry iOS Examples.debug.xcconfig */, 321AA59CF7B045B6D503D2E5 /* Pods-Masonry iOS Examples.release.xcconfig */, ); name = Pods; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ DD52F226179CAD57005CD195 /* Masonry iOS Examples */ = { isa = PBXNativeTarget; buildConfigurationList = DD52F244179CAD57005CD195 /* Build configuration list for PBXNativeTarget "Masonry iOS Examples" */; buildPhases = ( 621F6A1FCAEF44F880874959 /* [CP] Check Pods Manifest.lock */, DD52F223179CAD57005CD195 /* Sources */, DD52F224179CAD57005CD195 /* Frameworks */, DD52F225179CAD57005CD195 /* Resources */, 5C6517785DFF4287BCDF458D /* [CP] Copy Pods Resources */, 9A6DE33A61510E8F9549C5EE /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "Masonry iOS Examples"; productName = "Masonry iOS Examples"; productReference = DD52F227179CAD57005CD195 /* Masonry iOS Examples.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ DD52F21F179CAD57005CD195 /* Project object */ = { isa = PBXProject; attributes = { CLASSPREFIX = MAS; LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Jonas Budelmann"; }; buildConfigurationList = DD52F222179CAD57005CD195 /* Build configuration list for PBXProject "Masonry iOS Examples" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = DD52F21E179CAD57005CD195; productRefGroup = DD52F228179CAD57005CD195 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( DD52F226179CAD57005CD195 /* Masonry iOS Examples */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ DD52F225179CAD57005CD195 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( DFBACE5D1F7B86860047F15A /* Launch Screen.storyboard in Resources */, 3C02224919D0C4EC00507321 /* Images.xcassets in Resources */, DD52F235179CAD57005CD195 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 5C6517785DFF4287BCDF458D /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-resources.sh\"\n"; showEnvVarsInLog = 0; }; 621F6A1FCAEF44F880874959 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-Masonry iOS Examples-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 9A6DE33A61510E8F9549C5EE /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ DD52F223179CAD57005CD195 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 00FC4A321B7359D700DCA999 /* MASExampleDistributeView.m in Sources */, DD175E6A182639FB0099129A /* MASExampleUpdateView.m in Sources */, DD52F237179CAD57005CD195 /* main.m in Sources */, 3DB1CAD5184538E200E91FC5 /* MASExampleArrayView.m in Sources */, DD52F23B179CAD57005CD195 /* MASAppDelegate.m in Sources */, DD52F251179CADC0005CD195 /* MASExampleBasicView.m in Sources */, 44C0E6AF1A9B9C55003C70CF /* MASExampleMarginView.m in Sources */, DD653E4A1843E61500D1EC5A /* MASExampleLayoutGuideViewController.m in Sources */, DDDF60CC181915E300BF7B8B /* MASExampleLabelView.m in Sources */, 27A27D461A6CF0C400D34F52 /* MASExampleAspectFitView.m in Sources */, DD52F252179CADC0005CD195 /* MASExampleConstantsView.m in Sources */, DD52F253179CADC0005CD195 /* MASExampleListViewController.m in Sources */, DFBACE591F7B76E40047F15A /* MASExampleSafeAreaLayoutGuideViewController.m in Sources */, DD52F254179CADC0005CD195 /* MASExampleSidesView.m in Sources */, DD32C3FD18E8BFF6001F6AD2 /* MASExampleAttributeChainingView.m in Sources */, DD52F255179CADC0005CD195 /* MASExampleViewController.m in Sources */, DDF3875C179D648D00178773 /* MASExampleAnimatedView.m in Sources */, DD7CC17617ACE990007A469E /* MASExampleDebuggingView.m in Sources */, 4BEB55B61957394E008C862B /* MASExampleRemakeView.m in Sources */, DD9B4D35183CC980002BF408 /* MASExampleScrollView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ DD52F233179CAD57005CD195 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( DD52F234179CAD57005CD195 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ DD52F242179CAD57005CD195 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; DD52F243179CAD57005CD195 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; DD52F245179CAD57005CD195 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 50B25D0621957AEB87C3FCC2 /* Pods-Masonry iOS Examples.debug.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Masonry iOS Examples/Masonry iOS Examples-Prefix.pch"; INFOPLIST_FILE = "Masonry iOS Examples/Masonry iOS Examples-Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "Masonry iOS Examples"; WRAPPER_EXTENSION = app; }; name = Debug; }; DD52F246179CAD57005CD195 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 321AA59CF7B045B6D503D2E5 /* Pods-Masonry iOS Examples.release.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Masonry iOS Examples/Masonry iOS Examples-Prefix.pch"; INFOPLIST_FILE = "Masonry iOS Examples/Masonry iOS Examples-Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "Masonry iOS Examples"; WRAPPER_EXTENSION = app; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ DD52F222179CAD57005CD195 /* Build configuration list for PBXProject "Masonry iOS Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( DD52F242179CAD57005CD195 /* Debug */, DD52F243179CAD57005CD195 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; DD52F244179CAD57005CD195 /* Build configuration list for PBXNativeTarget "Masonry iOS Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( DD52F245179CAD57005CD195 /* Debug */, DD52F246179CAD57005CD195 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = DD52F21F179CAD57005CD195 /* Project object */; } ================================================ FILE: Examples/Masonry iOS Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Examples/Masonry iOS Examples.xcodeproj/xcshareddata/xcschemes/Masonry iOS Examples.xcscheme ================================================ ================================================ FILE: ISSUE_TEMPLATE.md ================================================ ### New Issue Checklist 🚫 If this template is not filled out your issue **will** be closed with no comment. 🚫 * [ ] I have looked at the [Documentation](https://github.com/SnapKit/Masonry/blob/master/README.md) * [ ] I have filled out this issue template. ### Issue Info Info | Value | -------------------------|-------------------------------------| Platform | e.g. ios/osx/tvos Platform Version | e.g. 8.0 Masonry Version | e.g. 1.0 Integration Method | e.g. carthage/cocoapods/manually ### Issue Description ⚠️ Replace this with the description of your issue. ⚠️ ================================================ FILE: LICENSE ================================================ Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Masonry/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass ================================================ FILE: Masonry/MASCompositeConstraint.h ================================================ // // MASCompositeConstraint.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraint.h" #import "MASUtilities.h" /** * A group of MASConstraint objects */ @interface MASCompositeConstraint : MASConstraint /** * Creates a composite with a predefined array of children * * @param children child MASConstraints * * @return a composite constraint */ - (id)initWithChildren:(NSArray *)children; @end ================================================ FILE: Masonry/MASCompositeConstraint.m ================================================ // // MASCompositeConstraint.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASCompositeConstraint.h" #import "MASConstraint+Private.h" @interface MASCompositeConstraint () @property (nonatomic, strong) id mas_key; @property (nonatomic, strong) NSMutableArray *childConstraints; @end @implementation MASCompositeConstraint - (id)initWithChildren:(NSArray *)children { self = [super init]; if (!self) return nil; _childConstraints = [children mutableCopy]; for (MASConstraint *constraint in _childConstraints) { constraint.delegate = self; } return self; } #pragma mark - MASConstraintDelegate - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { NSUInteger index = [self.childConstraints indexOfObject:constraint]; NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; } - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { id strongDelegate = self.delegate; MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; newConstraint.delegate = self; [self.childConstraints addObject:newConstraint]; return newConstraint; } #pragma mark - NSLayoutConstraint multiplier proxies - (MASConstraint * (^)(CGFloat))multipliedBy { return ^id(CGFloat multiplier) { for (MASConstraint *constraint in self.childConstraints) { constraint.multipliedBy(multiplier); } return self; }; } - (MASConstraint * (^)(CGFloat))dividedBy { return ^id(CGFloat divider) { for (MASConstraint *constraint in self.childConstraints) { constraint.dividedBy(divider); } return self; }; } #pragma mark - MASLayoutPriority proxy - (MASConstraint * (^)(MASLayoutPriority))priority { return ^id(MASLayoutPriority priority) { for (MASConstraint *constraint in self.childConstraints) { constraint.priority(priority); } return self; }; } #pragma mark - NSLayoutRelation proxy - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { return ^id(id attr, NSLayoutRelation relation) { for (MASConstraint *constraint in self.childConstraints.copy) { constraint.equalToWithRelation(attr, relation); } return self; }; } #pragma mark - attribute chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; return self; } #pragma mark - Animator proxy #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { for (MASConstraint *constraint in self.childConstraints) { [constraint animator]; } return self; } #endif #pragma mark - debug helpers - (MASConstraint * (^)(id))key { return ^id(id key) { self.mas_key = key; int i = 0; for (MASConstraint *constraint in self.childConstraints) { constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); } return self; }; } #pragma mark - NSLayoutConstraint constant setters - (void)setInsets:(MASEdgeInsets)insets { for (MASConstraint *constraint in self.childConstraints) { constraint.insets = insets; } } - (void)setInset:(CGFloat)inset { for (MASConstraint *constraint in self.childConstraints) { constraint.inset = inset; } } - (void)setOffset:(CGFloat)offset { for (MASConstraint *constraint in self.childConstraints) { constraint.offset = offset; } } - (void)setSizeOffset:(CGSize)sizeOffset { for (MASConstraint *constraint in self.childConstraints) { constraint.sizeOffset = sizeOffset; } } - (void)setCenterOffset:(CGPoint)centerOffset { for (MASConstraint *constraint in self.childConstraints) { constraint.centerOffset = centerOffset; } } #pragma mark - MASConstraint - (void)activate { for (MASConstraint *constraint in self.childConstraints) { [constraint activate]; } } - (void)deactivate { for (MASConstraint *constraint in self.childConstraints) { [constraint deactivate]; } } - (void)install { for (MASConstraint *constraint in self.childConstraints) { constraint.updateExisting = self.updateExisting; [constraint install]; } } - (void)uninstall { for (MASConstraint *constraint in self.childConstraints) { [constraint uninstall]; } } @end ================================================ FILE: Masonry/MASConstraint+Private.h ================================================ // // MASConstraint+Private.h // Masonry // // Created by Nick Tymchenko on 29/04/14. // Copyright (c) 2014 cloudling. All rights reserved. // #import "MASConstraint.h" @protocol MASConstraintDelegate; @interface MASConstraint () /** * Whether or not to check for an existing constraint instead of adding constraint */ @property (nonatomic, assign) BOOL updateExisting; /** * Usually MASConstraintMaker but could be a parent MASConstraint */ @property (nonatomic, weak) id delegate; /** * Based on a provided value type, is equal to calling: * NSNumber - setOffset: * NSValue with CGPoint - setPointOffset: * NSValue with CGSize - setSizeOffset: * NSValue with MASEdgeInsets - setInsets: */ - (void)setLayoutConstantWithValue:(NSValue *)value; @end @interface MASConstraint (Abstract) /** * Sets the constraint relation to given NSLayoutRelation * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; /** * Override to set a custom chaining behaviour */ - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; @end @protocol MASConstraintDelegate /** * Notifies the delegate when the constraint needs to be replaced with another constraint. For example * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks */ - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; @end ================================================ FILE: Masonry/MASConstraint.h ================================================ // // MASConstraint.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" /** * Enables Constraints to be created with chainable syntax * Constraint can represent single NSLayoutConstraint (MASViewConstraint) * or a group of NSLayoutConstraints (MASComposisteConstraint) */ @interface MASConstraint : NSObject // Chaining Support /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (MASConstraint * (^)(MASEdgeInsets insets))insets; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (MASConstraint * (^)(CGFloat inset))inset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeWidth, NSLayoutAttributeHeight */ - (MASConstraint * (^)(CGSize offset))sizeOffset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY */ - (MASConstraint * (^)(CGPoint offset))centerOffset; /** * Modifies the NSLayoutConstraint constant */ - (MASConstraint * (^)(CGFloat offset))offset; /** * Modifies the NSLayoutConstraint constant based on a value type */ - (MASConstraint * (^)(NSValue *value))valueOffset; /** * Sets the NSLayoutConstraint multiplier property */ - (MASConstraint * (^)(CGFloat multiplier))multipliedBy; /** * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy */ - (MASConstraint * (^)(CGFloat divider))dividedBy; /** * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority */ - (MASConstraint * (^)(MASLayoutPriority priority))priority; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow */ - (MASConstraint * (^)(void))priorityLow; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium */ - (MASConstraint * (^)(void))priorityMedium; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh */ - (MASConstraint * (^)(void))priorityHigh; /** * Sets the constraint relation to NSLayoutRelationEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))equalTo; /** * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))greaterThanOrEqualTo; /** * Sets the constraint relation to NSLayoutRelationLessThanOrEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))lessThanOrEqualTo; /** * Optional semantic property which has no effect but improves the readability of constraint */ - (MASConstraint *)with; /** * Optional semantic property which has no effect but improves the readability of constraint */ - (MASConstraint *)and; /** * Creates a new MASCompositeConstraint with the called attribute and reciever */ - (MASConstraint *)left; - (MASConstraint *)top; - (MASConstraint *)right; - (MASConstraint *)bottom; - (MASConstraint *)leading; - (MASConstraint *)trailing; - (MASConstraint *)width; - (MASConstraint *)height; - (MASConstraint *)centerX; - (MASConstraint *)centerY; - (MASConstraint *)baseline; - (MASConstraint *)firstBaseline; - (MASConstraint *)lastBaseline; #if TARGET_OS_IPHONE || TARGET_OS_TV - (MASConstraint *)leftMargin; - (MASConstraint *)rightMargin; - (MASConstraint *)topMargin; - (MASConstraint *)bottomMargin; - (MASConstraint *)leadingMargin; - (MASConstraint *)trailingMargin; - (MASConstraint *)centerXWithinMargins; - (MASConstraint *)centerYWithinMargins; #endif /** * Sets the constraint debug name */ - (MASConstraint * (^)(id key))key; // NSLayoutConstraint constant Setters // for use outside of mas_updateConstraints/mas_makeConstraints blocks /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (void)setInsets:(MASEdgeInsets)insets; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (void)setInset:(CGFloat)inset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeWidth, NSLayoutAttributeHeight */ - (void)setSizeOffset:(CGSize)sizeOffset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY */ - (void)setCenterOffset:(CGPoint)centerOffset; /** * Modifies the NSLayoutConstraint constant */ - (void)setOffset:(CGFloat)offset; // NSLayoutConstraint Installation support #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) /** * Whether or not to go through the animator proxy when modifying the constraint */ @property (nonatomic, copy, readonly) MASConstraint *animator; #endif /** * Activates an NSLayoutConstraint if it's supported by an OS. * Invokes install otherwise. */ - (void)activate; /** * Deactivates previously installed/activated NSLayoutConstraint. */ - (void)deactivate; /** * Creates a NSLayoutConstraint and adds it to the appropriate view. */ - (void)install; /** * Removes previously installed NSLayoutConstraint */ - (void)uninstall; @end /** * Convenience auto-boxing macros for MASConstraint methods. * * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax. * A potential drawback of this is that the unprefixed macros will appear in global scope. */ #define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__))) #define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__))) #define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__))) #define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__))) #ifdef MAS_SHORTHAND_GLOBALS #define equalTo(...) mas_equalTo(__VA_ARGS__) #define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__) #define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__) #define offset(...) mas_offset(__VA_ARGS__) #endif @interface MASConstraint (AutoboxingSupport) /** * Aliases to corresponding relation methods (for shorthand macros) * Also needed to aid autocompletion */ - (MASConstraint * (^)(id attr))mas_equalTo; - (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo; - (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo; /** * A dummy method to aid autocompletion */ - (MASConstraint * (^)(id offset))mas_offset; @end ================================================ FILE: Masonry/MASConstraint.m ================================================ // // MASConstraint.m // Masonry // // Created by Nick Tymchenko on 1/20/14. // #import "MASConstraint.h" #import "MASConstraint+Private.h" #define MASMethodNotImplemented() \ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \ userInfo:nil] @implementation MASConstraint #pragma mark - Init - (id)init { NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly."); return [super init]; } #pragma mark - NSLayoutRelation proxies - (MASConstraint * (^)(id))equalTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationEqual); }; } - (MASConstraint * (^)(id))mas_equalTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationEqual); }; } - (MASConstraint * (^)(id))greaterThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); }; } - (MASConstraint * (^)(id))mas_greaterThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); }; } - (MASConstraint * (^)(id))lessThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); }; } - (MASConstraint * (^)(id))mas_lessThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); }; } #pragma mark - MASLayoutPriority proxies - (MASConstraint * (^)(void))priorityLow { return ^id{ self.priority(MASLayoutPriorityDefaultLow); return self; }; } - (MASConstraint * (^)(void))priorityMedium { return ^id{ self.priority(MASLayoutPriorityDefaultMedium); return self; }; } - (MASConstraint * (^)(void))priorityHigh { return ^id{ self.priority(MASLayoutPriorityDefaultHigh); return self; }; } #pragma mark - NSLayoutConstraint constant proxies - (MASConstraint * (^)(MASEdgeInsets))insets { return ^id(MASEdgeInsets insets){ self.insets = insets; return self; }; } - (MASConstraint * (^)(CGFloat))inset { return ^id(CGFloat inset){ self.inset = inset; return self; }; } - (MASConstraint * (^)(CGSize))sizeOffset { return ^id(CGSize offset) { self.sizeOffset = offset; return self; }; } - (MASConstraint * (^)(CGPoint))centerOffset { return ^id(CGPoint offset) { self.centerOffset = offset; return self; }; } - (MASConstraint * (^)(CGFloat))offset { return ^id(CGFloat offset){ self.offset = offset; return self; }; } - (MASConstraint * (^)(NSValue *value))valueOffset { return ^id(NSValue *offset) { NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset); [self setLayoutConstantWithValue:offset]; return self; }; } - (MASConstraint * (^)(id offset))mas_offset { // Will never be called due to macro return nil; } #pragma mark - NSLayoutConstraint constant setter - (void)setLayoutConstantWithValue:(NSValue *)value { if ([value isKindOfClass:NSNumber.class]) { self.offset = [(NSNumber *)value doubleValue]; } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) { CGPoint point; [value getValue:&point]; self.centerOffset = point; } else if (strcmp(value.objCType, @encode(CGSize)) == 0) { CGSize size; [value getValue:&size]; self.sizeOffset = size; } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) { MASEdgeInsets insets; [value getValue:&insets]; self.insets = insets; } else { NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value); } } #pragma mark - Semantic properties - (MASConstraint *)with { return self; } - (MASConstraint *)and { return self; } #pragma mark - Chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute { MASMethodNotImplemented(); } - (MASConstraint *)left { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; } - (MASConstraint *)top { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; } - (MASConstraint *)right { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; } - (MASConstraint *)bottom { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; } - (MASConstraint *)leading { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; } - (MASConstraint *)trailing { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; } - (MASConstraint *)width { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; } - (MASConstraint *)height { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; } - (MASConstraint *)centerX { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; } - (MASConstraint *)centerY { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; } - (MASConstraint *)baseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; } - (MASConstraint *)firstBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASConstraint *)lastBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; } #if TARGET_OS_IPHONE || TARGET_OS_TV - (MASConstraint *)leftMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASConstraint *)rightMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; } - (MASConstraint *)topMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; } - (MASConstraint *)bottomMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASConstraint *)leadingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASConstraint *)trailingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASConstraint *)centerXWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASConstraint *)centerYWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } #endif #pragma mark - Abstract - (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); } - (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); } - (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); } - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); } - (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); } - (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } - (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); } - (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } - (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } - (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); } #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { MASMethodNotImplemented(); } #endif - (void)activate { MASMethodNotImplemented(); } - (void)deactivate { MASMethodNotImplemented(); } - (void)install { MASMethodNotImplemented(); } - (void)uninstall { MASMethodNotImplemented(); } @end ================================================ FILE: Masonry/MASConstraintMaker.h ================================================ // // MASConstraintMaker.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraint.h" #import "MASUtilities.h" typedef NS_OPTIONS(NSInteger, MASAttribute) { MASAttributeLeft = 1 << NSLayoutAttributeLeft, MASAttributeRight = 1 << NSLayoutAttributeRight, MASAttributeTop = 1 << NSLayoutAttributeTop, MASAttributeBottom = 1 << NSLayoutAttributeBottom, MASAttributeLeading = 1 << NSLayoutAttributeLeading, MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, MASAttributeWidth = 1 << NSLayoutAttributeWidth, MASAttributeHeight = 1 << NSLayoutAttributeHeight, MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, #if TARGET_OS_IPHONE || TARGET_OS_TV MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, #endif }; /** * Provides factory methods for creating MASConstraints. * Constraints are collected until they are ready to be installed * */ @interface MASConstraintMaker : NSObject /** * The following properties return a new MASViewConstraint * with the first item set to the makers associated view and the appropriate MASViewAttribute */ @property (nonatomic, strong, readonly) MASConstraint *left; @property (nonatomic, strong, readonly) MASConstraint *top; @property (nonatomic, strong, readonly) MASConstraint *right; @property (nonatomic, strong, readonly) MASConstraint *bottom; @property (nonatomic, strong, readonly) MASConstraint *leading; @property (nonatomic, strong, readonly) MASConstraint *trailing; @property (nonatomic, strong, readonly) MASConstraint *width; @property (nonatomic, strong, readonly) MASConstraint *height; @property (nonatomic, strong, readonly) MASConstraint *centerX; @property (nonatomic, strong, readonly) MASConstraint *centerY; @property (nonatomic, strong, readonly) MASConstraint *baseline; @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; #if TARGET_OS_IPHONE || TARGET_OS_TV @property (nonatomic, strong, readonly) MASConstraint *leftMargin; @property (nonatomic, strong, readonly) MASConstraint *rightMargin; @property (nonatomic, strong, readonly) MASConstraint *topMargin; @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; #endif /** * Returns a block which creates a new MASCompositeConstraint with the first item set * to the makers associated view and children corresponding to the set bits in the * MASAttribute parameter. Combine multiple attributes via binary-or. */ @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges * which generates the appropriate MASViewConstraint children (top, left, bottom, right) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *edges; /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize * which generates the appropriate MASViewConstraint children (width, height) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *size; /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter * which generates the appropriate MASViewConstraint children (centerX, centerY) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *center; /** * Whether or not to check for an existing constraint instead of adding constraint */ @property (nonatomic, assign) BOOL updateExisting; /** * Whether or not to remove existing constraints prior to installing */ @property (nonatomic, assign) BOOL removeExisting; /** * initialises the maker with a default view * * @param view any MASConstraint are created with this view as the first item * * @return a new MASConstraintMaker */ - (id)initWithView:(MAS_VIEW *)view; /** * Calls install method on any MASConstraints which have been created by this maker * * @return an array of all the installed MASConstraints */ - (NSArray *)install; - (MASConstraint * (^)(dispatch_block_t))group; @end ================================================ FILE: Masonry/MASConstraintMaker.m ================================================ // // MASConstraintMaker.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraintMaker.h" #import "MASViewConstraint.h" #import "MASCompositeConstraint.h" #import "MASConstraint+Private.h" #import "MASViewAttribute.h" #import "View+MASAdditions.h" @interface MASConstraintMaker () @property (nonatomic, weak) MAS_VIEW *view; @property (nonatomic, strong) NSMutableArray *constraints; @end @implementation MASConstraintMaker - (id)initWithView:(MAS_VIEW *)view { self = [super init]; if (!self) return nil; self.view = view; self.constraints = NSMutableArray.new; return self; } - (NSArray *)install { if (self.removeExisting) { NSArray *installedConstraints = [MASViewConstraint installedConstraintsForView:self.view]; for (MASConstraint *constraint in installedConstraints) { [constraint uninstall]; } } NSArray *constraints = self.constraints.copy; for (MASConstraint *constraint in constraints) { constraint.updateExisting = self.updateExisting; [constraint install]; } [self.constraints removeAllObjects]; return constraints; } #pragma mark - MASConstraintDelegate - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { NSUInteger index = [self.constraints indexOfObject:constraint]; NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); [self.constraints replaceObjectAtIndex:index withObject:replacementConstraint]; } - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { MASViewAttribute *viewAttribute = [[MASViewAttribute alloc] initWithView:self.view layoutAttribute:layoutAttribute]; MASViewConstraint *newConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:viewAttribute]; if ([constraint isKindOfClass:MASViewConstraint.class]) { //replace with composite constraint NSArray *children = @[constraint, newConstraint]; MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; compositeConstraint.delegate = self; [self constraint:constraint shouldBeReplacedWithConstraint:compositeConstraint]; return compositeConstraint; } if (!constraint) { newConstraint.delegate = self; [self.constraints addObject:newConstraint]; } return newConstraint; } - (MASConstraint *)addConstraintWithAttributes:(MASAttribute)attrs { __unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading | MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX | MASAttributeCenterY | MASAttributeBaseline | MASAttributeFirstBaseline | MASAttributeLastBaseline #if TARGET_OS_IPHONE || TARGET_OS_TV | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins | MASAttributeCenterYWithinMargins #endif ); NSAssert((attrs & anyAttribute) != 0, @"You didn't pass any attribute to make.attributes(...)"); NSMutableArray *attributes = [NSMutableArray array]; if (attrs & MASAttributeLeft) [attributes addObject:self.view.mas_left]; if (attrs & MASAttributeRight) [attributes addObject:self.view.mas_right]; if (attrs & MASAttributeTop) [attributes addObject:self.view.mas_top]; if (attrs & MASAttributeBottom) [attributes addObject:self.view.mas_bottom]; if (attrs & MASAttributeLeading) [attributes addObject:self.view.mas_leading]; if (attrs & MASAttributeTrailing) [attributes addObject:self.view.mas_trailing]; if (attrs & MASAttributeWidth) [attributes addObject:self.view.mas_width]; if (attrs & MASAttributeHeight) [attributes addObject:self.view.mas_height]; if (attrs & MASAttributeCenterX) [attributes addObject:self.view.mas_centerX]; if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY]; if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline]; if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline]; if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline]; #if TARGET_OS_IPHONE || TARGET_OS_TV if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin]; if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin]; if (attrs & MASAttributeTopMargin) [attributes addObject:self.view.mas_topMargin]; if (attrs & MASAttributeBottomMargin) [attributes addObject:self.view.mas_bottomMargin]; if (attrs & MASAttributeLeadingMargin) [attributes addObject:self.view.mas_leadingMargin]; if (attrs & MASAttributeTrailingMargin) [attributes addObject:self.view.mas_trailingMargin]; if (attrs & MASAttributeCenterXWithinMargins) [attributes addObject:self.view.mas_centerXWithinMargins]; if (attrs & MASAttributeCenterYWithinMargins) [attributes addObject:self.view.mas_centerYWithinMargins]; #endif NSMutableArray *children = [NSMutableArray arrayWithCapacity:attributes.count]; for (MASViewAttribute *a in attributes) { [children addObject:[[MASViewConstraint alloc] initWithFirstViewAttribute:a]]; } MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; constraint.delegate = self; [self.constraints addObject:constraint]; return constraint; } #pragma mark - standard Attributes - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { return [self constraint:nil addConstraintWithLayoutAttribute:layoutAttribute]; } - (MASConstraint *)left { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; } - (MASConstraint *)top { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; } - (MASConstraint *)right { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; } - (MASConstraint *)bottom { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; } - (MASConstraint *)leading { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; } - (MASConstraint *)trailing { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; } - (MASConstraint *)width { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; } - (MASConstraint *)height { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; } - (MASConstraint *)centerX { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; } - (MASConstraint *)centerY { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; } - (MASConstraint *)baseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; } - (MASConstraint *(^)(MASAttribute))attributes { return ^(MASAttribute attrs){ return [self addConstraintWithAttributes:attrs]; }; } - (MASConstraint *)firstBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASConstraint *)lastBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; } #if TARGET_OS_IPHONE || TARGET_OS_TV - (MASConstraint *)leftMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASConstraint *)rightMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; } - (MASConstraint *)topMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; } - (MASConstraint *)bottomMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASConstraint *)leadingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASConstraint *)trailingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASConstraint *)centerXWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASConstraint *)centerYWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } #endif #pragma mark - composite Attributes - (MASConstraint *)edges { return [self addConstraintWithAttributes:MASAttributeTop | MASAttributeLeft | MASAttributeRight | MASAttributeBottom]; } - (MASConstraint *)size { return [self addConstraintWithAttributes:MASAttributeWidth | MASAttributeHeight]; } - (MASConstraint *)center { return [self addConstraintWithAttributes:MASAttributeCenterX | MASAttributeCenterY]; } #pragma mark - grouping - (MASConstraint *(^)(dispatch_block_t group))group { return ^id(dispatch_block_t group) { NSInteger previousCount = self.constraints.count; group(); NSArray *children = [self.constraints subarrayWithRange:NSMakeRange(previousCount, self.constraints.count - previousCount)]; MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; constraint.delegate = self; return constraint; }; } @end ================================================ FILE: Masonry/MASLayoutConstraint.h ================================================ // // MASLayoutConstraint.h // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASUtilities.h" /** * When you are debugging or printing the constraints attached to a view this subclass * makes it easier to identify which constraints have been created via Masonry */ @interface MASLayoutConstraint : NSLayoutConstraint /** * a key to associate with this constraint */ @property (nonatomic, strong) id mas_key; @end ================================================ FILE: Masonry/MASLayoutConstraint.m ================================================ // // MASLayoutConstraint.m // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASLayoutConstraint.h" @implementation MASLayoutConstraint @end ================================================ FILE: Masonry/MASUtilities.h ================================================ // // MASUtilities.h // Masonry // // Created by Jonas Budelmann on 19/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import #if TARGET_OS_IPHONE || TARGET_OS_TV #import #define MAS_VIEW UIView #define MAS_VIEW_CONTROLLER UIViewController #define MASEdgeInsets UIEdgeInsets typedef UILayoutPriority MASLayoutPriority; static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; #elif TARGET_OS_MAC #import #define MAS_VIEW NSView #define MASEdgeInsets NSEdgeInsets typedef NSLayoutPriority MASLayoutPriority; static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; #endif /** * Allows you to attach keys to objects matching the variable names passed. * * view1.mas_key = @"view1", view2.mas_key = @"view2"; * * is equivalent to: * * MASAttachKeys(view1, view2); */ #define MASAttachKeys(...) \ { \ NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ for (id key in keyPairs.allKeys) { \ id obj = keyPairs[key]; \ NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ @"Cannot attach mas_key to %@", obj); \ [obj setMas_key:key]; \ } \ } /** * Used to create object hashes * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html */ #define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) #define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) /** * Given a scalar or struct value, wraps it in NSValue * Based on EXPObjectify: https://github.com/specta/expecta */ static inline id _MASBoxValue(const char *type, ...) { va_list v; va_start(v, type); id obj = nil; if (strcmp(type, @encode(id)) == 0) { id actual = va_arg(v, id); obj = actual; } else if (strcmp(type, @encode(CGPoint)) == 0) { CGPoint actual = (CGPoint)va_arg(v, CGPoint); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(CGSize)) == 0) { CGSize actual = (CGSize)va_arg(v, CGSize); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(double)) == 0) { double actual = (double)va_arg(v, double); obj = [NSNumber numberWithDouble:actual]; } else if (strcmp(type, @encode(float)) == 0) { float actual = (float)va_arg(v, double); obj = [NSNumber numberWithFloat:actual]; } else if (strcmp(type, @encode(int)) == 0) { int actual = (int)va_arg(v, int); obj = [NSNumber numberWithInt:actual]; } else if (strcmp(type, @encode(long)) == 0) { long actual = (long)va_arg(v, long); obj = [NSNumber numberWithLong:actual]; } else if (strcmp(type, @encode(long long)) == 0) { long long actual = (long long)va_arg(v, long long); obj = [NSNumber numberWithLongLong:actual]; } else if (strcmp(type, @encode(short)) == 0) { short actual = (short)va_arg(v, int); obj = [NSNumber numberWithShort:actual]; } else if (strcmp(type, @encode(char)) == 0) { char actual = (char)va_arg(v, int); obj = [NSNumber numberWithChar:actual]; } else if (strcmp(type, @encode(bool)) == 0) { bool actual = (bool)va_arg(v, int); obj = [NSNumber numberWithBool:actual]; } else if (strcmp(type, @encode(unsigned char)) == 0) { unsigned char actual = (unsigned char)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedChar:actual]; } else if (strcmp(type, @encode(unsigned int)) == 0) { unsigned int actual = (unsigned int)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedInt:actual]; } else if (strcmp(type, @encode(unsigned long)) == 0) { unsigned long actual = (unsigned long)va_arg(v, unsigned long); obj = [NSNumber numberWithUnsignedLong:actual]; } else if (strcmp(type, @encode(unsigned long long)) == 0) { unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); obj = [NSNumber numberWithUnsignedLongLong:actual]; } else if (strcmp(type, @encode(unsigned short)) == 0) { unsigned short actual = (unsigned short)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedShort:actual]; } va_end(v); return obj; } #define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) ================================================ FILE: Masonry/MASViewAttribute.h ================================================ // // MASViewAttribute.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" /** * An immutable tuple which stores the view and the related NSLayoutAttribute. * Describes part of either the left or right hand side of a constraint equation */ @interface MASViewAttribute : NSObject /** * The view which the reciever relates to. Can be nil if item is not a view. */ @property (nonatomic, weak, readonly) MAS_VIEW *view; /** * The item which the reciever relates to. */ @property (nonatomic, weak, readonly) id item; /** * The attribute which the reciever relates to */ @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; /** * Convenience initializer. */ - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; /** * The designated initializer. */ - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; /** * Determine whether the layoutAttribute is a size attribute * * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight */ - (BOOL)isSizeAttribute; @end ================================================ FILE: Masonry/MASViewAttribute.m ================================================ // // MASViewAttribute.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewAttribute.h" @implementation MASViewAttribute - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; return self; } - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { self = [super init]; if (!self) return nil; _view = view; _item = item; _layoutAttribute = layoutAttribute; return self; } - (BOOL)isSizeAttribute { return self.layoutAttribute == NSLayoutAttributeWidth || self.layoutAttribute == NSLayoutAttributeHeight; } - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { if ([viewAttribute isKindOfClass:self.class]) { return self.view == viewAttribute.view && self.layoutAttribute == viewAttribute.layoutAttribute; } return [super isEqual:viewAttribute]; } - (NSUInteger)hash { return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; } @end ================================================ FILE: Masonry/MASViewConstraint.h ================================================ // // MASViewConstraint.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewAttribute.h" #import "MASConstraint.h" #import "MASLayoutConstraint.h" #import "MASUtilities.h" /** * A single constraint. * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view */ @interface MASViewConstraint : MASConstraint /** * First item/view and first attribute of the NSLayoutConstraint */ @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; /** * Second item/view and second attribute of the NSLayoutConstraint */ @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; /** * initialises the MASViewConstraint with the first part of the equation * * @param firstViewAttribute view.mas_left, view.mas_width etc. * * @return a new view constraint */ - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; /** * Returns all MASViewConstraints installed with this view as a first item. * * @param view A view to retrieve constraints for. * * @return An array of MASViewConstraints. */ + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; @end ================================================ FILE: Masonry/MASViewConstraint.m ================================================ // // MASViewConstraint.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewConstraint.h" #import "MASConstraint+Private.h" #import "MASCompositeConstraint.h" #import "MASLayoutConstraint.h" #import "View+MASAdditions.h" #import @interface MAS_VIEW (MASConstraints) @property (nonatomic, readonly) NSMutableSet *mas_installedConstraints; @end @implementation MAS_VIEW (MASConstraints) static char kInstalledConstraintsKey; - (NSMutableSet *)mas_installedConstraints { NSMutableSet *constraints = objc_getAssociatedObject(self, &kInstalledConstraintsKey); if (!constraints) { constraints = [NSMutableSet set]; objc_setAssociatedObject(self, &kInstalledConstraintsKey, constraints, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } return constraints; } @end @interface MASViewConstraint () @property (nonatomic, strong, readwrite) MASViewAttribute *secondViewAttribute; @property (nonatomic, weak) MAS_VIEW *installedView; @property (nonatomic, weak) MASLayoutConstraint *layoutConstraint; @property (nonatomic, assign) NSLayoutRelation layoutRelation; @property (nonatomic, assign) MASLayoutPriority layoutPriority; @property (nonatomic, assign) CGFloat layoutMultiplier; @property (nonatomic, assign) CGFloat layoutConstant; @property (nonatomic, assign) BOOL hasLayoutRelation; @property (nonatomic, strong) id mas_key; @property (nonatomic, assign) BOOL useAnimator; @end @implementation MASViewConstraint - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute { self = [super init]; if (!self) return nil; _firstViewAttribute = firstViewAttribute; self.layoutPriority = MASLayoutPriorityRequired; self.layoutMultiplier = 1; return self; } #pragma mark - NSCoping - (id)copyWithZone:(NSZone __unused *)zone { MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute]; constraint.layoutConstant = self.layoutConstant; constraint.layoutRelation = self.layoutRelation; constraint.layoutPriority = self.layoutPriority; constraint.layoutMultiplier = self.layoutMultiplier; constraint.delegate = self.delegate; return constraint; } #pragma mark - Public + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view { return [view.mas_installedConstraints allObjects]; } #pragma mark - Private - (void)setLayoutConstant:(CGFloat)layoutConstant { _layoutConstant = layoutConstant; #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) if (self.useAnimator) { [self.layoutConstraint.animator setConstant:layoutConstant]; } else { self.layoutConstraint.constant = layoutConstant; } #else self.layoutConstraint.constant = layoutConstant; #endif } - (void)setLayoutRelation:(NSLayoutRelation)layoutRelation { _layoutRelation = layoutRelation; self.hasLayoutRelation = YES; } - (BOOL)supportsActiveProperty { return [self.layoutConstraint respondsToSelector:@selector(isActive)]; } - (BOOL)isActive { BOOL active = YES; if ([self supportsActiveProperty]) { active = [self.layoutConstraint isActive]; } return active; } - (BOOL)hasBeenInstalled { return (self.layoutConstraint != nil) && [self isActive]; } - (void)setSecondViewAttribute:(id)secondViewAttribute { if ([secondViewAttribute isKindOfClass:NSValue.class]) { [self setLayoutConstantWithValue:secondViewAttribute]; } else if ([secondViewAttribute isKindOfClass:MAS_VIEW.class]) { _secondViewAttribute = [[MASViewAttribute alloc] initWithView:secondViewAttribute layoutAttribute:self.firstViewAttribute.layoutAttribute]; } else if ([secondViewAttribute isKindOfClass:MASViewAttribute.class]) { MASViewAttribute *attr = secondViewAttribute; if (attr.layoutAttribute == NSLayoutAttributeNotAnAttribute) { _secondViewAttribute = [[MASViewAttribute alloc] initWithView:attr.view item:attr.item layoutAttribute:self.firstViewAttribute.layoutAttribute];; } else { _secondViewAttribute = secondViewAttribute; } } else { NSAssert(NO, @"attempting to add unsupported attribute: %@", secondViewAttribute); } } #pragma mark - NSLayoutConstraint multiplier proxies - (MASConstraint * (^)(CGFloat))multipliedBy { return ^id(CGFloat multiplier) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint multiplier after it has been installed"); self.layoutMultiplier = multiplier; return self; }; } - (MASConstraint * (^)(CGFloat))dividedBy { return ^id(CGFloat divider) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint multiplier after it has been installed"); self.layoutMultiplier = 1.0/divider; return self; }; } #pragma mark - MASLayoutPriority proxy - (MASConstraint * (^)(MASLayoutPriority))priority { return ^id(MASLayoutPriority priority) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint priority after it has been installed"); self.layoutPriority = priority; return self; }; } #pragma mark - NSLayoutRelation proxy - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { return ^id(id attribute, NSLayoutRelation relation) { if ([attribute isKindOfClass:NSArray.class]) { NSAssert(!self.hasLayoutRelation, @"Redefinition of constraint relation"); NSMutableArray *children = NSMutableArray.new; for (id attr in attribute) { MASViewConstraint *viewConstraint = [self copy]; viewConstraint.layoutRelation = relation; viewConstraint.secondViewAttribute = attr; [children addObject:viewConstraint]; } MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; compositeConstraint.delegate = self.delegate; [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint]; return compositeConstraint; } else { NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSValue.class], @"Redefinition of constraint relation"); self.layoutRelation = relation; self.secondViewAttribute = attribute; return self; } }; } #pragma mark - Semantic properties - (MASConstraint *)with { return self; } - (MASConstraint *)and { return self; } #pragma mark - attribute chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { NSAssert(!self.hasLayoutRelation, @"Attributes should be chained before defining the constraint relation"); return [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; } #pragma mark - Animator proxy #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { self.useAnimator = YES; return self; } #endif #pragma mark - debug helpers - (MASConstraint * (^)(id))key { return ^id(id key) { self.mas_key = key; return self; }; } #pragma mark - NSLayoutConstraint constant setters - (void)setInsets:(MASEdgeInsets)insets { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeLeft: case NSLayoutAttributeLeading: self.layoutConstant = insets.left; break; case NSLayoutAttributeTop: self.layoutConstant = insets.top; break; case NSLayoutAttributeBottom: self.layoutConstant = -insets.bottom; break; case NSLayoutAttributeRight: case NSLayoutAttributeTrailing: self.layoutConstant = -insets.right; break; default: break; } } - (void)setInset:(CGFloat)inset { [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}]; } - (void)setOffset:(CGFloat)offset { self.layoutConstant = offset; } - (void)setSizeOffset:(CGSize)sizeOffset { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeWidth: self.layoutConstant = sizeOffset.width; break; case NSLayoutAttributeHeight: self.layoutConstant = sizeOffset.height; break; default: break; } } - (void)setCenterOffset:(CGPoint)centerOffset { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeCenterX: self.layoutConstant = centerOffset.x; break; case NSLayoutAttributeCenterY: self.layoutConstant = centerOffset.y; break; default: break; } } #pragma mark - MASConstraint - (void)activate { [self install]; } - (void)deactivate { [self uninstall]; } - (void)install { if (self.hasBeenInstalled) { return; } if ([self supportsActiveProperty] && self.layoutConstraint) { self.layoutConstraint.active = YES; [self.firstViewAttribute.view.mas_installedConstraints addObject:self]; return; } MAS_VIEW *firstLayoutItem = self.firstViewAttribute.item; NSLayoutAttribute firstLayoutAttribute = self.firstViewAttribute.layoutAttribute; MAS_VIEW *secondLayoutItem = self.secondViewAttribute.item; NSLayoutAttribute secondLayoutAttribute = self.secondViewAttribute.layoutAttribute; // alignment attributes must have a secondViewAttribute // therefore we assume that is refering to superview // eg make.left.equalTo(@10) if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) { secondLayoutItem = self.firstViewAttribute.view.superview; secondLayoutAttribute = firstLayoutAttribute; } MASLayoutConstraint *layoutConstraint = [MASLayoutConstraint constraintWithItem:firstLayoutItem attribute:firstLayoutAttribute relatedBy:self.layoutRelation toItem:secondLayoutItem attribute:secondLayoutAttribute multiplier:self.layoutMultiplier constant:self.layoutConstant]; layoutConstraint.priority = self.layoutPriority; layoutConstraint.mas_key = self.mas_key; if (self.secondViewAttribute.view) { MAS_VIEW *closestCommonSuperview = [self.firstViewAttribute.view mas_closestCommonSuperview:self.secondViewAttribute.view]; NSAssert(closestCommonSuperview, @"couldn't find a common superview for %@ and %@", self.firstViewAttribute.view, self.secondViewAttribute.view); self.installedView = closestCommonSuperview; } else if (self.firstViewAttribute.isSizeAttribute) { self.installedView = self.firstViewAttribute.view; } else { self.installedView = self.firstViewAttribute.view.superview; } MASLayoutConstraint *existingConstraint = nil; if (self.updateExisting) { existingConstraint = [self layoutConstraintSimilarTo:layoutConstraint]; } if (existingConstraint) { // just update the constant existingConstraint.constant = layoutConstraint.constant; self.layoutConstraint = existingConstraint; } else { [self.installedView addConstraint:layoutConstraint]; self.layoutConstraint = layoutConstraint; [firstLayoutItem.mas_installedConstraints addObject:self]; } } - (MASLayoutConstraint *)layoutConstraintSimilarTo:(MASLayoutConstraint *)layoutConstraint { // check if any constraints are the same apart from the only mutable property constant // go through constraints in reverse as we do not want to match auto-resizing or interface builder constraints // and they are likely to be added first. for (NSLayoutConstraint *existingConstraint in self.installedView.constraints.reverseObjectEnumerator) { if (![existingConstraint isKindOfClass:MASLayoutConstraint.class]) continue; if (existingConstraint.firstItem != layoutConstraint.firstItem) continue; if (existingConstraint.secondItem != layoutConstraint.secondItem) continue; if (existingConstraint.firstAttribute != layoutConstraint.firstAttribute) continue; if (existingConstraint.secondAttribute != layoutConstraint.secondAttribute) continue; if (existingConstraint.relation != layoutConstraint.relation) continue; if (existingConstraint.multiplier != layoutConstraint.multiplier) continue; if (existingConstraint.priority != layoutConstraint.priority) continue; return (id)existingConstraint; } return nil; } - (void)uninstall { if ([self supportsActiveProperty]) { self.layoutConstraint.active = NO; [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; return; } [self.installedView removeConstraint:self.layoutConstraint]; self.layoutConstraint = nil; self.installedView = nil; [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; } @end ================================================ FILE: Masonry/Masonry.h ================================================ // // Masonry.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import //! Project version number for Masonry. FOUNDATION_EXPORT double MasonryVersionNumber; //! Project version string for Masonry. FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; #import "MASUtilities.h" #import "View+MASAdditions.h" #import "View+MASShorthandAdditions.h" #import "ViewController+MASAdditions.h" #import "NSArray+MASAdditions.h" #import "NSArray+MASShorthandAdditions.h" #import "MASConstraint.h" #import "MASCompositeConstraint.h" #import "MASViewAttribute.h" #import "MASViewConstraint.h" #import "MASConstraintMaker.h" #import "MASLayoutConstraint.h" #import "NSLayoutConstraint+MASDebugAdditions.h" ================================================ FILE: Masonry/NSArray+MASAdditions.h ================================================ // // NSArray+MASAdditions.h // // // Created by Daniel Hammond on 11/26/13. // // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" typedef NS_ENUM(NSUInteger, MASAxisType) { MASAxisTypeHorizontal, MASAxisTypeVertical }; @interface NSArray (MASAdditions) /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created MASConstraints */ - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. * If an existing constraint exists then it will be updated instead. * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. * All constraints previously installed for the views will be removed. * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * distribute with fixed spacing * * @param axisType which axis to distribute items along * @param fixedSpacing the spacing between each item * @param leadSpacing the spacing before the first item and the container * @param tailSpacing the spacing after the last item and the container */ - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; /** * distribute with fixed item size * * @param axisType which axis to distribute items along * @param fixedItemLength the fixed length of each item * @param leadSpacing the spacing before the first item and the container * @param tailSpacing the spacing after the last item and the container */ - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; @end ================================================ FILE: Masonry/NSArray+MASAdditions.m ================================================ // // NSArray+MASAdditions.m // // // Created by Daniel Hammond on 11/26/13. // // #import "NSArray+MASAdditions.h" #import "View+MASAdditions.h" @implementation NSArray (MASAdditions) - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_makeConstraints:block]]; } return constraints; } - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_updateConstraints:block]]; } return constraints; } - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_remakeConstraints:block]]; } return constraints; } - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { if (self.count < 2) { NSAssert(self.count>1,@"views to distribute need to bigger than one"); return; } MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; if (axisType == MASAxisTypeHorizontal) { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { if (prev) { make.width.equalTo(prev); make.left.equalTo(prev.mas_right).offset(fixedSpacing); if (i == self.count - 1) {//last one make.right.equalTo(tempSuperView).offset(-tailSpacing); } } else {//first one make.left.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } else { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { if (prev) { make.height.equalTo(prev); make.top.equalTo(prev.mas_bottom).offset(fixedSpacing); if (i == self.count - 1) {//last one make.bottom.equalTo(tempSuperView).offset(-tailSpacing); } } else {//first one make.top.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } } - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { if (self.count < 2) { NSAssert(self.count>1,@"views to distribute need to bigger than one"); return; } MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; if (axisType == MASAxisTypeHorizontal) { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(fixedItemLength)); if (prev) { if (i == self.count - 1) {//last one make.right.equalTo(tempSuperView).offset(-tailSpacing); } else { CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); } } else {//first one make.left.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } else { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { make.height.equalTo(@(fixedItemLength)); if (prev) { if (i == self.count - 1) {//last one make.bottom.equalTo(tempSuperView).offset(-tailSpacing); } else { CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); } } else {//first one make.top.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } } - (MAS_VIEW *)mas_commonSuperviewOfViews { MAS_VIEW *commonSuperview = nil; MAS_VIEW *previousView = nil; for (id object in self) { if ([object isKindOfClass:[MAS_VIEW class]]) { MAS_VIEW *view = (MAS_VIEW *)object; if (previousView) { commonSuperview = [view mas_closestCommonSuperview:commonSuperview]; } else { commonSuperview = view; } previousView = view; } } NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy."); return commonSuperview; } @end ================================================ FILE: Masonry/NSArray+MASShorthandAdditions.h ================================================ // // NSArray+MASShorthandAdditions.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "NSArray+MASAdditions.h" #ifdef MAS_SHORTHAND /** * Shorthand array additions without the 'mas_' prefixes, * only enabled if MAS_SHORTHAND is defined */ @interface NSArray (MASShorthandAdditions) - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; @end @implementation NSArray (MASShorthandAdditions) - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_makeConstraints:block]; } - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_updateConstraints:block]; } - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_remakeConstraints:block]; } @end #endif ================================================ FILE: Masonry/NSLayoutConstraint+MASDebugAdditions.h ================================================ // // NSLayoutConstraint+MASDebugAdditions.h // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASUtilities.h" /** * makes debug and log output of NSLayoutConstraints more readable */ @interface NSLayoutConstraint (MASDebugAdditions) @end ================================================ FILE: Masonry/NSLayoutConstraint+MASDebugAdditions.m ================================================ // // NSLayoutConstraint+MASDebugAdditions.m // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "NSLayoutConstraint+MASDebugAdditions.h" #import "MASConstraint.h" #import "MASLayoutConstraint.h" @implementation NSLayoutConstraint (MASDebugAdditions) #pragma mark - description maps + (NSDictionary *)layoutRelationDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ descriptionMap = @{ @(NSLayoutRelationEqual) : @"==", @(NSLayoutRelationGreaterThanOrEqual) : @">=", @(NSLayoutRelationLessThanOrEqual) : @"<=", }; }); return descriptionMap; } + (NSDictionary *)layoutAttributeDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ descriptionMap = @{ @(NSLayoutAttributeTop) : @"top", @(NSLayoutAttributeLeft) : @"left", @(NSLayoutAttributeBottom) : @"bottom", @(NSLayoutAttributeRight) : @"right", @(NSLayoutAttributeLeading) : @"leading", @(NSLayoutAttributeTrailing) : @"trailing", @(NSLayoutAttributeWidth) : @"width", @(NSLayoutAttributeHeight) : @"height", @(NSLayoutAttributeCenterX) : @"centerX", @(NSLayoutAttributeCenterY) : @"centerY", @(NSLayoutAttributeBaseline) : @"baseline", @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", @(NSLayoutAttributeLastBaseline) : @"lastBaseline", #if TARGET_OS_IPHONE || TARGET_OS_TV @(NSLayoutAttributeLeftMargin) : @"leftMargin", @(NSLayoutAttributeRightMargin) : @"rightMargin", @(NSLayoutAttributeTopMargin) : @"topMargin", @(NSLayoutAttributeBottomMargin) : @"bottomMargin", @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", #endif }; }); return descriptionMap; } + (NSDictionary *)layoutPriorityDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ #if TARGET_OS_IPHONE || TARGET_OS_TV descriptionMap = @{ @(MASLayoutPriorityDefaultHigh) : @"high", @(MASLayoutPriorityDefaultLow) : @"low", @(MASLayoutPriorityDefaultMedium) : @"medium", @(MASLayoutPriorityRequired) : @"required", @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", }; #elif TARGET_OS_MAC descriptionMap = @{ @(MASLayoutPriorityDefaultHigh) : @"high", @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", @(MASLayoutPriorityDefaultMedium) : @"medium", @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", @(MASLayoutPriorityDefaultLow) : @"low", @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", @(MASLayoutPriorityRequired) : @"required", }; #endif }); return descriptionMap; } #pragma mark - description override + (NSString *)descriptionForObject:(id)obj { if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; } return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; } - (NSString *)description { NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; [description appendString:[self.class descriptionForObject:self]]; [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; } [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; if (self.secondItem) { [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; } if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; } if (self.multiplier != 1) { [description appendFormat:@" * %g", self.multiplier]; } if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { [description appendFormat:@" %g", self.constant]; } else { if (self.constant) { [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; } } if (self.priority != MASLayoutPriorityRequired) { [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; } [description appendString:@">"]; return description; } @end ================================================ FILE: Masonry/View+MASAdditions.h ================================================ // // UIView+MASAdditions.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" /** * Provides constraint maker block * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs */ @interface MAS_VIEW (MASAdditions) /** * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute */ @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; #if TARGET_OS_IPHONE || TARGET_OS_TV @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeading NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTrailing NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideWidth NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideHeight NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideCenterX NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideCenterY NS_AVAILABLE_IOS(11.0); #endif /** * a key to associate with this view */ @property (nonatomic, strong) id mas_key; /** * Finds the closest common superview between this view and another view * * @param view other view * * @return returns nil if common superview could not be found */ - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created MASConstraints */ - (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. * If an existing constraint exists then it will be updated instead. * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. * All constraints previously installed for the view will be removed. * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; @end ================================================ FILE: Masonry/View+MASAdditions.m ================================================ // // UIView+MASAdditions.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "View+MASAdditions.h" #import @implementation MAS_VIEW (MASAdditions) - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; block(constraintMaker); return [constraintMaker install]; } - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; constraintMaker.updateExisting = YES; block(constraintMaker); return [constraintMaker install]; } - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; constraintMaker.removeExisting = YES; block(constraintMaker); return [constraintMaker install]; } #pragma mark - NSLayoutAttribute properties - (MASViewAttribute *)mas_left { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; } - (MASViewAttribute *)mas_top { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_right { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; } - (MASViewAttribute *)mas_bottom { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_leading { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; } - (MASViewAttribute *)mas_trailing { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; } - (MASViewAttribute *)mas_width { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; } - (MASViewAttribute *)mas_height { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; } - (MASViewAttribute *)mas_centerX { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; } - (MASViewAttribute *)mas_centerY { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; } - (MASViewAttribute *)mas_baseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; } - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute { return ^(NSLayoutAttribute attr) { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; }; } - (MASViewAttribute *)mas_firstBaseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASViewAttribute *)mas_lastBaseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; } #if TARGET_OS_IPHONE || TARGET_OS_TV - (MASViewAttribute *)mas_leftMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASViewAttribute *)mas_rightMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; } - (MASViewAttribute *)mas_topMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; } - (MASViewAttribute *)mas_bottomMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASViewAttribute *)mas_leadingMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASViewAttribute *)mas_trailingMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASViewAttribute *)mas_centerXWithinMargins { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASViewAttribute *)mas_centerYWithinMargins { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } - (MASViewAttribute *)mas_safeAreaLayoutGuide { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeNotAnAttribute]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideLeading { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeading]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideTrailing { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTrailing]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideLeft { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideRight { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideWidth { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeWidth]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideHeight { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeHeight]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideCenterX { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeCenterX]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideCenterY { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeCenterY]; } #endif #pragma mark - associated properties - (id)mas_key { return objc_getAssociatedObject(self, @selector(mas_key)); } - (void)setMas_key:(id)key { objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } #pragma mark - heirachy - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { MAS_VIEW *closestCommonSuperview = nil; MAS_VIEW *secondViewSuperview = view; while (!closestCommonSuperview && secondViewSuperview) { MAS_VIEW *firstViewSuperview = self; while (!closestCommonSuperview && firstViewSuperview) { if (secondViewSuperview == firstViewSuperview) { closestCommonSuperview = secondViewSuperview; } firstViewSuperview = firstViewSuperview.superview; } secondViewSuperview = secondViewSuperview.superview; } return closestCommonSuperview; } @end ================================================ FILE: Masonry/View+MASShorthandAdditions.h ================================================ // // UIView+MASShorthandAdditions.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "View+MASAdditions.h" #ifdef MAS_SHORTHAND /** * Shorthand view additions without the 'mas_' prefixes, * only enabled if MAS_SHORTHAND is defined */ @interface MAS_VIEW (MASShorthandAdditions) @property (nonatomic, strong, readonly) MASViewAttribute *left; @property (nonatomic, strong, readonly) MASViewAttribute *top; @property (nonatomic, strong, readonly) MASViewAttribute *right; @property (nonatomic, strong, readonly) MASViewAttribute *bottom; @property (nonatomic, strong, readonly) MASViewAttribute *leading; @property (nonatomic, strong, readonly) MASViewAttribute *trailing; @property (nonatomic, strong, readonly) MASViewAttribute *width; @property (nonatomic, strong, readonly) MASViewAttribute *height; @property (nonatomic, strong, readonly) MASViewAttribute *centerX; @property (nonatomic, strong, readonly) MASViewAttribute *centerY; @property (nonatomic, strong, readonly) MASViewAttribute *baseline; @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; #if TARGET_OS_IPHONE || TARGET_OS_TV @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; #endif #if TARGET_OS_IPHONE || TARGET_OS_TV @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeading NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTrailing NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideWidth NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideHeight NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideCenterX NS_AVAILABLE_IOS(11.0); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideCenterY NS_AVAILABLE_IOS(11.0); #endif - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; @end #define MAS_ATTR_FORWARD(attr) \ - (MASViewAttribute *)attr { \ return [self mas_##attr]; \ } #define MAS_ATTR_FORWARD_AVAILABLE(attr, available) \ - (MASViewAttribute *)attr available { \ return [self mas_##attr]; \ } @implementation MAS_VIEW (MASShorthandAdditions) MAS_ATTR_FORWARD(top); MAS_ATTR_FORWARD(left); MAS_ATTR_FORWARD(bottom); MAS_ATTR_FORWARD(right); MAS_ATTR_FORWARD(leading); MAS_ATTR_FORWARD(trailing); MAS_ATTR_FORWARD(width); MAS_ATTR_FORWARD(height); MAS_ATTR_FORWARD(centerX); MAS_ATTR_FORWARD(centerY); MAS_ATTR_FORWARD(baseline); MAS_ATTR_FORWARD(firstBaseline); MAS_ATTR_FORWARD(lastBaseline); #if TARGET_OS_IPHONE || TARGET_OS_TV MAS_ATTR_FORWARD(leftMargin); MAS_ATTR_FORWARD(rightMargin); MAS_ATTR_FORWARD(topMargin); MAS_ATTR_FORWARD(bottomMargin); MAS_ATTR_FORWARD(leadingMargin); MAS_ATTR_FORWARD(trailingMargin); MAS_ATTR_FORWARD(centerXWithinMargins); MAS_ATTR_FORWARD(centerYWithinMargins); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideLeading, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideTrailing, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideLeft, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideRight, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideTop, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideBottom, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideWidth, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideHeight, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideCenterX, NS_AVAILABLE_IOS(11.0)); MAS_ATTR_FORWARD_AVAILABLE(safeAreaLayoutGuideCenterY, NS_AVAILABLE_IOS(11.0)); #endif - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { return [self mas_attribute]; } - (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_makeConstraints:block]; } - (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_updateConstraints:block]; } - (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_remakeConstraints:block]; } @end #endif ================================================ FILE: Masonry/ViewController+MASAdditions.h ================================================ // // UIViewController+MASAdditions.h // Masonry // // Created by Craig Siemens on 2015-06-23. // // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" #ifdef MAS_VIEW_CONTROLLER @interface MAS_VIEW_CONTROLLER (MASAdditions) /** * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute */ @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide NS_DEPRECATED_IOS(8.0, 11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide NS_DEPRECATED_IOS(8.0, 11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop NS_DEPRECATED_IOS(8.0, 11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom NS_DEPRECATED_IOS(8.0, 11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop NS_DEPRECATED_IOS(8.0, 11.0); @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom NS_DEPRECATED_IOS(8.0, 11.0); @end #endif ================================================ FILE: Masonry/ViewController+MASAdditions.m ================================================ // // UIViewController+MASAdditions.m // Masonry // // Created by Craig Siemens on 2015-06-23. // // #import "ViewController+MASAdditions.h" #ifdef MAS_VIEW_CONTROLLER @implementation MAS_VIEW_CONTROLLER (MASAdditions) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - (MASViewAttribute *)mas_topLayoutGuide { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_topLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_topLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_bottomLayoutGuide { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_bottomLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_bottomLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } #pragma clang diagnostic pop @end #endif ================================================ FILE: Masonry.podspec ================================================ Pod::Spec.new do |s| s.name = 'Masonry' s.version = '1.1.0' s.license = 'MIT' s.summary = 'Harness the power of Auto Layout NSLayoutConstraints with a simplified, chainable and expressive syntax.' s.homepage = 'https://github.com/cloudkite/Masonry' s.author = { 'Jonas Budelmann' => 'jonas.budelmann@gmail.com' } s.social_media_url = "http://twitter.com/cloudkite" s.source = { :git => 'https://github.com/cloudkite/Masonry.git', :tag => "v#{s.version}" } s.description = %{ Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code which is more concise and readable. Masonry supports iOS and Mac OSX. } pch_AF = <<-EOS #ifndef TARGET_OS_IOS #define TARGET_OS_IOS TARGET_OS_IPHONE #endif #ifndef TARGET_OS_TV #define TARGET_OS_TV 0 #endif EOS s.source_files = 'Masonry/*.{h,m}' s.ios.frameworks = 'Foundation', 'UIKit' s.tvos.frameworks = 'Foundation', 'UIKit' s.osx.frameworks = 'Foundation', 'AppKit' s.ios.deployment_target = '6.0' # minimum SDK with autolayout s.osx.deployment_target = '10.7' # minimum SDK with autolayout s.tvos.deployment_target = '9.0' # minimum SDK with autolayout s.requires_arc = true end ================================================ FILE: Masonry.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 3AED05BD1AD59FD40053CC65 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05BC1AD59FD40053CC65 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05F21AD5A0470053CC65 /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05DC1AD5A0470053CC65 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05F31AD5A0470053CC65 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05DD1AD5A0470053CC65 /* MASCompositeConstraint.m */; }; 3AED05F41AD5A0470053CC65 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05DE1AD5A0470053CC65 /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05F51AD5A0470053CC65 /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05DF1AD5A0470053CC65 /* MASConstraint.m */; }; 3AED05F61AD5A0470053CC65 /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E01AD5A0470053CC65 /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3AED05F71AD5A0470053CC65 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E11AD5A0470053CC65 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05F81AD5A0470053CC65 /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E21AD5A0470053CC65 /* MASConstraintMaker.m */; }; 3AED05F91AD5A0470053CC65 /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E31AD5A0470053CC65 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05FA1AD5A0470053CC65 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E41AD5A0470053CC65 /* MASLayoutConstraint.m */; }; 3AED05FB1AD5A0470053CC65 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E51AD5A0470053CC65 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05FC1AD5A0470053CC65 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E61AD5A0470053CC65 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05FD1AD5A0470053CC65 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E71AD5A0470053CC65 /* MASViewAttribute.m */; }; 3AED05FE1AD5A0470053CC65 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E81AD5A0470053CC65 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED05FF1AD5A0470053CC65 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E91AD5A0470053CC65 /* MASViewConstraint.m */; }; 3AED06001AD5A0470053CC65 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EA1AD5A0470053CC65 /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06011AD5A0470053CC65 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05EB1AD5A0470053CC65 /* NSArray+MASAdditions.m */; }; 3AED06021AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EC1AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06031AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05ED1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06041AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05EE1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m */; }; 3AED06051AD5A0470053CC65 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EF1AD5A0470053CC65 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06061AD5A0470053CC65 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05F01AD5A0470053CC65 /* View+MASAdditions.m */; }; 3AED06071AD5A0470053CC65 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05F11AD5A0470053CC65 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED060A1AD5A1400053CC65 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05EB1AD5A0470053CC65 /* NSArray+MASAdditions.m */; }; 3AED060B1AD5A1400053CC65 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E71AD5A0470053CC65 /* MASViewAttribute.m */; }; 3AED060C1AD5A1400053CC65 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E41AD5A0470053CC65 /* MASLayoutConstraint.m */; }; 3AED060D1AD5A1400053CC65 /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05DF1AD5A0470053CC65 /* MASConstraint.m */; }; 3AED060E1AD5A1400053CC65 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E91AD5A0470053CC65 /* MASViewConstraint.m */; }; 3AED060F1AD5A1400053CC65 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05DD1AD5A0470053CC65 /* MASCompositeConstraint.m */; }; 3AED06101AD5A1400053CC65 /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05E21AD5A0470053CC65 /* MASConstraintMaker.m */; }; 3AED06111AD5A1400053CC65 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05EE1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m */; }; 3AED06121AD5A1400053CC65 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AED05F01AD5A0470053CC65 /* View+MASAdditions.m */; }; 3AED06151AD5A1400053CC65 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EF1AD5A0470053CC65 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06161AD5A1400053CC65 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05F11AD5A0470053CC65 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06171AD5A1400053CC65 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E61AD5A0470053CC65 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06181AD5A1400053CC65 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05BC1AD59FD40053CC65 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06191AD5A1400053CC65 /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E31AD5A0470053CC65 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED061A1AD5A1400053CC65 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E81AD5A0470053CC65 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED061B1AD5A1400053CC65 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EC1AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED061C1AD5A1400053CC65 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E11AD5A0470053CC65 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED061D1AD5A1400053CC65 /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E01AD5A0470053CC65 /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3AED061E1AD5A1400053CC65 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05E51AD5A0470053CC65 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED061F1AD5A1400053CC65 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05EA1AD5A0470053CC65 /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06201AD5A1400053CC65 /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05DC1AD5A0470053CC65 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06211AD5A1400053CC65 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05ED1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3AED06221AD5A1400053CC65 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AED05DE1AD5A0470053CC65 /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4473548D1B39F772004DACCB /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4473548B1B39F772004DACCB /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4473548E1B39F772004DACCB /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4473548C1B39F772004DACCB /* ViewController+MASAdditions.m */; }; 447354921B3A18B3004DACCB /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4473548C1B39F772004DACCB /* ViewController+MASAdditions.m */; }; 447354931B3A18B9004DACCB /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4473548B1B39F772004DACCB /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 3AED05B71AD59FD40053CC65 /* Masonry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Masonry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3AED05BB1AD59FD40053CC65 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3AED05BC1AD59FD40053CC65 /* Masonry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Masonry.h; sourceTree = ""; }; 3AED05DC1AD5A0470053CC65 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASCompositeConstraint.h; sourceTree = ""; }; 3AED05DD1AD5A0470053CC65 /* MASCompositeConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASCompositeConstraint.m; sourceTree = ""; }; 3AED05DE1AD5A0470053CC65 /* MASConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASConstraint.h; sourceTree = ""; }; 3AED05DF1AD5A0470053CC65 /* MASConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraint.m; sourceTree = ""; }; 3AED05E01AD5A0470053CC65 /* MASConstraint+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MASConstraint+Private.h"; sourceTree = ""; }; 3AED05E11AD5A0470053CC65 /* MASConstraintMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASConstraintMaker.h; sourceTree = ""; }; 3AED05E21AD5A0470053CC65 /* MASConstraintMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraintMaker.m; sourceTree = ""; }; 3AED05E31AD5A0470053CC65 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASLayoutConstraint.h; sourceTree = ""; }; 3AED05E41AD5A0470053CC65 /* MASLayoutConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASLayoutConstraint.m; sourceTree = ""; }; 3AED05E51AD5A0470053CC65 /* MASUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASUtilities.h; sourceTree = ""; }; 3AED05E61AD5A0470053CC65 /* MASViewAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASViewAttribute.h; sourceTree = ""; }; 3AED05E71AD5A0470053CC65 /* MASViewAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewAttribute.m; sourceTree = ""; }; 3AED05E81AD5A0470053CC65 /* MASViewConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASViewConstraint.h; sourceTree = ""; }; 3AED05E91AD5A0470053CC65 /* MASViewConstraint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewConstraint.m; sourceTree = ""; }; 3AED05EA1AD5A0470053CC65 /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASAdditions.h"; sourceTree = ""; }; 3AED05EB1AD5A0470053CC65 /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+MASAdditions.m"; sourceTree = ""; }; 3AED05EC1AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; 3AED05ED1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; 3AED05EE1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; 3AED05EF1AD5A0470053CC65 /* View+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "View+MASAdditions.h"; sourceTree = ""; }; 3AED05F01AD5A0470053CC65 /* View+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "View+MASAdditions.m"; sourceTree = ""; }; 3AED05F11AD5A0470053CC65 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "View+MASShorthandAdditions.h"; sourceTree = ""; }; 3AED06271AD5A1400053CC65 /* Masonry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Masonry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4473548B1B39F772004DACCB /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ViewController+MASAdditions.h"; sourceTree = ""; }; 4473548C1B39F772004DACCB /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ViewController+MASAdditions.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 3AED05B31AD59FD40053CC65 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 3AED06131AD5A1400053CC65 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 3AED05AD1AD59FD40053CC65 = { isa = PBXGroup; children = ( 3AED05B91AD59FD40053CC65 /* Masonry */, 3AED05B81AD59FD40053CC65 /* Products */, ); sourceTree = ""; }; 3AED05B81AD59FD40053CC65 /* Products */ = { isa = PBXGroup; children = ( 3AED05B71AD59FD40053CC65 /* Masonry.framework */, 3AED06271AD5A1400053CC65 /* Masonry.framework */, ); name = Products; sourceTree = ""; }; 3AED05B91AD59FD40053CC65 /* Masonry */ = { isa = PBXGroup; children = ( 3AED05BC1AD59FD40053CC65 /* Masonry.h */, 3AED05E51AD5A0470053CC65 /* MASUtilities.h */, 3AED05EF1AD5A0470053CC65 /* View+MASAdditions.h */, 3AED05F01AD5A0470053CC65 /* View+MASAdditions.m */, 3AED05F11AD5A0470053CC65 /* View+MASShorthandAdditions.h */, 4473548B1B39F772004DACCB /* ViewController+MASAdditions.h */, 4473548C1B39F772004DACCB /* ViewController+MASAdditions.m */, 3AED05EA1AD5A0470053CC65 /* NSArray+MASAdditions.h */, 3AED05EB1AD5A0470053CC65 /* NSArray+MASAdditions.m */, 3AED05EC1AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h */, 3AED05DE1AD5A0470053CC65 /* MASConstraint.h */, 3AED05E01AD5A0470053CC65 /* MASConstraint+Private.h */, 3AED05DF1AD5A0470053CC65 /* MASConstraint.m */, 3AED05DC1AD5A0470053CC65 /* MASCompositeConstraint.h */, 3AED05DD1AD5A0470053CC65 /* MASCompositeConstraint.m */, 3AED05E61AD5A0470053CC65 /* MASViewAttribute.h */, 3AED05E71AD5A0470053CC65 /* MASViewAttribute.m */, 3AED05E81AD5A0470053CC65 /* MASViewConstraint.h */, 3AED05E91AD5A0470053CC65 /* MASViewConstraint.m */, 3AED05E11AD5A0470053CC65 /* MASConstraintMaker.h */, 3AED05E21AD5A0470053CC65 /* MASConstraintMaker.m */, 3AED05E31AD5A0470053CC65 /* MASLayoutConstraint.h */, 3AED05E41AD5A0470053CC65 /* MASLayoutConstraint.m */, 3AED05ED1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h */, 3AED05EE1AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m */, 3AED05BA1AD59FD40053CC65 /* Supporting Files */, ); path = Masonry; sourceTree = ""; }; 3AED05BA1AD59FD40053CC65 /* Supporting Files */ = { isa = PBXGroup; children = ( 3AED05BB1AD59FD40053CC65 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 3AED05B41AD59FD40053CC65 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 3AED06051AD5A0470053CC65 /* View+MASAdditions.h in Headers */, 3AED06071AD5A0470053CC65 /* View+MASShorthandAdditions.h in Headers */, 4473548D1B39F772004DACCB /* ViewController+MASAdditions.h in Headers */, 3AED05FC1AD5A0470053CC65 /* MASViewAttribute.h in Headers */, 3AED05BD1AD59FD40053CC65 /* Masonry.h in Headers */, 3AED05F91AD5A0470053CC65 /* MASLayoutConstraint.h in Headers */, 3AED05FE1AD5A0470053CC65 /* MASViewConstraint.h in Headers */, 3AED06021AD5A0470053CC65 /* NSArray+MASShorthandAdditions.h in Headers */, 3AED05F71AD5A0470053CC65 /* MASConstraintMaker.h in Headers */, 3AED05FB1AD5A0470053CC65 /* MASUtilities.h in Headers */, 3AED06001AD5A0470053CC65 /* NSArray+MASAdditions.h in Headers */, 3AED05F21AD5A0470053CC65 /* MASCompositeConstraint.h in Headers */, 3AED05F61AD5A0470053CC65 /* MASConstraint+Private.h in Headers */, 3AED05F41AD5A0470053CC65 /* MASConstraint.h in Headers */, 3AED06031AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 3AED06141AD5A1400053CC65 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 3AED06151AD5A1400053CC65 /* View+MASAdditions.h in Headers */, 3AED06161AD5A1400053CC65 /* View+MASShorthandAdditions.h in Headers */, 3AED06171AD5A1400053CC65 /* MASViewAttribute.h in Headers */, 3AED06181AD5A1400053CC65 /* Masonry.h in Headers */, 3AED06191AD5A1400053CC65 /* MASLayoutConstraint.h in Headers */, 3AED061A1AD5A1400053CC65 /* MASViewConstraint.h in Headers */, 3AED061B1AD5A1400053CC65 /* NSArray+MASShorthandAdditions.h in Headers */, 3AED061C1AD5A1400053CC65 /* MASConstraintMaker.h in Headers */, 3AED061E1AD5A1400053CC65 /* MASUtilities.h in Headers */, 3AED061F1AD5A1400053CC65 /* NSArray+MASAdditions.h in Headers */, 3AED06201AD5A1400053CC65 /* MASCompositeConstraint.h in Headers */, 447354931B3A18B9004DACCB /* ViewController+MASAdditions.h in Headers */, 3AED06221AD5A1400053CC65 /* MASConstraint.h in Headers */, 3AED061D1AD5A1400053CC65 /* MASConstraint+Private.h in Headers */, 3AED06211AD5A1400053CC65 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 3AED05B61AD59FD40053CC65 /* Masonry iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 3AED05CD1AD59FD40053CC65 /* Build configuration list for PBXNativeTarget "Masonry iOS" */; buildPhases = ( 3AED05B21AD59FD40053CC65 /* Sources */, 3AED05B31AD59FD40053CC65 /* Frameworks */, 3AED05B41AD59FD40053CC65 /* Headers */, 3AED05B51AD59FD40053CC65 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "Masonry iOS"; productName = Masonry; productReference = 3AED05B71AD59FD40053CC65 /* Masonry.framework */; productType = "com.apple.product-type.framework"; }; 3AED06081AD5A1400053CC65 /* Masonry OSX */ = { isa = PBXNativeTarget; buildConfigurationList = 3AED06241AD5A1400053CC65 /* Build configuration list for PBXNativeTarget "Masonry OSX" */; buildPhases = ( 3AED06091AD5A1400053CC65 /* Sources */, 3AED06131AD5A1400053CC65 /* Frameworks */, 3AED06141AD5A1400053CC65 /* Headers */, 3AED06231AD5A1400053CC65 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "Masonry OSX"; productName = Masonry; productReference = 3AED06271AD5A1400053CC65 /* Masonry.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 3AED05AE1AD59FD40053CC65 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Jonas Budelmann"; TargetAttributes = { 3AED05B61AD59FD40053CC65 = { CreatedOnToolsVersion = 6.3; }; }; }; buildConfigurationList = 3AED05B11AD59FD40053CC65 /* Build configuration list for PBXProject "Masonry" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 3AED05AD1AD59FD40053CC65; productRefGroup = 3AED05B81AD59FD40053CC65 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 3AED05B61AD59FD40053CC65 /* Masonry iOS */, 3AED06081AD5A1400053CC65 /* Masonry OSX */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 3AED05B51AD59FD40053CC65 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 3AED06231AD5A1400053CC65 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 3AED05B21AD59FD40053CC65 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 3AED06011AD5A0470053CC65 /* NSArray+MASAdditions.m in Sources */, 3AED05FD1AD5A0470053CC65 /* MASViewAttribute.m in Sources */, 4473548E1B39F772004DACCB /* ViewController+MASAdditions.m in Sources */, 3AED05FA1AD5A0470053CC65 /* MASLayoutConstraint.m in Sources */, 3AED05F51AD5A0470053CC65 /* MASConstraint.m in Sources */, 3AED05FF1AD5A0470053CC65 /* MASViewConstraint.m in Sources */, 3AED05F31AD5A0470053CC65 /* MASCompositeConstraint.m in Sources */, 3AED05F81AD5A0470053CC65 /* MASConstraintMaker.m in Sources */, 3AED06041AD5A0470053CC65 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, 3AED06061AD5A0470053CC65 /* View+MASAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 3AED06091AD5A1400053CC65 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 3AED060A1AD5A1400053CC65 /* NSArray+MASAdditions.m in Sources */, 3AED060B1AD5A1400053CC65 /* MASViewAttribute.m in Sources */, 3AED060C1AD5A1400053CC65 /* MASLayoutConstraint.m in Sources */, 3AED060D1AD5A1400053CC65 /* MASConstraint.m in Sources */, 3AED060E1AD5A1400053CC65 /* MASViewConstraint.m in Sources */, 3AED060F1AD5A1400053CC65 /* MASCompositeConstraint.m in Sources */, 447354921B3A18B3004DACCB /* ViewController+MASAdditions.m in Sources */, 3AED06101AD5A1400053CC65 /* MASConstraintMaker.m in Sources */, 3AED06111AD5A1400053CC65 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, 3AED06121AD5A1400053CC65 /* View+MASAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 3AED05CB1AD59FD40053CC65 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; 3AED05CC1AD59FD40053CC65 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 3AED05CE1AD59FD40053CC65 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Masonry/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Masonry; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; }; 3AED05CF1AD59FD40053CC65 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Masonry/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Masonry; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; 3AED06251AD5A1400053CC65 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Masonry/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Masonry; SDKROOT = macosx; SKIP_INSTALL = YES; }; name = Debug; }; 3AED06261AD5A1400053CC65 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Masonry/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Masonry; SDKROOT = macosx; SKIP_INSTALL = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 3AED05B11AD59FD40053CC65 /* Build configuration list for PBXProject "Masonry" */ = { isa = XCConfigurationList; buildConfigurations = ( 3AED05CB1AD59FD40053CC65 /* Debug */, 3AED05CC1AD59FD40053CC65 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 3AED05CD1AD59FD40053CC65 /* Build configuration list for PBXNativeTarget "Masonry iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 3AED05CE1AD59FD40053CC65 /* Debug */, 3AED05CF1AD59FD40053CC65 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 3AED06241AD5A1400053CC65 /* Build configuration list for PBXNativeTarget "Masonry OSX" */ = { isa = XCConfigurationList; buildConfigurations = ( 3AED06251AD5A1400053CC65 /* Debug */, 3AED06261AD5A1400053CC65 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 3AED05AE1AD59FD40053CC65 /* Project object */; } ================================================ FILE: Masonry.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Masonry.xcodeproj/project.xcworkspace/xcshareddata/Masonry.xccheckout ================================================ IDESourceControlProjectFavoriteDictionaryKey IDESourceControlProjectIdentifier E430861F-D80D-40F7-BD85-FE97E606F3EA IDESourceControlProjectName Masonry IDESourceControlProjectOriginsDictionary 6FC4832245A6A8E50F2A782F20A8B58A46BD1FEB github.com:erichoracek/Masonry.git IDESourceControlProjectPath Masonry/Masonry.xcodeproj IDESourceControlProjectRelativeInstallPathDictionary 6FC4832245A6A8E50F2A782F20A8B58A46BD1FEB ../../.. IDESourceControlProjectURL github.com:erichoracek/Masonry.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier 6FC4832245A6A8E50F2A782F20A8B58A46BD1FEB IDESourceControlProjectWCConfigurations IDESourceControlRepositoryExtensionIdentifierKey public.vcs.git IDESourceControlWCCIdentifierKey 6FC4832245A6A8E50F2A782F20A8B58A46BD1FEB IDESourceControlWCCName Masonry ================================================ FILE: Masonry.xcodeproj/xcshareddata/xcschemes/Masonry OSX.xcscheme ================================================ ================================================ FILE: Masonry.xcodeproj/xcshareddata/xcschemes/Masonry iOS.xcscheme ================================================ ================================================ FILE: Masonry.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Podfile ================================================ workspace 'Masonry' platform :ios, '8.0' project 'Examples/Masonry iOS Examples' target 'Masonry iOS Examples' do pod 'Masonry', :path => './' end target 'Masonry iOS Tests' do project 'Tests/Masonry Tests' pod 'Expecta' end target 'MasonryTestsLoader' do project 'Tests/Masonry Tests' pod 'Masonry', :path => './' end # add settings needed to generate test coverage data post_install do |installer| COV_TARGET_NAME = "Pods-MasonryTestsLoader" EXPORT_ENV_PHASE_NAME = "Export Environment Vars" EXPORT_ENV_PHASE_SCRIPT = "export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > $SRCROOT/../script/env.sh" # find target classy_pods_target = installer.pods_project.targets.find{ |target| target.name == COV_TARGET_NAME } unless classy_pods_target raise ::Pod::Informative, "Failed to find '" << COV_TARGET_NAME << "' target" end # add build settings classy_pods_target.build_configurations.each do |config| config.build_settings['GCC_GENERATE_TEST_COVERAGE_FILES'] = 'YES' config.build_settings['GCC_INSTRUMENT_PROGRAM_FLOW_ARCS'] = 'YES' end # add build phase phase = classy_pods_target.shell_script_build_phases.select{ |bp| bp.name == EXPORT_ENV_PHASE_NAME }.first || classy_pods_target.new_shell_script_build_phase(EXPORT_ENV_PHASE_NAME) phase.shell_path = "/bin/sh" phase.shell_script = EXPORT_ENV_PHASE_SCRIPT phase.show_env_vars_in_log = '0' end ================================================ FILE: Pods/Expecta/Expecta/EXPBlockDefinedMatcher.h ================================================ // // EXPRuntimeMatcher.h // Expecta // // Created by Luke Redpath on 26/03/2012. // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. // #import #import "EXPMatcher.h" #import "EXPDefines.h" @interface EXPBlockDefinedMatcher : NSObject { EXPBoolBlock prerequisiteBlock; EXPBoolBlock matchBlock; EXPStringBlock failureMessageForToBlock; EXPStringBlock failureMessageForNotToBlock; } @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock; @property(nonatomic, copy) EXPBoolBlock matchBlock; @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock; @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock; @end ================================================ FILE: Pods/Expecta/Expecta/EXPBlockDefinedMatcher.m ================================================ // // EXPRuntimeMatcher.m // Expecta // // Created by Luke Redpath on 26/03/2012. // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. // #import "EXPBlockDefinedMatcher.h" @implementation EXPBlockDefinedMatcher - (void)dealloc { self.prerequisiteBlock = nil; self.matchBlock = nil; self.failureMessageForToBlock = nil; self.failureMessageForNotToBlock = nil; [super dealloc]; } @synthesize prerequisiteBlock; @synthesize matchBlock; @synthesize failureMessageForToBlock; @synthesize failureMessageForNotToBlock; - (BOOL)meetsPrerequesiteFor:(id)actual { if (self.prerequisiteBlock) { return self.prerequisiteBlock(); } return YES; } - (BOOL)matches:(id)actual { if (self.matchBlock) { return self.matchBlock(); } return YES; } - (NSString *)failureMessageForTo:(id)actual { if (self.failureMessageForToBlock) { return self.failureMessageForToBlock(); } return nil; } - (NSString *)failureMessageForNotTo:(id)actual { if (self.failureMessageForNotToBlock) { return self.failureMessageForNotToBlock(); } return nil; } @end ================================================ FILE: Pods/Expecta/Expecta/EXPDefines.h ================================================ // // EXPDefines.h // Expecta // // Created by Luke Redpath on 26/03/2012. // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. // #ifndef Expecta_EXPDefines_h #define Expecta_EXPDefines_h typedef void (^EXPBasicBlock)(); typedef id (^EXPIdBlock)(); typedef BOOL (^EXPBoolBlock)(); typedef NSString *(^EXPStringBlock)(); #endif ================================================ FILE: Pods/Expecta/Expecta/EXPDoubleTuple.h ================================================ #import @interface EXPDoubleTuple : NSObject { double *_values; size_t _size; } @property (nonatomic, assign) double *values; @property (nonatomic, assign) size_t size; - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size NS_DESIGNATED_INITIALIZER; @end ================================================ FILE: Pods/Expecta/Expecta/EXPDoubleTuple.m ================================================ #import "EXPDoubleTuple.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-designated-initializers" @implementation EXPDoubleTuple #pragma clang diagnostic pop @synthesize values = _values, size = _size; - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size { if ((self = [super init])) { self.values = malloc(sizeof(double) * size); memcpy(self.values, values, sizeof(double) * size); self.size = size; } return self; } - (void)dealloc { free(self.values); [super dealloc]; } - (BOOL)isEqual:(id)object { if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO; EXPDoubleTuple *other = (EXPDoubleTuple *)object; if (self.size == other.size) { for (int i = 0; i < self.size; ++i) { if (self.values[i] != other.values[i]) return NO; } return YES; } return NO; } - (NSString *)description { if (self.size == 2) { return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]]; } else if (self.size == 4) { return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; } return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size]; } @end ================================================ FILE: Pods/Expecta/Expecta/EXPExpect.h ================================================ #import #import "EXPMatcher.h" #import "EXPDefines.h" @interface EXPExpect : NSObject { EXPIdBlock _actualBlock; id _testCase; int _lineNumber; char *_fileName; BOOL _negative; BOOL _asynchronous; NSTimeInterval _timeout; } @property(nonatomic, copy) EXPIdBlock actualBlock; @property(nonatomic, readonly) id actual; @property(nonatomic, assign) id testCase; @property(nonatomic) int lineNumber; @property(nonatomic) const char *fileName; @property(nonatomic) BOOL negative; @property(nonatomic) BOOL asynchronous; @property(nonatomic) NSTimeInterval timeout; @property(nonatomic, readonly) EXPExpect *to; @property(nonatomic, readonly) EXPExpect *toNot; @property(nonatomic, readonly) EXPExpect *notTo; @property(nonatomic, readonly) EXPExpect *will; @property(nonatomic, readonly) EXPExpect *willNot; @property(nonatomic, readonly) EXPExpect *(^after)(NSTimeInterval timeInterval); - (instancetype)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName NS_DESIGNATED_INITIALIZER; + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; - (void)applyMatcher:(id)matcher; - (void)applyMatcher:(id)matcher to:(NSObject **)actual; @end @interface EXPDynamicPredicateMatcher : NSObject { EXPExpect *_expectation; SEL _selector; } - (instancetype)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector NS_DESIGNATED_INITIALIZER; @property (nonatomic, readonly, copy) void (^dispatch)(void); @end ================================================ FILE: Pods/Expecta/Expecta/EXPExpect.m ================================================ #import "EXPExpect.h" #import "NSObject+Expecta.h" #import "Expecta.h" #import "EXPUnsupportedObject.h" #import "EXPMatcher.h" #import "EXPBlockDefinedMatcher.h" #import #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-designated-initializers" @implementation EXPExpect #pragma clang diagnostic pop @dynamic actual, to, toNot, notTo, will, willNot, after; @synthesize actualBlock=_actualBlock, testCase=_testCase, negative=_negative, asynchronous=_asynchronous, timeout=_timeout, lineNumber=_lineNumber, fileName=_fileName; - (instancetype)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { self = [super init]; if(self) { self.actualBlock = actualBlock; self.testCase = testCase; self.negative = NO; self.asynchronous = NO; self.timeout = [Expecta asynchronousTestTimeout]; self.lineNumber = lineNumber; self.fileName = fileName; } return self; } - (void)dealloc { [_actualBlock release]; _actualBlock = nil; [super dealloc]; } + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { return [[[EXPExpect alloc] initWithActualBlock:actualBlock testCase:(id)testCase lineNumber:lineNumber fileName:fileName] autorelease]; } #pragma mark - - (EXPExpect *)to { return self; } - (EXPExpect *)toNot { self.negative = !self.negative; return self; } - (EXPExpect *)notTo { return [self toNot]; } - (EXPExpect *)will { self.asynchronous = YES; return self; } - (EXPExpect *)willNot { return self.will.toNot; } - (EXPExpect *(^)(NSTimeInterval))after { EXPExpect * (^block)(NSTimeInterval) = [^EXPExpect *(NSTimeInterval timeout) { self.asynchronous = YES; self.timeout = timeout; return self; } copy]; return [block autorelease]; } #pragma mark - - (id)actual { if(self.actualBlock) { return self.actualBlock(); } return nil; } - (void)applyMatcher:(id)matcher { id actual = [self actual]; [self applyMatcher:matcher to:&actual]; } - (void)applyMatcher:(id)matcher to:(NSObject **)actual { if([*actual isKindOfClass:[EXPUnsupportedObject class]]) { EXPFail(self.testCase, self.lineNumber, self.fileName, [NSString stringWithFormat:@"expecting a %@ is not supported", ((EXPUnsupportedObject *)*actual).type]); } else { BOOL failed = NO; if([matcher respondsToSelector:@selector(meetsPrerequesiteFor:)] && ![matcher meetsPrerequesiteFor:*actual]) { failed = YES; } else { BOOL matchResult = NO; if(self.asynchronous) { NSTimeInterval timeOut = self.timeout; NSDate *expiryDate = [NSDate dateWithTimeIntervalSinceNow:timeOut]; while(1) { matchResult = [matcher matches:*actual]; failed = self.negative ? matchResult : !matchResult; if(!failed || ([(NSDate *)[NSDate date] compare:expiryDate] == NSOrderedDescending)) { break; } [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]]; OSMemoryBarrier(); *actual = self.actual; } } else { matchResult = [matcher matches:*actual]; } failed = self.negative ? matchResult : !matchResult; } if(failed) { NSString *message = nil; if(self.negative) { if ([matcher respondsToSelector:@selector(failureMessageForNotTo:)]) { message = [matcher failureMessageForNotTo:*actual]; } } else { if ([matcher respondsToSelector:@selector(failureMessageForTo:)]) { message = [matcher failureMessageForTo:*actual]; } } if (message == nil) { message = @"Match Failed."; } EXPFail(self.testCase, self.lineNumber, self.fileName, message); } } self.negative = NO; } #pragma mark - Dynamic predicate dispatch - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { if ([self.actual respondsToSelector:aSelector]) { return [self.actual methodSignatureForSelector:aSelector]; } return [super methodSignatureForSelector:aSelector]; } - (void)forwardInvocation:(NSInvocation *)anInvocation { if ([self.actual respondsToSelector:anInvocation.selector]) { EXPDynamicPredicateMatcher *matcher = [[EXPDynamicPredicateMatcher alloc] initWithExpectation:self selector:anInvocation.selector]; [anInvocation setSelector:@selector(dispatch)]; [anInvocation invokeWithTarget:matcher]; [matcher release]; } else { [super forwardInvocation:anInvocation]; } } @end #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-designated-initializers" @implementation EXPDynamicPredicateMatcher #pragma clang diagnostic pop - (instancetype)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector { if ((self = [super init])) { _expectation = expectation; _selector = selector; } return self; } - (BOOL)matches:(id)actual { return (BOOL)[actual performSelector:_selector]; } - (NSString *)failureMessageForTo:(id)actual { return [NSString stringWithFormat:@"expected %@ to be true", NSStringFromSelector(_selector)]; } - (NSString *)failureMessageForNotTo:(id)actual { return [NSString stringWithFormat:@"expected %@ to be false", NSStringFromSelector(_selector)]; } - (void (^)(void))dispatch { __block id blockExpectation = _expectation; return [[^{ [blockExpectation applyMatcher:self]; } copy] autorelease]; } @end ================================================ FILE: Pods/Expecta/Expecta/EXPFloatTuple.h ================================================ #import @interface EXPFloatTuple : NSObject { float *_values; size_t _size; } @property (nonatomic, assign) float *values; @property (nonatomic, assign) size_t size; - (instancetype)initWithFloatValues:(float *)values size:(size_t)size NS_DESIGNATED_INITIALIZER; @end ================================================ FILE: Pods/Expecta/Expecta/EXPFloatTuple.m ================================================ #import "EXPFloatTuple.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-designated-initializers" @implementation EXPFloatTuple #pragma clang diagnostic pop @synthesize values = _values, size = _size; - (instancetype)initWithFloatValues:(float *)values size:(size_t)size { if ((self = [super init])) { self.values = malloc(sizeof(float) * size); memcpy(self.values, values, sizeof(float) * size); self.size = size; } return self; } - (void)dealloc { free(self.values); [super dealloc]; } - (BOOL)isEqual:(id)object { if (![object isKindOfClass:[EXPFloatTuple class]]) return NO; EXPFloatTuple *other = (EXPFloatTuple *)object; if (self.size == other.size) { for (int i = 0; i < self.size; ++i) { if (self.values[i] != other.values[i]) return NO; } return YES; } return NO; } - (NSUInteger)hash { NSUInteger prime = 31; NSUInteger hash = 0; for (int i=0; i @protocol EXPMatcher - (BOOL)matches:(id)actual; @optional - (BOOL)meetsPrerequesiteFor:(id)actual; - (NSString *)failureMessageForTo:(id)actual; - (NSString *)failureMessageForNotTo:(id)actual; @end ================================================ FILE: Pods/Expecta/Expecta/EXPUnsupportedObject.h ================================================ #import @interface EXPUnsupportedObject : NSObject { NSString *_type; } @property (nonatomic, retain) NSString *type; - (instancetype)initWithType:(NSString *)type NS_DESIGNATED_INITIALIZER; @end ================================================ FILE: Pods/Expecta/Expecta/EXPUnsupportedObject.m ================================================ #import "EXPUnsupportedObject.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-designated-initializers" @implementation EXPUnsupportedObject #pragma clang diagnostic pop @synthesize type=_type; - (instancetype)initWithType:(NSString *)type { self = [super init]; if(self) { self.type = type; } return self; } - (void)dealloc { self.type = nil; [super dealloc]; } @end ================================================ FILE: Pods/Expecta/Expecta/Expecta.h ================================================ #import //! Project version number for Expecta. FOUNDATION_EXPORT double ExpectaVersionNumber; //! Project version string for Expecta. FOUNDATION_EXPORT const unsigned char ExpectaVersionString[]; #import #import #import // Enable shorthand by default #define expect(...) EXP_expect((__VA_ARGS__)) #define failure(...) EXP_failure((__VA_ARGS__)) ================================================ FILE: Pods/Expecta/Expecta/ExpectaObject.h ================================================ #import #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value)) #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ __typeof__((actual)) strongActual = (actual); return EXPObjectify(strongActual); }) #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments) #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments) #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd #define EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) _EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) #define EXP_failure(message) EXPFail(self, __LINE__, __FILE__, message) @interface Expecta : NSObject + (NSTimeInterval)asynchronousTestTimeout; + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout; @end ================================================ FILE: Pods/Expecta/Expecta/ExpectaObject.m ================================================ #import "ExpectaObject.h" @implementation Expecta static NSTimeInterval _asynchronousTestTimeout = 1.0; + (NSTimeInterval)asynchronousTestTimeout { return _asynchronousTestTimeout; } + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout { _asynchronousTestTimeout = timeout; } @end ================================================ FILE: Pods/Expecta/Expecta/ExpectaSupport.h ================================================ #import "EXPExpect.h" #import "EXPBlockDefinedMatcher.h" #ifdef __cplusplus extern "C" { #endif id _EXPObjectify(const char *type, ...); EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock); void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message); NSString *EXPDescribeObject(id obj); void EXP_prerequisite(EXPBoolBlock block); void EXP_match(EXPBoolBlock block); void EXP_failureMessageForTo(EXPStringBlock block); void EXP_failureMessageForNotTo(EXPStringBlock block); #if __has_feature(objc_arc) #define _EXP_release(x) #define _EXP_autorelease(x) (x) #else #define _EXP_release(x) [x release] #define _EXP_autorelease(x) [x autorelease] #endif // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html #define EXPFixCategoriesBug(name) \ __attribute__((constructor)) static void EXPFixCategoriesBug##name() {} #define _EXPMatcherInterface(matcherName, matcherArguments) \ @interface EXPExpect (matcherName##Matcher) \ @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \ @end #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \ EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \ @implementation EXPExpect (matcherName##Matcher) \ @dynamic matcherName;\ - (void(^) matcherArguments) matcherName { \ EXPBlockDefinedMatcher *matcher = [[EXPBlockDefinedMatcher alloc] init]; \ [[[NSThread currentThread] threadDictionary] setObject:matcher forKey:@"EXP_currentMatcher"]; \ __block id actual = self.actual; \ __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \ __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \ __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \ __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \ prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \ void (^matcherBlock) matcherArguments = [^ matcherArguments { \ { #define _EXPMatcherImplementationEnd \ } \ [self applyMatcher:matcher to:&actual]; \ [[[NSThread currentThread] threadDictionary] removeObjectForKey:@"EXP_currentMatcher"]; \ } copy]; \ _EXP_release(matcher); \ return _EXP_autorelease(matcherBlock); \ } \ @end #define _EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) \ EXPFixCategoriesBug(EXPMatcher##newMatcherName##Matcher); \ @implementation EXPExpect (newMatcherName##Matcher) \ @dynamic newMatcherName;\ - (void(^) matcherArguments) newMatcherName { \ return [self oldMatcherName]; \ }\ @end #ifdef __cplusplus } #endif ================================================ FILE: Pods/Expecta/Expecta/ExpectaSupport.m ================================================ #import "ExpectaSupport.h" #import "NSValue+Expecta.h" #import "NSObject+Expecta.h" #import "EXPUnsupportedObject.h" #import "EXPFloatTuple.h" #import "EXPDoubleTuple.h" #import "EXPDefines.h" #import @interface NSObject (ExpectaXCTestRecordFailure) // suppress warning - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected; @end id _EXPObjectify(const char *type, ...) { va_list v; va_start(v, type); id obj = nil; if(strcmp(type, @encode(char)) == 0) { char actual = (char)va_arg(v, int); obj = @(actual); } else if(strcmp(type, @encode(_Bool)) == 0) { _Static_assert(sizeof(_Bool) <= sizeof(int), "Expected _Bool to be subject to vararg type promotion"); _Bool actual = (_Bool)va_arg(v, int); obj = @(actual); } else if(strcmp(type, @encode(double)) == 0) { double actual = (double)va_arg(v, double); obj = @(actual); } else if(strcmp(type, @encode(float)) == 0) { float actual = (float)va_arg(v, double); obj = @(actual); } else if(strcmp(type, @encode(int)) == 0) { int actual = (int)va_arg(v, int); obj = @(actual); } else if(strcmp(type, @encode(long)) == 0) { long actual = (long)va_arg(v, long); obj = @(actual); } else if(strcmp(type, @encode(long long)) == 0) { long long actual = (long long)va_arg(v, long long); obj = @(actual); } else if(strcmp(type, @encode(short)) == 0) { short actual = (short)va_arg(v, int); obj = @(actual); } else if(strcmp(type, @encode(unsigned char)) == 0) { unsigned char actual = (unsigned char)va_arg(v, unsigned int); obj = @(actual); } else if(strcmp(type, @encode(unsigned int)) == 0) { unsigned int actual = (int)va_arg(v, unsigned int); obj = @(actual); } else if(strcmp(type, @encode(unsigned long)) == 0) { unsigned long actual = (unsigned long)va_arg(v, unsigned long); obj = @(actual); } else if(strcmp(type, @encode(unsigned long long)) == 0) { unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); obj = @(actual); } else if(strcmp(type, @encode(unsigned short)) == 0) { unsigned short actual = (unsigned short)va_arg(v, unsigned int); obj = @(actual); } else if(strstr(type, @encode(EXPBasicBlock)) != NULL) { // @encode(EXPBasicBlock) returns @? as of clang 4.1. // This condition must occur before the test for id/class type, // otherwise blocks will be treated as vanilla objects. id actual = va_arg(v, EXPBasicBlock); obj = [[actual copy] autorelease]; } else if((strstr(type, @encode(id)) != NULL) || (strstr(type, @encode(Class)) != 0)) { id actual = va_arg(v, id); obj = actual; } else if(strcmp(type, @encode(__typeof__(nil))) == 0) { obj = nil; } else if(strstr(type, "ff}{") != NULL) { //TODO: of course this only works for a 2x2 e.g. CGRect obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[4]) size:4] autorelease]; } else if(strstr(type, "=ff}") != NULL) { obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[2]) size:2] autorelease]; } else if(strstr(type, "=ffff}") != NULL) { obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[4]) size:4] autorelease]; } else if(strstr(type, "dd}{") != NULL) { //TODO: same here obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[4]) size:4] autorelease]; } else if(strstr(type, "=dd}") != NULL) { obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[2]) size:2] autorelease]; } else if(strstr(type, "=dddd}") != NULL) { obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[4]) size:4] autorelease]; } else if(type[0] == '{') { EXPUnsupportedObject *actual = [[[EXPUnsupportedObject alloc] initWithType:@"struct"] autorelease]; obj = actual; } else if(type[0] == '(') { EXPUnsupportedObject *actual = [[[EXPUnsupportedObject alloc] initWithType:@"union"] autorelease]; obj = actual; } else { void *actual = va_arg(v, void *); obj = (actual == NULL ? nil :[NSValue valueWithPointer:actual]); } if([obj isKindOfClass:[NSValue class]] && ![obj isKindOfClass:[NSNumber class]]) { [(NSValue *)obj set_EXP_objCType:type]; } va_end(v); return obj; } EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock) { return [EXPExpect expectWithActualBlock:actualBlock testCase:testCase lineNumber:lineNumber fileName:fileName]; } void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message) { NSLog(@"%s:%d %@", fileName, lineNumber, message); NSString *reason = [NSString stringWithFormat:@"%s:%d %@", fileName, lineNumber, message]; NSException *exception = [NSException exceptionWithName:@"Expecta Error" reason:reason userInfo:nil]; if(testCase && [testCase respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)]){ [testCase recordFailureWithDescription:message inFile:@(fileName) atLine:lineNumber expected:NO]; } else { [exception raise]; } } NSString *EXPDescribeObject(id obj) { if(obj == nil) { return @"nil/null"; } else if([obj isKindOfClass:[NSValue class]] && ![obj isKindOfClass:[NSNumber class]]) { const char *type = [(NSValue *)obj _EXP_objCType]; if(type) { if(strcmp(type, @encode(SEL)) == 0) { return [NSString stringWithFormat:@"@selector(%@)", NSStringFromSelector([obj pointerValue])]; } else if(strcmp(type, @encode(Class)) == 0) { return NSStringFromClass([obj pointerValue]); } } } NSString *description = [obj description]; if([obj isKindOfClass:[NSArray class]]) { NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; for(id o in obj) { [arr addObject:EXPDescribeObject(o)]; } description = [NSString stringWithFormat:@"(%@)", [arr componentsJoinedByString:@", "]]; } else if([obj isKindOfClass:[NSSet class]] || [obj isKindOfClass:[NSOrderedSet class]]) { NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; for(id o in obj) { [arr addObject:EXPDescribeObject(o)]; } description = [NSString stringWithFormat:@"{(%@)}", [arr componentsJoinedByString:@", "]]; } else if([obj isKindOfClass:[NSDictionary class]]) { NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; for(id k in obj) { id v = obj[k]; [arr addObject:[NSString stringWithFormat:@"%@ = %@;",EXPDescribeObject(k), EXPDescribeObject(v)]]; } description = [NSString stringWithFormat:@"{%@}", [arr componentsJoinedByString:@" "]]; } else if([obj isKindOfClass:[NSAttributedString class]]) { description = [obj string]; } else { description = [description stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"]; } return description; } void EXP_prerequisite(EXPBoolBlock block) { [[[NSThread currentThread] threadDictionary][@"EXP_currentMatcher"] setPrerequisiteBlock:block]; } void EXP_match(EXPBoolBlock block) { [[[NSThread currentThread] threadDictionary][@"EXP_currentMatcher"] setMatchBlock:block]; } void EXP_failureMessageForTo(EXPStringBlock block) { [[[NSThread currentThread] threadDictionary][@"EXP_currentMatcher"] setFailureMessageForToBlock:block]; } void EXP_failureMessageForNotTo(EXPStringBlock block) { [[[NSThread currentThread] threadDictionary][@"EXP_currentMatcher"] setFailureMessageForNotToBlock:block]; } ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.h ================================================ #import BOOL EXPIsValuePointer(NSValue *value); BOOL EXPIsNumberFloat(NSNumber *number); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.m ================================================ #import "EXPMatcherHelpers.h" BOOL EXPIsValuePointer(NSValue *value) { return [value objCType][0] == @encode(void *)[0]; } BOOL EXPIsNumberFloat(NSNumber *number) { return strcmp([number objCType], @encode(float)) == 0; } ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beCloseToWithin, (id expected, id within)); EXPMatcherInterface(beCloseToWithin, (id expected, id within)); #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil) #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.m ================================================ #import "EXPMatchers+beCloseTo.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beCloseToWithin, (id expected, id within)) { prerequisite(^BOOL{ return [actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]] && ([within isKindOfClass:[NSNumber class]] || (within == nil)); }); match(^BOOL{ double actualValue = [actual doubleValue]; double expectedValue = [expected doubleValue]; if (within != nil) { double withinValue = [within doubleValue]; double lowerBound = expectedValue - withinValue; double upperBound = expectedValue + withinValue; return (actualValue >= lowerBound) && (actualValue <= upperBound); } else { double diff = fabs(actualValue - expectedValue); actualValue = fabs(actualValue); expectedValue = fabs(expectedValue); double largest = (expectedValue > actualValue) ? expectedValue : actualValue; return (diff <= largest * FLT_EPSILON); } }); failureMessageForTo(^NSString *{ if (within) { return [NSString stringWithFormat:@"expected %@ to be close to %@ within %@", EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; } else { return [NSString stringWithFormat:@"expected %@ to be close to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; } }); failureMessageForNotTo(^NSString *{ if (within) { return [NSString stringWithFormat:@"expected %@ not to be close to %@ within %@", EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; } else { return [NSString stringWithFormat:@"expected %@ not to be close to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; } }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h ================================================ #import "Expecta.h" EXPMatcherInterface(beFalsy, (void)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.m ================================================ #import "EXPMatchers+beFalsy.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(beFalsy, (void)) { match(^BOOL{ if([actual isKindOfClass:[NSNumber class]]) { return ![(NSNumber *)actual boolValue]; } else if([actual isKindOfClass:[NSValue class]]) { if(EXPIsValuePointer((NSValue *)actual)) { return ![(NSValue *)actual pointerValue]; } } return !actual; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beGreaterThan, (id expected)); EXPMatcherInterface(beGreaterThan, (id expected)); #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.m ================================================ #import "EXPMatchers+beGreaterThan.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) { match(^BOOL{ if ([actual respondsToSelector:@selector(compare:)]) { return [actual compare:expected] == NSOrderedDescending; } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected)); EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected)); #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m ================================================ #import "EXPMatchers+beGreaterThanOrEqualTo.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) { match(^BOOL{ if ([actual respondsToSelector:@selector(compare:)]) { return [actual compare:expected] != NSOrderedAscending; } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beIdenticalTo, (void *expected)); EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion #if __has_feature(objc_arc) #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) #else #define beIdenticalTo(expected) _beIdenticalTo(expected) #endif ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.m ================================================ #import "EXPMatchers+equal.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beIdenticalTo, (void *expected)) { match(^BOOL{ if(actual == expected) { return YES; } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) { if([(NSValue *)actual pointerValue] == expected) { return YES; } } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.m ================================================ #import "EXPMatchers+beInTheRangeOf.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) { match(^BOOL{ if ([actual respondsToSelector:@selector(compare:)]) { NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual]; NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual]; if (compareLowerBound == NSOrderedSame) { return YES; } if (compareUpperBound == NSOrderedSame) { return YES; } if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) { return YES; } } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(beInstanceOf, (Class expected)); EXPMatcherInterface(beAnInstanceOf, (Class expected)); EXPMatcherInterface(beMemberOf, (Class expected)); EXPMatcherInterface(beAMemberOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.m ================================================ #import "EXPMatchers+beInstanceOf.h" EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL{ return !(actualIsNil || expectedIsNil); }); match(^BOOL{ return [actual isMemberOfClass:expected]; }); failureMessageForTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]]; }); failureMessageForNotTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(beAnInstanceOf, beInstanceOf, (Class expected)); EXPMatcherAliasImplementation(beMemberOf, beInstanceOf, (Class expected)); EXPMatcherAliasImplementation(beAMemberOf, beInstanceOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(beKindOf, (Class expected)); EXPMatcherInterface(beAKindOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.m ================================================ #import "EXPMatchers+beKindOf.h" EXPMatcherImplementationBegin(beKindOf, (Class expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL{ return !(actualIsNil || expectedIsNil); }); match(^BOOL{ return [actual isKindOfClass:expected]; }); failureMessageForTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; }); failureMessageForNotTo(^NSString *{ if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(beAKindOf, beKindOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beLessThan, (id expected)); EXPMatcherInterface(beLessThan, (id expected)); #define beLessThan(expected) _beLessThan(EXPObjectify((expected))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.m ================================================ #import "EXPMatchers+beLessThan.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beLessThan, (id expected)) { match(^BOOL{ if ([actual respondsToSelector:@selector(compare:)]) { return [actual compare:expected] == NSOrderedAscending; } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(_beLessThanOrEqualTo, (id expected)); EXPMatcherInterface(beLessThanOrEqualTo, (id expected)); #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.m ================================================ #import "EXPMatchers+beLessThanOrEqualTo.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) { match(^BOOL{ if ([actual respondsToSelector:@selector(compare:)]) { return [actual compare:expected] != NSOrderedDescending; } return NO; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.h ================================================ #import "Expecta.h" EXPMatcherInterface(beNil, (void)); EXPMatcherInterface(beNull, (void)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.m ================================================ #import "EXPMatchers+beNil.h" EXPMatcherImplementationBegin(beNil, (void)) { match(^BOOL{ return actual == nil; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(beNull, beNil, (void)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(beSubclassOf, (Class expected)); EXPMatcherInterface(beASubclassOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.m ================================================ #import "EXPMatchers+beSubclassOf.h" #import "NSValue+Expecta.h" #import EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) { __block BOOL actualIsClass = YES; prerequisite(^BOOL { actualIsClass = class_isMetaClass(object_getClass(actual)); return actualIsClass; }); match(^BOOL{ return [actual isSubclassOfClass:expected]; }); failureMessageForTo(^NSString *{ if(!actualIsClass) return @"the actual value is not a Class"; return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]]; }); failureMessageForNotTo(^NSString *{ if(!actualIsClass) return @"the actual value is not a Class"; return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(beASubclassOf, beSubclassOf, (Class expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(beSupersetOf, (id subset)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.m ================================================ #import "EXPMatchers+contain.h" EXPMatcherImplementationBegin(beSupersetOf, (id subset)) { BOOL actualIsCompatible = [actual isKindOfClass:[NSDictionary class]] || [actual respondsToSelector:@selector(containsObject:)]; BOOL subsetIsNil = (subset == nil); // For some instances the isKindOfClass: method returns false, even though // they are both actually dictionaries. e.g. Comparing a NSCFDictionary and a // NSDictionary. // Or in cases when you compare NSMutableArray (which implementation is __NSArrayM:NSMutableArray:NSArray) // and NSArray (which implementation is __NSArrayI:NSArray) BOOL bothAreIdenticalCollectionClasses = ([actual isKindOfClass:[NSDictionary class]] && [subset isKindOfClass:[NSDictionary class]]) || ([actual isKindOfClass:[NSArray class]] && [subset isKindOfClass:[NSArray class]]) || ([actual isKindOfClass:[NSSet class]] && [subset isKindOfClass:[NSSet class]]) || ([actual isKindOfClass:[NSOrderedSet class]] && [subset isKindOfClass:[NSOrderedSet class]]); BOOL classMatches = bothAreIdenticalCollectionClasses || [subset isKindOfClass:[actual class]]; prerequisite(^BOOL{ return actualIsCompatible && !subsetIsNil && classMatches; }); match(^BOOL{ if(!actualIsCompatible) return NO; if([actual isKindOfClass:[NSDictionary class]]) { for (id key in subset) { id actualValue = [actual valueForKey:key]; id subsetValue = [subset valueForKey:key]; if (![subsetValue isEqual:actualValue]) return NO; } } else { for (id object in subset) { if (![actual containsObject:object]) return NO; } } return YES; }); failureMessageForTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; if(subsetIsNil) return @"the expected value is nil/null"; if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; return [NSString stringWithFormat:@"expected %@ to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; }); failureMessageForNotTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; if(subsetIsNil) return @"the expected value is nil/null"; if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; return [NSString stringWithFormat:@"expected %@ not to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h ================================================ #import "Expecta.h" EXPMatcherInterface(beTruthy, (void)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.m ================================================ #import "EXPMatchers+beTruthy.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(beTruthy, (void)) { match(^BOOL{ if([actual isKindOfClass:[NSNumber class]]) { return !![(NSNumber *)actual boolValue]; } else if([actual isKindOfClass:[NSValue class]]) { if(EXPIsValuePointer((NSValue *)actual)) { return !![(NSValue *)actual pointerValue]; } } return !!actual; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.h ================================================ #import "Expecta.h" EXPMatcherInterface(beginWith, (id expected)); EXPMatcherInterface(startWith, (id expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.m ================================================ #import "EXPMatchers+beginWith.h" EXPMatcherImplementationBegin(beginWith, (id expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); prerequisite(^BOOL { return actualAndExpectedAreCompatible; }); match(^BOOL { if ([actual isKindOfClass:[NSString class]]) { return [actual hasPrefix:expected]; } else if ([actual isKindOfClass:[NSArray class]]) { if ([expected count] > [actual count] || [expected count] == 0) { return NO; } NSArray *subArray = [actual subarrayWithRange:NSMakeRange(0, [expected count])]; return [subArray isEqualToArray:expected]; } else { if ([expected count] > [actual count] || [expected count] == 0) { return NO; } NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange(0, [expected count]) copyItems:NO]; return [subset isEqualToOrderedSet:expected]; } }); failureMessageForTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; return [NSString stringWithFormat:@"expected: %@ to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; return [NSString stringWithFormat:@"expected: %@ not to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(startWith, beginWith, (id expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(conformTo, (Protocol *expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.m ================================================ #import "EXPMatchers+conformTo.h" #import "NSValue+Expecta.h" #import EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL{ return !(actualIsNil || expectedIsNil); }); match(^BOOL{ return [actual conformsToProtocol:expected]; }); failureMessageForTo(^NSString *{ if(actualIsNil) return @"the object is nil/null"; if(expectedIsNil) return @"the protocol is nil/null"; NSString *name = NSStringFromProtocol(expected); return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name]; }); failureMessageForNotTo(^NSString *{ if(actualIsNil) return @"the object is nil/null"; if(expectedIsNil) return @"the protocol is nil/null"; NSString *name = NSStringFromProtocol(expected); return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.h ================================================ #import "Expecta.h" EXPMatcherInterface(_contain, (id expected)); EXPMatcherInterface(contain, (id expected)); // to aid code completion #define contain(expected) _contain(EXPObjectify((expected))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.m ================================================ #import "EXPMatchers+contain.h" EXPMatcherImplementationBegin(_contain, (id expected)) { BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)]; BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL{ return actualIsCompatible && !expectedIsNil; }); match(^BOOL{ if(actualIsCompatible) { if([actual isKindOfClass:[NSString class]]) { return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound; } else { for (id object in actual) { if ([object isEqual:expected]) { return YES; } } } } return NO; }); failureMessageForTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; if(expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.h ================================================ #import "Expecta.h" EXPMatcherInterface(endWith, (id expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.m ================================================ #import "EXPMatchers+endWith.h" EXPMatcherImplementationBegin(endWith, (id expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); prerequisite(^BOOL { return actualAndExpectedAreCompatible; }); match(^BOOL { if ([actual isKindOfClass:[NSString class]]) { return [actual hasSuffix:expected]; } else if ([actual isKindOfClass:[NSArray class]]) { if ([expected count] > [actual count] || [expected count] == 0) { return NO; } NSArray *subArray = [actual subarrayWithRange:NSMakeRange([actual count] - [expected count], [expected count])]; return [subArray isEqualToArray:expected]; } else { if ([expected count] > [actual count] || [expected count] == 0) { return NO; } NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange([actual count] - [expected count], [expected count]) copyItems:NO]; return [subset isEqualToOrderedSet:expected]; } }); failureMessageForTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; return [NSString stringWithFormat:@"expected: %@ to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); failureMessageForNotTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; return [NSString stringWithFormat:@"expected: %@ not to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.h ================================================ #import "Expecta.h" EXPMatcherInterface(_equal, (id expected)); EXPMatcherInterface(equal, (id expected)); // to aid code completion #define equal(...) _equal(EXPObjectify((__VA_ARGS__))) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.m ================================================ #import "EXPMatchers+equal.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(_equal, (id expected)) { match(^BOOL{ if((actual == expected) || [actual isEqual:expected]) { return YES; } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) { if([actual isKindOfClass:[NSDecimalNumber class]] || [expected isKindOfClass:[NSDecimalNumber class]]) { NSDecimalNumber *actualDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) actual decimalValue]]; NSDecimalNumber *expectedDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) expected decimalValue]]; return [actualDecimalNumber isEqualToNumber:expectedDecimalNumber]; } else { if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) { return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue]; } } } return NO; }); failureMessageForTo(^NSString *{ NSString *expectedDescription = EXPDescribeObject(expected); NSString *actualDescription = EXPDescribeObject(actual); if (![expectedDescription isEqualToString:actualDescription]) { return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; } else { return [NSString stringWithFormat:@"expected (%@): %@, got (%@): %@", NSStringFromClass([expected class]), EXPDescribeObject(expected), NSStringFromClass([actual class]), EXPDescribeObject(actual)]; } }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h ================================================ #import "Expecta.h" EXPMatcherInterface(haveCountOf, (NSUInteger expected)); EXPMatcherInterface(haveCount, (NSUInteger expected)); EXPMatcherInterface(haveACountOf, (NSUInteger expected)); EXPMatcherInterface(haveLength, (NSUInteger expected)); EXPMatcherInterface(haveLengthOf, (NSUInteger expected)); EXPMatcherInterface(haveALengthOf, (NSUInteger expected)); #define beEmpty() haveCountOf(0) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.m ================================================ #import "EXPMatchers+haveCountOf.h" EXPMatcherImplementationBegin(haveCountOf, (NSUInteger expected)) { BOOL actualIsStringy = [actual isKindOfClass:[NSString class]] || [actual isKindOfClass:[NSAttributedString class]]; BOOL actualIsCompatible = actualIsStringy || [actual respondsToSelector:@selector(count)]; prerequisite(^BOOL{ return actualIsCompatible; }); NSUInteger (^count)(id) = ^(id actual) { if(actualIsStringy) { return [actual length]; } else { return [actual count]; } }; match(^BOOL{ if(actualIsCompatible) { return count(actual) == expected; } return NO; }); failureMessageForTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; return [NSString stringWithFormat:@"expected %@ to have a count of %zi but got %zi", EXPDescribeObject(actual), expected, count(actual)]; }); failureMessageForNotTo(^NSString *{ if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; return [NSString stringWithFormat:@"expected %@ not to have a count of %zi", EXPDescribeObject(actual), expected]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(haveCount, haveCountOf, (NSUInteger expected)); EXPMatcherAliasImplementation(haveACountOf, haveCountOf, (NSUInteger expected)); EXPMatcherAliasImplementation(haveLength, haveCountOf, (NSUInteger expected)); EXPMatcherAliasImplementation(haveLengthOf, haveCountOf, (NSUInteger expected)); EXPMatcherAliasImplementation(haveALengthOf, haveCountOf, (NSUInteger expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+match.h ================================================ #import "Expecta.h" EXPMatcherInterface(match, (NSString *expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+match.m ================================================ #import "EXPMatchers+match.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(match, (NSString *expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); __block NSRegularExpression *regex = nil; __block NSError *regexError = nil; prerequisite (^BOOL { BOOL nilInput = (actualIsNil || expectedIsNil); if (!nilInput) { regex = [NSRegularExpression regularExpressionWithPattern:expected options:0 error:®exError]; } return !nilInput && regex; }); match(^BOOL { NSRange range = [regex rangeOfFirstMatchInString:actual options:0 range:NSMakeRange(0, [actual length])]; return !NSEqualRanges(range, NSMakeRange(NSNotFound, 0)); }); failureMessageForTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expression is nil/null"; if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]]; return [NSString stringWithFormat:@"expected: %@ to match to %@", EXPDescribeObject(actual), expected]; }); failureMessageForNotTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNil) return @"the expression is nil/null"; if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]]; return [NSString stringWithFormat:@"expected: %@ not to match to %@", EXPDescribeObject(actual), expected]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.h ================================================ #import "Expecta.h" EXPMatcherInterface(postNotification, (id expectedNotification)); EXPMatcherInterface(notify, (id expectedNotification)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.m ================================================ #import "EXPMatchers+postNotification.h" @implementation NSNotification (EXPEquality) - (BOOL)exp_isFunctionallyEqualTo:(NSNotification *)otherNotification { if (![otherNotification isKindOfClass:[NSNotification class]]) return NO; BOOL namesMatch = [otherNotification.name isEqualToString:self.name]; BOOL objectsMatch = YES; if (otherNotification.object || self.object) { objectsMatch = [otherNotification.object isEqual:self.object]; } BOOL userInfoMatches = YES; if (otherNotification.userInfo || self.userInfo) { userInfoMatches = [otherNotification.userInfo isEqual:self.userInfo]; } return (namesMatch && objectsMatch && userInfoMatches); } @end EXPMatcherImplementationBegin(postNotification, (id expected)){ BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); BOOL isNotification = [expected isKindOfClass:[NSNotification class]]; BOOL isName = [expected isKindOfClass:[NSString class]]; __block NSString *expectedName; __block BOOL expectedNotificationOccurred = NO; __block id observer; prerequisite(^BOOL{ expectedNotificationOccurred = NO; if (actualIsNil || expectedIsNil) return NO; if (isNotification) { expectedName = [expected name]; }else if(isName) { expectedName = expected; }else{ return NO; } observer = [[NSNotificationCenter defaultCenter] addObserverForName:expectedName object:nil queue:nil usingBlock:^(NSNotification *note){ if (isNotification) { expectedNotificationOccurred |= [expected exp_isFunctionallyEqualTo:note]; }else{ expectedNotificationOccurred = YES; } }]; ((EXPBasicBlock)actual)(); return YES; }); match(^BOOL{ if(expectedNotificationOccurred) { [[NSNotificationCenter defaultCenter] removeObserver:observer]; } return expectedNotificationOccurred; }); failureMessageForTo(^NSString *{ if (observer) { [[NSNotificationCenter defaultCenter] removeObserver:observer]; } if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; if(!(isNotification || isName)) return @"the actual value is not a notification or string"; return [NSString stringWithFormat:@"expected: %@, got: none",expectedName]; }); failureMessageForNotTo(^NSString *{ if (observer) { [[NSNotificationCenter defaultCenter] removeObserver:observer]; } if(actualIsNil) return @"the actual value is nil/null"; if(expectedIsNil) return @"the expected value is nil/null"; if(!(isNotification || isName)) return @"the actual value is not a notification or string"; return [NSString stringWithFormat:@"expected: none, got: %@", expectedName]; }); } EXPMatcherImplementationEnd EXPMatcherAliasImplementation(notify, postNotification, (id expectedNotification)) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.h ================================================ #import "Expecta.h" EXPMatcherInterface(raise, (NSString *expectedExceptionName)); #define raiseAny() raise(nil) ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.m ================================================ #import "EXPMatchers+raise.h" #import "EXPDefines.h" EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) { __block NSException *exceptionCaught = nil; match(^BOOL{ BOOL expectedExceptionCaught = NO; @try { ((EXPBasicBlock)actual)(); } @catch(NSException *e) { exceptionCaught = e; expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]; } return expectedExceptionCaught; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@, got: %@", expectedExceptionName ? expectedExceptionName : @"any exception", exceptionCaught ? [exceptionCaught name] : @"no exception"]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@, got: %@", expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", exceptionCaught ? [exceptionCaught name] : @"no exception"]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h ================================================ #import "Expecta.h" EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.m ================================================ #import "EXPMatchers+raiseWithReason.h" #import "EXPDefines.h" EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) { __block NSException *exceptionCaught = nil; match(^BOOL{ BOOL expectedExceptionCaught = NO; @try { ((EXPBasicBlock)actual)(); } @catch(NSException *e) { exceptionCaught = e; expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) && ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason]))); } return expectedExceptionCaught; }); failureMessageForTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", expectedExceptionName ?: @"any exception", expectedReason ?: @"any reason", exceptionCaught ? [exceptionCaught name] : @"no exception", exceptionCaught ? [exceptionCaught reason] : @""]; }); failureMessageForNotTo(^NSString *{ return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason", exceptionCaught ? [exceptionCaught name] : @"no exception", exceptionCaught ? [exceptionCaught reason] : @"no reason"]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.h ================================================ #import "Expecta.h" EXPMatcherInterface(respondTo, (SEL expected)); ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.m ================================================ #import "EXPMatchers+respondTo.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(respondTo, (SEL expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNull = (expected == NULL); prerequisite (^BOOL { return !(actualIsNil || expectedIsNull); }); match(^BOOL { return [actual respondsToSelector:expected]; }); failureMessageForTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNull) return @"the selector is null"; return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; }); failureMessageForNotTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNull) return @"the selector is null"; return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; }); } EXPMatcherImplementationEnd ================================================ FILE: Pods/Expecta/Expecta/Matchers/EXPMatchers.h ================================================ #import "EXPMatchers+beNil.h" #import "EXPMatchers+equal.h" #import "EXPMatchers+beInstanceOf.h" #import "EXPMatchers+beKindOf.h" #import "EXPMatchers+beSubclassOf.h" #import "EXPMatchers+conformTo.h" #import "EXPMatchers+beTruthy.h" #import "EXPMatchers+beFalsy.h" #import "EXPMatchers+contain.h" #import "EXPMatchers+beSupersetOf.h" #import "EXPMatchers+haveCountOf.h" #import "EXPMatchers+beIdenticalTo.h" #import "EXPMatchers+beGreaterThan.h" #import "EXPMatchers+beGreaterThanOrEqualTo.h" #import "EXPMatchers+beLessThan.h" #import "EXPMatchers+beLessThanOrEqualTo.h" #import "EXPMatchers+beInTheRangeOf.h" #import "EXPMatchers+beCloseTo.h" #import "EXPMatchers+raise.h" #import "EXPMatchers+raiseWithReason.h" #import "EXPMatchers+respondTo.h" #import "EXPMatchers+postNotification.h" #import "EXPMatchers+beginWith.h" #import "EXPMatchers+endWith.h" #import "EXPMatchers+match.h" ================================================ FILE: Pods/Expecta/Expecta/NSObject+Expecta.h ================================================ #import @interface NSObject (Expecta) - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected; @end ================================================ FILE: Pods/Expecta/Expecta/NSValue+Expecta.h ================================================ #import @interface NSValue (Expecta) @property (nonatomic) const char *_EXP_objCType; @end ================================================ FILE: Pods/Expecta/Expecta/NSValue+Expecta.m ================================================ #import "NSValue+Expecta.h" #import #import "Expecta.h" EXPFixCategoriesBug(NSValue_Expecta); @implementation NSValue (Expecta) static char _EXP_typeKey; - (const char *)_EXP_objCType { return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding]; } - (void)set_EXP_objCType:(const char *)_EXP_objCType { objc_setAssociatedObject(self, &_EXP_typeKey, @(_EXP_objCType), OBJC_ASSOCIATION_COPY_NONATOMIC); } @end ================================================ FILE: Pods/Expecta/LICENSE ================================================ Copyright (c) 2011-2015 Specta Team - https://github.com/specta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Pods/Expecta/README.md ================================================ #Expecta [![Build Status](http://img.shields.io/travis/specta/expecta/master.svg?style=flat)](https://travis-ci.org/specta/expecta) [![Pod Version](http://img.shields.io/cocoapods/v/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/) [![Pod Platform](http://img.shields.io/cocoapods/p/Expecta.svg?style=flat)](http://cocoadocs.org/docsets/Expecta/) [![Pod License](http://img.shields.io/cocoapods/l/Expecta.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0.html) A matcher framework for Objective-C and Cocoa. ## Introduction The main advantage of using Expecta over other matcher frameworks is that you do not have to specify the data types. Also, the syntax of Expecta matchers is much more readable and does not suffer from parenthesitis. ```objective-c expect(@"foo").to.equal(@"foo"); // `to` is a syntactic sugar and can be safely omitted. expect(foo).notTo.equal(1); expect([bar isBar]).to.equal(YES); expect(baz).to.equal(3.14159); ``` Expecta is framework-agnostic: it works well with XCTest and XCTest-compatible test frameworks such as [Specta](http://github.com/petejkim/specta/). ## Installation You can setup Expecta using [Carthage](https://github.com/Carthage/Carthage), [CocoaPods](http://github.com/CocoaPods/CocoaPods) or [completely manually](#setting-up-manually). ### Carthage 1. Add Expecta to your project's `Cartfile.private`: ```ruby github "specta/expecta" "master" ``` 2. Run `carthage update` in your project directory. 3. Drag the appropriate **Expecta.framework** for your platform (located in `Carthage/Build/`) into your application’s Xcode project, and add it to your test target(s). ### CocoaPods 1. Add Expecta to your project's `Podfile`: ```ruby target :MyApp do # Your app's dependencies end target :MyAppTests do pod 'Expecta', '~> 1.0.0' end ``` 2. Run `pod update` or `pod install` in your project directory. ### Setting Up Manually 1. Clone Expecta from Github. 2. Run `rake` in your project directory to build the frameworks and libraries. 3. Add a Cocoa or Cocoa Touch Unit Testing Bundle target to your Xcode project if you don't already have one. 4. For **OS X projects**, copy and add `Expecta.framework` in the `Products/osx` folder to your project's test target. For **iOS projects**, copy and add `Expecta.framework` in the `Products/ios` folder to your project's test target. You can also use `libExpecta.a` if you prefer to link Expecta as a static library — iOS 7.x and below require this. 6. Add `-ObjC` and `-all_load` to the **Other Linker Flags** build setting for the test target in your Xcode project. 7. You can now use Expecta in your test classes by adding the following import: ```objective-c @import Expecta; // If you're using Expecta.framework // OR #import // If you're using the static library, or the framework ``` ## Built-in Matchers > `expect(x).to.equal(y);` compares objects or primitives x and y and passes if they are identical (==) or equivalent isEqual:). > `expect(x).to.beIdenticalTo(y);` compares objects x and y and passes if they are identical and have the same memory address. > `expect(x).to.beNil();` passes if x is nil. > `expect(x).to.beTruthy();` passes if x evaluates to true (non-zero). > `expect(x).to.beFalsy();` passes if x evaluates to false (zero). > `expect(x).to.contain(y);` passes if an instance of NSArray or NSString x contains y. > `expect(x).to.beSupersetOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSOrderedSet x contains all elements of y. > `expect(x).to.haveCountOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of y. > `expect(x).to.beEmpty();` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of . > `expect(x).to.beInstanceOf([Foo class]);` passes if x is an instance of a class Foo. > `expect(x).to.beKindOf([Foo class]);` passes if x is an instance of a class Foo or if x is an instance of any class that inherits from the class Foo. > `expect([Foo class]).to.beSubclassOf([Bar class]);` passes if the class Foo is a subclass of the class Bar or if it is identical to the class Bar. Use beKindOf() for class clusters. > `expect(x).to.beLessThan(y);` passes if `x` is less than `y`. > `expect(x).to.beLessThanOrEqualTo(y);` passes if `x` is less than or equal to `y`. > `expect(x).to.beGreaterThan(y);` passes if `x` is greater than `y`. > `expect(x).to.beGreaterThanOrEqualTo(y);` passes if `x` is greater than or equal to `y`. > `expect(x).to.beInTheRangeOf(y,z);` passes if `x` is in the range of `y` and `z`. > `expect(x).to.beCloseTo(y);` passes if `x` is close to `y`. > `expect(x).to.beCloseToWithin(y, z);` passes if `x` is close to `y` within `z`. > `expect(^{ /* code */ }).to.raise(@"ExceptionName");` passes if a given block of code raises an exception named `ExceptionName`. > `expect(^{ /* code */ }).to.raiseAny();` passes if a given block of code raises any exception. > `expect(x).to.conformTo(y);` passes if `x` conforms to the protocol `y`. > `expect(x).to.respondTo(y);` passes if `x` responds to the selector `y`. > `expect(^{ /* code */ }).to.notify(@"NotificationName");` passes if a given block of code generates an NSNotification amed `NotificationName`. > `expect(^{ /* code */ }).to.notify(notification);` passes if a given block of code generates an NSNotification equal to the passed `notification`. > `expect(x).to.beginWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` begins with `y`. Also liased by `startWith` > `expect(x).to.endWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` ends with `y`. > `expect(x).to.match(y);` passes if an instance of NSString `x` matches regular expression (given as NSString) `y` one or more times. ## Inverting Matchers Every matcher's criteria can be inverted by prepending `.notTo` or `.toNot`: >`expect(x).notTo.equal(y);` compares objects or primitives x and y and passes if they are *not* equivalent. ## Asynchronous Testing Every matcher can be made to perform asynchronous testing by prepending `.will`, `.willNot` or `after(...)`: >`expect(x).will.beNil();` passes if x becomes nil before the default timeout. > >`expect(x).willNot.beNil();` passes if x becomes non-nil before the default timeout. > >`expect(x).after(3).to.beNil();` passes if x becoms nil after 3.0 seconds. > >`expect(x).after(2.5).notTo.equal(42);` passes if x doesn't equal 42 after 2.5 seconds. The default timeout is 1.0 second and is used for all matchers if not otherwise specified. This setting can be changed by calling `[Expecta setAsynchronousTestTimeout:x]`, where `x` is the desired timeout in seconds. ```objective-c describe(@"Foo", ^{ beforeAll(^{ // All asynchronous matching using `will` and `willNot` // will have a timeout of 2.0 seconds [Expecta setAsynchronousTestTimeout:2]; }); it(@"will not be nil", ^{ // Test case where default timeout is used expect(foo).willNot.beNil(); }); it(@"should equal 42 after 3 seconds", ^{ // Signle case where timeout differs from the default expect(foo).after(3).to.equal(42); }); }); ``` ## Forced Failing You can fail a test by using the `failure` attribute. This can be used to test branching. > `failure(@"This should not happen");` outright fails a test. ## Writing New Matchers Writing a new matcher is easy with special macros provided by Expecta. Take a look at how `.beKindOf()` matcher is defined: `EXPMatchers+beKindOf.h` ```objective-c #import "Expecta.h" EXPMatcherInterface(beKindOf, (Class expected)); // 1st argument is the name of the matcher function // 2nd argument is the list of arguments that may be passed in the function // call. // Multiple arguments are fine. (e.g. (int foo, float bar)) #define beAKindOf beKindOf ``` `EXPMatchers+beKindOf.m` ```objective-c #import "EXPMatchers+beKindOf.h" EXPMatcherImplementationBegin(beKindOf, (Class expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNil = (expected == nil); prerequisite(^BOOL { return !(actualIsNil || expectedIsNil); // Return `NO` if matcher should fail whether or not the result is inverted // using `.Not`. }); match(^BOOL { return [actual isKindOfClass:expected]; // Return `YES` if the matcher should pass, `NO` if it should not. // The actual value/object is passed as `actual`. // Please note that primitive values will be wrapped in NSNumber/NSValue. }); failureMessageForTo(^NSString * { if (actualIsNil) return @"the actual value is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: a kind of %@, " "got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; // Return the message to be displayed when the match function returns `YES`. }); failureMessageForNotTo(^NSString * { if (actualIsNil) return @"the actual value is nil/null"; if (expectedIsNil) return @"the expected value is nil/null"; return [NSString stringWithFormat:@"expected: not a kind of %@, " "got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; // Return the message to be displayed when the match function returns `NO`. }); } EXPMatcherImplementationEnd ``` ## Dynamic Predicate Matchers It is possible to add predicate matchers by simply defining the matcher interface, with the matcher implementation being handled at runtime by delegating to the predicate method on your object. For instance, if you have the following class: ```objc @interface LightSwitch : NSObject @property (nonatomic, assign, getter=isTurnedOn) BOOL turnedOn; @end @implementation LightSwitch @synthesize turnedOn; @end ``` The normal way to write an assertion that the switch is turned on would be: ```objc expect([lightSwitch isTurnedOn]).to.beTruthy(); ``` However, if we define a custom predicate matcher: ```objc EXPMatcherInterface(isTurnedOn, (void)); ``` (Note: we haven't defined the matcher implementation, just it's interface) You can now write your assertion as follows: ```objc expect(lightSwitch).isTurnedOn(); ``` ## Contribution Guidelines * Please use only spaces and indent 2 spaces at a time. * Please prefix instance variable names with a single underscore (`_`). * Please prefix custom classes and functions defined in the global scope with `EXP`. ## License Copyright (c) 2012-2015 [Specta Team](https://github.com/specta?tab=members). This software is licensed under the [MIT License](http://github.com/specta/specta/raw/master/LICENSE). ================================================ FILE: Pods/Local Podspecs/Masonry.podspec.json ================================================ { "name": "Masonry", "version": "1.1.0", "license": "MIT", "summary": "Harness the power of Auto Layout NSLayoutConstraints with a simplified, chainable and expressive syntax.", "homepage": "https://github.com/cloudkite/Masonry", "authors": { "Jonas Budelmann": "jonas.budelmann@gmail.com" }, "social_media_url": "http://twitter.com/cloudkite", "source": { "git": "https://github.com/cloudkite/Masonry.git", "tag": "v1.1.0" }, "description": "Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax.\nMasonry has its own layout DSL which provides a chainable way of describing your\nNSLayoutConstraints which results in layout code which is more concise and readable.\n Masonry supports iOS and Mac OSX.", "source_files": "Masonry/*.{h,m}", "ios": { "frameworks": [ "Foundation", "UIKit" ] }, "tvos": { "frameworks": [ "Foundation", "UIKit" ] }, "osx": { "frameworks": [ "Foundation", "AppKit" ] }, "platforms": { "ios": "6.0", "osx": "10.7", "tvos": "9.0" }, "requires_arc": true } ================================================ FILE: Pods/Pods.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 0435080233FFD861A266AB43BE3279D3 /* EXPMatchers+beNil.m in Sources */ = {isa = PBXBuildFile; fileRef = 2251A125FE1F9EE61891B85AAAE71511 /* EXPMatchers+beNil.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 045E77138594FCD0492D74EE7C22AC90 /* EXPDoubleTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EBF9BAD2F54920E12BA8D79EB3EE01C /* EXPDoubleTuple.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 067B3CDE5AAD4D941172A17C9EEA5916 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AF06A246FC5C7C1E779C3BFB883040C /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 07B309A8727E5DBE05DB1F644F7B8D8A /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A54ADC5F5885AE49835C21390D7B42C /* MASViewConstraint.m */; }; 0B3330DD885757A45805E83A69E7AFFD /* EXPBlockDefinedMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 55CDC4616612ED7AA50A3E836E82B6BE /* EXPBlockDefinedMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0CD876A643FA00F42565F0B4CFE5C360 /* Expecta.h in Headers */ = {isa = PBXBuildFile; fileRef = 50660A3CB85C3AEC478DB2211E3CD76D /* Expecta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0D4B6D7C17953EF6C0BEFADA699DA6D2 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 194EE173246D25F2D7ED8C47FAF2ACF4 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0E8E7C035F8969CF3DC93E5490A6158B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */; }; 0F7BD72B0882E4D4DD27C3B914EC3857 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A28546AD6B1C73C384E28625120AED5 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0FE4C580D709657792E5661E74F171D5 /* EXPMatchers+match.m in Sources */ = {isa = PBXBuildFile; fileRef = 10F25824C22E66EAFBAA5C0F62629D84 /* EXPMatchers+match.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 119C10C9E57E10B254B8B13A06D332F4 /* EXPMatchers+raise.h in Headers */ = {isa = PBXBuildFile; fileRef = 10F0627165FE862DA384F755B45FD6A7 /* EXPMatchers+raise.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11B98D7660EAD3B22A6F8DAFAC8E96F8 /* EXPMatchers+haveCountOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 75992ED787187D30BE4B5F69BEF5EE30 /* EXPMatchers+haveCountOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 120A345233C900C50BAD6F3950FAB8FA /* NSValue+Expecta.h in Headers */ = {isa = PBXBuildFile; fileRef = 82F3CFD18ABD64DD8E88230EE43D854A /* NSValue+Expecta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12ADCD5E7598997A3486E62E784DB241 /* EXPMatchers.h in Headers */ = {isa = PBXBuildFile; fileRef = 61A4675B57359AB9653085CE195438A0 /* EXPMatchers.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19CDE56AC4388C284D9A394F64E0530C /* EXPMatchers+beNil.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D20E91754698E478D6D3E468D5EC2C8 /* EXPMatchers+beNil.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1AF47B7901796231A318934C2F0DDC04 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = DBCE4AE4A77A457256CB505688569B23 /* MASLayoutConstraint.m */; }; 1C74D210067A2D584AA672E61F246ECC /* EXPExpect.m in Sources */ = {isa = PBXBuildFile; fileRef = CBEA9FE72B61C2E594B205165A09ECA7 /* EXPExpect.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 1D622FBC8A4262E6B398F5CCCB1D9650 /* EXPMatchers+raiseWithReason.m in Sources */ = {isa = PBXBuildFile; fileRef = 228937A58D5E1EF34C595366A42C018E /* EXPMatchers+raiseWithReason.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 1E2343F7AE04C5D386CCD455E84F13E0 /* EXPMatchers+beTruthy.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B7202FE09B3976D80FD78EF63258F6 /* EXPMatchers+beTruthy.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 1F002B6CD1662BADA6556D76FFFE0B96 /* Pods-Masonry iOS Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5478FCE860D549499E9B142210C4E612 /* Pods-Masonry iOS Tests-dummy.m */; }; 24FF4A3B66A2F383BA14790790108406 /* EXPMatchers+haveCountOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 663B481626C7E7C19A7A42120FFC0E77 /* EXPMatchers+haveCountOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 2523657BEE249A532CDFD495AC911F39 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B14D8EAF812AD82BC8BA17C3DE5B573 /* EXPMatchers+beLessThanOrEqualTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 28BC58EE3C7374C4C2DEF6D029011C84 /* EXPMatchers+beInTheRangeOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B014C13318B98A27EB6C15EB341678A /* EXPMatchers+beInTheRangeOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 28DD12DAF70F49B558112AA5E2809F19 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D2BB147FD43518883D32412C882B443 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2C8FBF03AD0FD40587A84D2994D758B4 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 01B7B1098F825865196B739BF9E36C04 /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2C944499E3BB44E17E10959A76BBAEA3 /* EXPMatchers+beGreaterThan.m in Sources */ = {isa = PBXBuildFile; fileRef = B1B09BEB8A5DCEEF709CBA1F5CEE0B3B /* EXPMatchers+beGreaterThan.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 2D814705CE041C701138BD9147CB21AA /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = AEEF83956F9DBD675F4C2EF46B690567 /* MASConstraint.m */; }; 31D27BF6DE823F040465EEC46431E22E /* EXPExpect.h in Headers */ = {isa = PBXBuildFile; fileRef = 7735CC4570D0C643EF99240D43284C4A /* EXPExpect.h */; settings = {ATTRIBUTES = (Public, ); }; }; 38B02E0B37B1F0225FBE396BD51461D9 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F83FB50741120EF2F5F9723A76C9099 /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 391226D83570CA724B533A2C609A5EF5 /* EXPMatchers+beSupersetOf.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2917440B958D545CC2EE8F2240D37E /* EXPMatchers+beSupersetOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 3AB6F716B6B591E90D2E2CB1434B55BB /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 593CB40473F1E441BC65F0044379DA72 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3E2C9C19590011C8FE1F3966F4AF52D5 /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 48FB054B1F997F66CA0E17DB3B26223C /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; 409B7E241957B5C0ADFA4DEA82CDA7AB /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 02DA3844CF514753E9CC1AE66A762D26 /* View+MASAdditions.m */; }; 42FA711D0BA099127544F7A978075C9D /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = AE58747F7ED5EE1564AC83C82F3C9DEA /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47E018E82EA7801C93BE8D632FBAA3EC /* EXPMatchers+beCloseTo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8638DC7137054523DFDCD37576559 /* EXPMatchers+beCloseTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4943F7D828D56A874ACCA7AC312F863B /* EXPMatchers+beCloseTo.m in Sources */ = {isa = PBXBuildFile; fileRef = C3EDF7B170EC221838CC2A773B0CDC59 /* EXPMatchers+beCloseTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 4B76A75E1FA371E7EF6C821CD52514A1 /* EXPMatchers+equal.h in Headers */ = {isa = PBXBuildFile; fileRef = 8780C4CC76E68DD8EA97F0E4B3287D64 /* EXPMatchers+equal.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C2D57EF131B9A1AA1A65F36DA717BC7 /* EXPMatchers+beSubclassOf.h in Headers */ = {isa = PBXBuildFile; fileRef = CBFE4C2A8558AE9FF24FCA67343113E2 /* EXPMatchers+beSubclassOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4E89738B989CA5A6018187E52FE0E216 /* EXPMatchers+raiseWithReason.h in Headers */ = {isa = PBXBuildFile; fileRef = 13852BA59629381181212D4693F5CEC8 /* EXPMatchers+raiseWithReason.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4EB308BF802E6F21BABDA8B8718CC7AB /* NSValue+Expecta.m in Sources */ = {isa = PBXBuildFile; fileRef = ADBF0443B4181A4D41268AB9F62AA73C /* NSValue+Expecta.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 4F51EE6366844B6C34DD13F77D9A76CA /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B80588779A2286A5E054DE4D0DDC03A /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4FE0FA38EA4BC9922DB982A2FB4B504A /* EXPMatchers+endWith.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EEECBC2AC825C5498273AB762F561EF /* EXPMatchers+endWith.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58E38027B0A4F6CA7BE54F0AE8D4885B /* EXPMatchers+conformTo.m in Sources */ = {isa = PBXBuildFile; fileRef = C565C77B7F3AC98E871994970653A958 /* EXPMatchers+conformTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 5D50DA13C7A8B2AF549AA4F05E69F9F4 /* EXPMatchers+respondTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9616A699420336DD8F227A5C41E36432 /* EXPMatchers+respondTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 5EB8C17604A5FCA7B0F9174850D0441F /* EXPMatchers+beginWith.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E1D663D9B2CCDFFC739982A06D57C5 /* EXPMatchers+beginWith.h */; settings = {ATTRIBUTES = (Public, ); }; }; 61E89F8C6D2C5658ECADCC9BE04E4E0F /* EXPMatchers+beFalsy.h in Headers */ = {isa = PBXBuildFile; fileRef = 481E644C11C98774BE98309BA0A2CB6C /* EXPMatchers+beFalsy.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6209E20926D79222E59F58B962BFAA1E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDF04AEFCC4B011565BFFBFFF52B2FCE /* UIKit.framework */; }; 62A200B73B76F6740A3EEA168FBFFF41 /* EXPMatchers+match.h in Headers */ = {isa = PBXBuildFile; fileRef = 88907F8AEA4C9B20AEB63E2047F54502 /* EXPMatchers+match.h */; settings = {ATTRIBUTES = (Public, ); }; }; 63CDCCAC82CBC33021220531D93213A2 /* EXPMatcherHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD870522AC013353A13269A9CDEA664 /* EXPMatcherHelpers.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 643DE0287F1066D083368EAC928DF078 /* EXPFloatTuple.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EEA345137E6F1B86DEC1ECEA04BEBD5 /* EXPFloatTuple.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 660BEA8AC93BC6DF29A73D1570C10120 /* ExpectaSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 80708E2496B3C69452E559E575CD1D47 /* ExpectaSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69DCF5F3A96B49720B728BA6EF5E095A /* NSObject+Expecta.h in Headers */ = {isa = PBXBuildFile; fileRef = C0F0C9DE4D36C0025D1A49B0106644A4 /* NSObject+Expecta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6DA9AB53FE1CA890DF5FB0468FA0F476 /* Pods-Masonry iOS Examples-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F2DF08BADAA0D595D88E9A5F2F4AE8F /* Pods-Masonry iOS Examples-dummy.m */; }; 7100640F169A4EC93CA15F0D8B5AFE8F /* EXPMatchers+beIdenticalTo.h in Headers */ = {isa = PBXBuildFile; fileRef = C98931A95CEDDC4098458BEB8FF864ED /* EXPMatchers+beIdenticalTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 71FBC2F8907E29EB767026E6A08F7EEF /* EXPMatchers+beSubclassOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 98AFDA78C0BA149C8976CF3889419AA7 /* EXPMatchers+beSubclassOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 76A58C6131A1264FDE3DADAEA0AC83F5 /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = E66C1687519434878576CA9CA479B868 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 76FFE0A5253E08250D976CAE912B89D9 /* EXPMatchers+beSupersetOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F3869A1E846595FC8A567E9EF91600E /* EXPMatchers+beSupersetOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7A50398D1D6F1D22165ECAA192F9D1CF /* EXPMatchers+respondTo.h in Headers */ = {isa = PBXBuildFile; fileRef = D242BA4F2D8595007967657C3EBF92CE /* EXPMatchers+respondTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7C4FFAF7E7BD72B4775C2966898B3A83 /* EXPMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F3B66464C8F4DC1EDFFEA58A98F9B5C /* EXPMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; 80408C0CF9D13D89E500446267DD0041 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 358E8501C72A8B4A191589A7570FCC15 /* NSLayoutConstraint+MASDebugAdditions.m */; }; 863C5CC8F4698A0C85AB53C9B072D889 /* EXPMatchers+equal.m in Sources */ = {isa = PBXBuildFile; fileRef = BFE37A3BBF6AEB4B7163AAE1BD655CDD /* EXPMatchers+equal.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 87C087B7F1B93C2DD0B42A93B3E9D9C4 /* EXPMatchers+conformTo.h in Headers */ = {isa = PBXBuildFile; fileRef = E36B444420761FDAD709E0D161F812C1 /* EXPMatchers+conformTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 885C2534832AF6B1DFA98FA19C4D9994 /* EXPMatchers+beKindOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4C6FD0E96DEE3BA24A38BA86A2EE83 /* EXPMatchers+beKindOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 8994485FB1398BF225377D4C109CA38B /* EXPMatchers+beKindOf.h in Headers */ = {isa = PBXBuildFile; fileRef = E1DAB7DBD1812988117194D50ACE07A0 /* EXPMatchers+beKindOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 94C94F986312F61D076591DBCEC07104 /* EXPMatchers+beInTheRangeOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 10904D53FD27FC7E59BF92201687D517 /* EXPMatchers+beInTheRangeOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9F196561D7369053FA6D9FD4374E85B9 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F34293A1C0AD9FD7013D79B910FE7E5 /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; A12B39559E464A1089E4389274973616 /* EXPMatchers+beLessThan.m in Sources */ = {isa = PBXBuildFile; fileRef = E4CFDB3889CFAC5E05497101D3F82C0A /* EXPMatchers+beLessThan.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A193FB77C3606DE847937B79BD869F26 /* EXPMatchers+beTruthy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AAF8809A7BBA8A694825848A7EF07D2 /* EXPMatchers+beTruthy.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5CB8C92268FCAC7B00F12EE55B43338 /* EXPMatchers+raise.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1DE5A0855C3142FCDE4471717B4C92 /* EXPMatchers+raise.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A8A60B0CEECC7D7C9D8CA6B2DC811C64 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = BB267133DB0AAEF96D19D2085B85E06D /* MASViewAttribute.m */; }; A904D2D6242F68CC3B959E2B0FC8B4F9 /* ExpectaObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C060BC1E7116BC87FA94B45087D771B /* ExpectaObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; AC80F28E4B250E6535484F5269566FF0 /* Pods-MasonryTestsLoader-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 40B4963257702BBD9CAF03BECB9D16F0 /* Pods-MasonryTestsLoader-dummy.m */; }; AEEF0434A83EF5F1949252A8409F71DD /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 6CBE98CC00A3DD78FC850D713EB164BE /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; AFD341AE846EE3D48F3832FB858FD31C /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3683CAB8F5A6384907767DF9817A4B09 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; B1820A5E15F22942E386756A0473E808 /* EXPMatchers+beLessThanOrEqualTo.h in Headers */ = {isa = PBXBuildFile; fileRef = 122F547802BB911D1B9F0D52C33B568D /* EXPMatchers+beLessThanOrEqualTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; B1964DABF421B8BA6BB9AB9E1CC0E387 /* EXPMatchers+beGreaterThan.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F04D682D92E0B2B40FCE8BE214BDA61 /* EXPMatchers+beGreaterThan.h */; settings = {ATTRIBUTES = (Public, ); }; }; B241CF27E6B9D2DBC3236BDC1BDA5B69 /* EXPMatchers+postNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5D45C77F469660C6D6155EA159784F /* EXPMatchers+postNotification.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2880B5D7D91AACFCEF345934CFEBA55 /* EXPMatchers+beInstanceOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C71CEC9EB6A0B127237D9BE7AAB6081 /* EXPMatchers+beInstanceOf.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; B66BCA2DD1043A4356B5286F346F8049 /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 585243F6624B3378D0DA0CF280D9F8EA /* Masonry-dummy.m */; }; B709C0890B67EB6C1AB9B9738CDBEEC6 /* EXPMatchers+beIdenticalTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 687D54A17077AB5A8B750650CACBF3B3 /* EXPMatchers+beIdenticalTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; B72D6F9CD6DCCF9339A269BC0CABA88C /* ExpectaObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4730731B518BAFE15142AA613F01F2EB /* ExpectaObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; B7FB8C30C577D624F5E0B1FDB3E6CD8B /* EXPUnsupportedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1DE5E5E11E91062A5DA859EDCE3C49 /* EXPUnsupportedObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; BAA98BF425D78B9F9FB405680EA0CB3D /* EXPMatchers+beLessThan.h in Headers */ = {isa = PBXBuildFile; fileRef = 8140BF73F39AA0E15893403B6B2DCD9D /* EXPMatchers+beLessThan.h */; settings = {ATTRIBUTES = (Public, ); }; }; BB0E62892680D990AC167E4629F95062 /* EXPMatchers+beGreaterThanOrEqualTo.h in Headers */ = {isa = PBXBuildFile; fileRef = 59623D6FE7CFF9076F3ACA8D492A0A1E /* EXPMatchers+beGreaterThanOrEqualTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; C091203A57422574B3263D1E9BA53A87 /* ExpectaSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = D8A10F7BEA143532312B95447C5A5B7C /* ExpectaSupport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; C498F24E736A80A0F6C440DBC33AF494 /* EXPMatchers+beFalsy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2547652506D61F49D4B0882ED6B64B16 /* EXPMatchers+beFalsy.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; C64C4032827660F5ED12E425857BE673 /* EXPMatcherHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A3DE5BA9F1F1BFDC50FA062018A4FF9 /* EXPMatcherHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; C670343470EAC260E60ABD463CC39E2D /* EXPMatchers+beginWith.m in Sources */ = {isa = PBXBuildFile; fileRef = 34177F23961DA5ABF45170FA2037F8C1 /* EXPMatchers+beginWith.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; CC995F4F36E9D6237AFC6F729364B867 /* EXPBlockDefinedMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 57E3007D6F08B4F287C35811E372C9D8 /* EXPBlockDefinedMatcher.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; CDA268F5B643324DD61A0E25BD4179ED /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C9A0D7E24E5DCE2B938FC4C4901B353 /* EXPMatchers+beGreaterThanOrEqualTo.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; D2BD7E6904BDD20074AB5A8B04400EB2 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A30D7435201DE311E06A35CEA390581 /* ViewController+MASAdditions.m */; }; D3B4D194BECF709DFA85E588891B885E /* EXPMatchers+contain.h in Headers */ = {isa = PBXBuildFile; fileRef = 44127DD3F6457EEB52F5B0B644C748E5 /* EXPMatchers+contain.h */; settings = {ATTRIBUTES = (Public, ); }; }; D69C7F6B7677C82AABBF7FE0057CE931 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = FC8A8F10966AF0D4BEF49EBF2CFF4C0C /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; D904A66B88A11E0356D09C38CA20102D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */; }; D94F3CDE976C052BF0BD112E257A7F19 /* EXPMatchers+postNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 065A35D6EF149C4D848B49BAA59DAE1E /* EXPMatchers+postNotification.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; DBA55CF16CB958E3F3D38079F18EBC06 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */; }; DFFE7035A8177E14B29DE53973AE3B1E /* EXPMatchers+beInstanceOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B9D165EC173241B2C9EFF6FDB72491D /* EXPMatchers+beInstanceOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; E220D02AE7833F8B9202B0304FFBB644 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 8524B32277BDB7E1A36FB5F3EB3BAC6B /* MASCompositeConstraint.m */; }; E846C94664199B4B993866C557EEC20D /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A31938A554F154B402756FCBFE7167B /* NSArray+MASAdditions.m */; }; E95DE019212836608A35BF3270AADF17 /* Expecta-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D50A0454EC2ACA566EC1A84F70DBE96A /* Expecta-dummy.m */; }; EBFA48D334098E6BAB801E6FB8F756C0 /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = EB9E853361218FD2866DABF9A3E384D5 /* MASConstraintMaker.m */; }; ED087996824EE3256B222E3BAEBAB14D /* EXPUnsupportedObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 035F256E7A521234689F67B3EC887567 /* EXPUnsupportedObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; EE5A8DD4F03A890084772DA66DE9BE93 /* EXPDoubleTuple.h in Headers */ = {isa = PBXBuildFile; fileRef = AEDF716CFA2F6ADA12E2C6D67EF8B2D2 /* EXPDoubleTuple.h */; settings = {ATTRIBUTES = (Public, ); }; }; EFCF1E2468BC28069F92B4702B5DD463 /* EXPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F338BE8E88D6EB9496878863145B7C5 /* EXPDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; F0B56A7D38A399A2F67F9920C9526A66 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */; }; F3D6C90DF502E4B6BFA4B4B950FB176B /* EXPFloatTuple.h in Headers */ = {isa = PBXBuildFile; fileRef = 63BB2BA348CAEB74A836E775BF8ABE2C /* EXPFloatTuple.h */; settings = {ATTRIBUTES = (Public, ); }; }; F589CF64CC8ED22D9F37824176FBBB72 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */; }; F7B20B4187947E3B6B93F0457C239D0B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2D9897D646E2BB9FBF73704C04440B2 /* XCTest.framework */; }; F8E39087737225714939DB0252FB1114 /* EXPMatchers+endWith.m in Sources */ = {isa = PBXBuildFile; fileRef = B20D7BAA1D4E85394D4C0BCBCB2BF960 /* EXPMatchers+endWith.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; FE84239BE923F217FD38E45B4F770EFD /* EXPMatchers+contain.m in Sources */ = {isa = PBXBuildFile; fileRef = DB37BB623433F136572448D26D6FB70A /* EXPMatchers+contain.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 3A31C048AC5B5E5AB145E49BF610B911 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 46D68D26DCAAC4D999D549BA45F0B0EC; remoteInfo = Expecta; }; 5E51BB7C485C3BB1001A7E9EF94414CF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 9DC8D9E02903E93BD0B2FEC9D846EA20; remoteInfo = Masonry; }; AA5F0BBF6F9F116C791133368DE92755 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 9DC8D9E02903E93BD0B2FEC9D846EA20; remoteInfo = Masonry; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 01B7B1098F825865196B739BF9E36C04 /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASAdditions.h"; sourceTree = ""; }; 02DA3844CF514753E9CC1AE66A762D26 /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "View+MASAdditions.m"; sourceTree = ""; }; 0341D10523364E42D0E6F9935E3DA6DE /* Pods-Masonry iOS Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Masonry iOS Tests-frameworks.sh"; sourceTree = ""; }; 035F256E7A521234689F67B3EC887567 /* EXPUnsupportedObject.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPUnsupportedObject.m; path = Expecta/EXPUnsupportedObject.m; sourceTree = ""; }; 065A35D6EF149C4D848B49BAA59DAE1E /* EXPMatchers+postNotification.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+postNotification.m"; path = "Expecta/Matchers/EXPMatchers+postNotification.m"; sourceTree = ""; }; 0792517CDD83AC956FA10DA378F7C590 /* Pods-MasonryTestsLoader-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MasonryTestsLoader-resources.sh"; sourceTree = ""; }; 0A28546AD6B1C73C384E28625120AED5 /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASConstraintMaker.h; sourceTree = ""; }; 0A3DE5BA9F1F1BFDC50FA062018A4FF9 /* EXPMatcherHelpers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPMatcherHelpers.h; path = Expecta/Matchers/EXPMatcherHelpers.h; sourceTree = ""; }; 0AAF8809A7BBA8A694825848A7EF07D2 /* EXPMatchers+beTruthy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beTruthy.h"; path = "Expecta/Matchers/EXPMatchers+beTruthy.h"; sourceTree = ""; }; 0F2DF08BADAA0D595D88E9A5F2F4AE8F /* Pods-Masonry iOS Examples-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Masonry iOS Examples-dummy.m"; sourceTree = ""; }; 10904D53FD27FC7E59BF92201687D517 /* EXPMatchers+beInTheRangeOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beInTheRangeOf.h"; path = "Expecta/Matchers/EXPMatchers+beInTheRangeOf.h"; sourceTree = ""; }; 10A477660D2D97AEF58A6795020511A9 /* libPods-Masonry iOS Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-Masonry iOS Tests.a"; path = "libPods-Masonry iOS Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 10F0627165FE862DA384F755B45FD6A7 /* EXPMatchers+raise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+raise.h"; path = "Expecta/Matchers/EXPMatchers+raise.h"; sourceTree = ""; }; 10F25824C22E66EAFBAA5C0F62629D84 /* EXPMatchers+match.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+match.m"; path = "Expecta/Matchers/EXPMatchers+match.m"; sourceTree = ""; }; 122F547802BB911D1B9F0D52C33B568D /* EXPMatchers+beLessThanOrEqualTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beLessThanOrEqualTo.h"; path = "Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h"; sourceTree = ""; }; 13852BA59629381181212D4693F5CEC8 /* EXPMatchers+raiseWithReason.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+raiseWithReason.h"; path = "Expecta/Matchers/EXPMatchers+raiseWithReason.h"; sourceTree = ""; }; 190660A7B90AD2F0323CF9185E32C8D5 /* Expecta-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Expecta-prefix.pch"; sourceTree = ""; }; 194EE173246D25F2D7ED8C47FAF2ACF4 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASViewConstraint.h; sourceTree = ""; }; 1B998D4CCC665C40E8A45CF07DFD7ABC /* Pods-Masonry iOS Examples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Masonry iOS Examples.release.xcconfig"; sourceTree = ""; }; 1C060BC1E7116BC87FA94B45087D771B /* ExpectaObject.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ExpectaObject.m; path = Expecta/ExpectaObject.m; sourceTree = ""; }; 1C13229D7A9FD06FAA259C99FB5A6E11 /* Pods-Masonry iOS Examples-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Masonry iOS Examples-resources.sh"; sourceTree = ""; }; 1D20E91754698E478D6D3E468D5EC2C8 /* EXPMatchers+beNil.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beNil.h"; path = "Expecta/Matchers/EXPMatchers+beNil.h"; sourceTree = ""; }; 1F04D682D92E0B2B40FCE8BE214BDA61 /* EXPMatchers+beGreaterThan.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beGreaterThan.h"; path = "Expecta/Matchers/EXPMatchers+beGreaterThan.h"; sourceTree = ""; }; 1F1DE5E5E11E91062A5DA859EDCE3C49 /* EXPUnsupportedObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPUnsupportedObject.h; path = Expecta/EXPUnsupportedObject.h; sourceTree = ""; }; 1F4C6FD0E96DEE3BA24A38BA86A2EE83 /* EXPMatchers+beKindOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beKindOf.m"; path = "Expecta/Matchers/EXPMatchers+beKindOf.m"; sourceTree = ""; }; 1FD8638DC7137054523DFDCD37576559 /* EXPMatchers+beCloseTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beCloseTo.h"; path = "Expecta/Matchers/EXPMatchers+beCloseTo.h"; sourceTree = ""; }; 2251A125FE1F9EE61891B85AAAE71511 /* EXPMatchers+beNil.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beNil.m"; path = "Expecta/Matchers/EXPMatchers+beNil.m"; sourceTree = ""; }; 228937A58D5E1EF34C595366A42C018E /* EXPMatchers+raiseWithReason.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+raiseWithReason.m"; path = "Expecta/Matchers/EXPMatchers+raiseWithReason.m"; sourceTree = ""; }; 2547652506D61F49D4B0882ED6B64B16 /* EXPMatchers+beFalsy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beFalsy.m"; path = "Expecta/Matchers/EXPMatchers+beFalsy.m"; sourceTree = ""; }; 2A31938A554F154B402756FCBFE7167B /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSArray+MASAdditions.m"; sourceTree = ""; }; 2A7DB9040882B1058689C275628BAD96 /* libExpecta.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libExpecta.a; path = libExpecta.a; sourceTree = BUILT_PRODUCTS_DIR; }; 2B6A8C9B5A40329ADEFB0567ED8489DC /* libMasonry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMasonry.a; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; }; 2B80588779A2286A5E054DE4D0DDC03A /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "View+MASShorthandAdditions.h"; sourceTree = ""; }; 2C5D45C77F469660C6D6155EA159784F /* EXPMatchers+postNotification.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+postNotification.h"; path = "Expecta/Matchers/EXPMatchers+postNotification.h"; sourceTree = ""; }; 2F3869A1E846595FC8A567E9EF91600E /* EXPMatchers+beSupersetOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beSupersetOf.h"; path = "Expecta/Matchers/EXPMatchers+beSupersetOf.h"; sourceTree = ""; }; 34177F23961DA5ABF45170FA2037F8C1 /* EXPMatchers+beginWith.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beginWith.m"; path = "Expecta/Matchers/EXPMatchers+beginWith.m"; sourceTree = ""; }; 358E8501C72A8B4A191589A7570FCC15 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; 3683CAB8F5A6384907767DF9817A4B09 /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "View+MASAdditions.h"; sourceTree = ""; }; 3ABABA36A05ECCDA76F9388C3A7262E8 /* Pods-Masonry iOS Examples-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Masonry iOS Examples-acknowledgements.plist"; sourceTree = ""; }; 3B014C13318B98A27EB6C15EB341678A /* EXPMatchers+beInTheRangeOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beInTheRangeOf.m"; path = "Expecta/Matchers/EXPMatchers+beInTheRangeOf.m"; sourceTree = ""; }; 3D0C38F1CACBCE8726531E82CF48BE6A /* Pods-Masonry iOS Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Masonry iOS Tests-acknowledgements.plist"; sourceTree = ""; }; 40B4963257702BBD9CAF03BECB9D16F0 /* Pods-MasonryTestsLoader-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MasonryTestsLoader-dummy.m"; sourceTree = ""; }; 41073685DCEF4DD54806A297165DB39F /* Pods-MasonryTestsLoader.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MasonryTestsLoader.debug.xcconfig"; sourceTree = ""; }; 44127DD3F6457EEB52F5B0B644C748E5 /* EXPMatchers+contain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+contain.h"; path = "Expecta/Matchers/EXPMatchers+contain.h"; sourceTree = ""; }; 4730731B518BAFE15142AA613F01F2EB /* ExpectaObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ExpectaObject.h; path = Expecta/ExpectaObject.h; sourceTree = ""; }; 481E644C11C98774BE98309BA0A2CB6C /* EXPMatchers+beFalsy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beFalsy.h"; path = "Expecta/Matchers/EXPMatchers+beFalsy.h"; sourceTree = ""; }; 489F09523F5700F4F414FA98E0BDEEE4 /* Expecta.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Expecta.xcconfig; sourceTree = ""; }; 48FB054B1F997F66CA0E17DB3B26223C /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MASConstraint+Private.h"; sourceTree = ""; }; 49E1D663D9B2CCDFFC739982A06D57C5 /* EXPMatchers+beginWith.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beginWith.h"; path = "Expecta/Matchers/EXPMatchers+beginWith.h"; sourceTree = ""; }; 4AF06A246FC5C7C1E779C3BFB883040C /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; 4B6B3284B56CCD1FFA3F49D1751D4763 /* Pods-MasonryTestsLoader-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MasonryTestsLoader-acknowledgements.markdown"; sourceTree = ""; }; 4EEA345137E6F1B86DEC1ECEA04BEBD5 /* EXPFloatTuple.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPFloatTuple.m; path = Expecta/EXPFloatTuple.m; sourceTree = ""; }; 50660A3CB85C3AEC478DB2211E3CD76D /* Expecta.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Expecta.h; path = Expecta/Expecta.h; sourceTree = ""; }; 5478FCE860D549499E9B142210C4E612 /* Pods-Masonry iOS Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Masonry iOS Tests-dummy.m"; sourceTree = ""; }; 55CDC4616612ED7AA50A3E836E82B6BE /* EXPBlockDefinedMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPBlockDefinedMatcher.h; path = Expecta/EXPBlockDefinedMatcher.h; sourceTree = ""; }; 56B7202FE09B3976D80FD78EF63258F6 /* EXPMatchers+beTruthy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beTruthy.m"; path = "Expecta/Matchers/EXPMatchers+beTruthy.m"; sourceTree = ""; }; 57E3007D6F08B4F287C35811E372C9D8 /* EXPBlockDefinedMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPBlockDefinedMatcher.m; path = Expecta/EXPBlockDefinedMatcher.m; sourceTree = ""; }; 58004526F7F7D8C02F9C425D2847EA60 /* Pods-Masonry iOS Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Masonry iOS Tests-resources.sh"; sourceTree = ""; }; 585243F6624B3378D0DA0CF280D9F8EA /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; 590084C07434815AE5BEC2E76CD54154 /* Pods-Masonry iOS Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Masonry iOS Tests.release.xcconfig"; sourceTree = ""; }; 593CB40473F1E441BC65F0044379DA72 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; 59623D6FE7CFF9076F3ACA8D492A0A1E /* EXPMatchers+beGreaterThanOrEqualTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beGreaterThanOrEqualTo.h"; path = "Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h"; sourceTree = ""; }; 5A30D7435201DE311E06A35CEA390581 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ViewController+MASAdditions.m"; sourceTree = ""; }; 5B9D165EC173241B2C9EFF6FDB72491D /* EXPMatchers+beInstanceOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beInstanceOf.h"; path = "Expecta/Matchers/EXPMatchers+beInstanceOf.h"; sourceTree = ""; }; 5C71CEC9EB6A0B127237D9BE7AAB6081 /* EXPMatchers+beInstanceOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beInstanceOf.m"; path = "Expecta/Matchers/EXPMatchers+beInstanceOf.m"; sourceTree = ""; }; 5D2BB147FD43518883D32412C882B443 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASUtilities.h; sourceTree = ""; }; 5EEECBC2AC825C5498273AB762F561EF /* EXPMatchers+endWith.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+endWith.h"; path = "Expecta/Matchers/EXPMatchers+endWith.h"; sourceTree = ""; }; 61A4675B57359AB9653085CE195438A0 /* EXPMatchers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPMatchers.h; path = Expecta/Matchers/EXPMatchers.h; sourceTree = ""; }; 639FB58CFFC214FCCF32C06B0ACC9B5B /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; 63BB2BA348CAEB74A836E775BF8ABE2C /* EXPFloatTuple.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPFloatTuple.h; path = Expecta/EXPFloatTuple.h; sourceTree = ""; }; 663B481626C7E7C19A7A42120FFC0E77 /* EXPMatchers+haveCountOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+haveCountOf.m"; path = "Expecta/Matchers/EXPMatchers+haveCountOf.m"; sourceTree = ""; }; 67872159D235C01079FD18A895BC35BE /* Pods-Masonry iOS Examples-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Masonry iOS Examples-acknowledgements.markdown"; sourceTree = ""; }; 687D54A17077AB5A8B750650CACBF3B3 /* EXPMatchers+beIdenticalTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beIdenticalTo.m"; path = "Expecta/Matchers/EXPMatchers+beIdenticalTo.m"; sourceTree = ""; }; 6CBE98CC00A3DD78FC850D713EB164BE /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASLayoutConstraint.h; sourceTree = ""; }; 6F83FB50741120EF2F5F9723A76C9099 /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ViewController+MASAdditions.h"; sourceTree = ""; }; 7559C19053134AD8CF9C91D122AC2090 /* Pods-Masonry iOS Examples-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Masonry iOS Examples-frameworks.sh"; sourceTree = ""; }; 75992ED787187D30BE4B5F69BEF5EE30 /* EXPMatchers+haveCountOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+haveCountOf.h"; path = "Expecta/Matchers/EXPMatchers+haveCountOf.h"; sourceTree = ""; }; 7735CC4570D0C643EF99240D43284C4A /* EXPExpect.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPExpect.h; path = Expecta/EXPExpect.h; sourceTree = ""; }; 7A54ADC5F5885AE49835C21390D7B42C /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASViewConstraint.m; sourceTree = ""; }; 7B14D8EAF812AD82BC8BA17C3DE5B573 /* EXPMatchers+beLessThanOrEqualTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beLessThanOrEqualTo.m"; path = "Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.m"; sourceTree = ""; }; 7BD870522AC013353A13269A9CDEA664 /* EXPMatcherHelpers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPMatcherHelpers.m; path = Expecta/Matchers/EXPMatcherHelpers.m; sourceTree = ""; }; 7C9A0D7E24E5DCE2B938FC4C4901B353 /* EXPMatchers+beGreaterThanOrEqualTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beGreaterThanOrEqualTo.m"; path = "Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m"; sourceTree = ""; }; 7EBF9BAD2F54920E12BA8D79EB3EE01C /* EXPDoubleTuple.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPDoubleTuple.m; path = Expecta/EXPDoubleTuple.m; sourceTree = ""; }; 7F338BE8E88D6EB9496878863145B7C5 /* EXPDefines.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPDefines.h; path = Expecta/EXPDefines.h; sourceTree = ""; }; 80708E2496B3C69452E559E575CD1D47 /* ExpectaSupport.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ExpectaSupport.h; path = Expecta/ExpectaSupport.h; sourceTree = ""; }; 8140BF73F39AA0E15893403B6B2DCD9D /* EXPMatchers+beLessThan.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beLessThan.h"; path = "Expecta/Matchers/EXPMatchers+beLessThan.h"; sourceTree = ""; }; 82F3CFD18ABD64DD8E88230EE43D854A /* NSValue+Expecta.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSValue+Expecta.h"; path = "Expecta/NSValue+Expecta.h"; sourceTree = ""; }; 8524B32277BDB7E1A36FB5F3EB3BAC6B /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASCompositeConstraint.m; sourceTree = ""; }; 8780C4CC76E68DD8EA97F0E4B3287D64 /* EXPMatchers+equal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+equal.h"; path = "Expecta/Matchers/EXPMatchers+equal.h"; sourceTree = ""; }; 88907F8AEA4C9B20AEB63E2047F54502 /* EXPMatchers+match.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+match.h"; path = "Expecta/Matchers/EXPMatchers+match.h"; sourceTree = ""; }; 8B4562385452B8EF12C3E0EFC2E07D12 /* libPods-Masonry iOS Examples.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-Masonry iOS Examples.a"; path = "libPods-Masonry iOS Examples.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8F3B66464C8F4DC1EDFFEA58A98F9B5C /* EXPMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPMatcher.h; path = Expecta/EXPMatcher.h; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9616A699420336DD8F227A5C41E36432 /* EXPMatchers+respondTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+respondTo.m"; path = "Expecta/Matchers/EXPMatchers+respondTo.m"; sourceTree = ""; }; 98AFDA78C0BA149C8976CF3889419AA7 /* EXPMatchers+beSubclassOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beSubclassOf.m"; path = "Expecta/Matchers/EXPMatchers+beSubclassOf.m"; sourceTree = ""; }; 9D1DE5A0855C3142FCDE4471717B4C92 /* EXPMatchers+raise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+raise.m"; path = "Expecta/Matchers/EXPMatchers+raise.m"; sourceTree = ""; }; 9F34293A1C0AD9FD7013D79B910FE7E5 /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASConstraint.h; sourceTree = ""; }; AD6D89D8C414349AAD70BD448A0EB42D /* Pods-MasonryTestsLoader.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MasonryTestsLoader.release.xcconfig"; sourceTree = ""; }; ADBF0443B4181A4D41268AB9F62AA73C /* NSValue+Expecta.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSValue+Expecta.m"; path = "Expecta/NSValue+Expecta.m"; sourceTree = ""; }; AE58747F7ED5EE1564AC83C82F3C9DEA /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASViewAttribute.h; sourceTree = ""; }; AEDF716CFA2F6ADA12E2C6D67EF8B2D2 /* EXPDoubleTuple.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = EXPDoubleTuple.h; path = Expecta/EXPDoubleTuple.h; sourceTree = ""; }; AEEF83956F9DBD675F4C2EF46B690567 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASConstraint.m; sourceTree = ""; }; B1B09BEB8A5DCEEF709CBA1F5CEE0B3B /* EXPMatchers+beGreaterThan.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beGreaterThan.m"; path = "Expecta/Matchers/EXPMatchers+beGreaterThan.m"; sourceTree = ""; }; B20D7BAA1D4E85394D4C0BCBCB2BF960 /* EXPMatchers+endWith.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+endWith.m"; path = "Expecta/Matchers/EXPMatchers+endWith.m"; sourceTree = ""; }; BB267133DB0AAEF96D19D2085B85E06D /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASViewAttribute.m; sourceTree = ""; }; BF54E13A05CB850F6732BED53C409DF8 /* Pods-Masonry iOS Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Masonry iOS Tests-acknowledgements.markdown"; sourceTree = ""; }; BFE37A3BBF6AEB4B7163AAE1BD655CDD /* EXPMatchers+equal.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+equal.m"; path = "Expecta/Matchers/EXPMatchers+equal.m"; sourceTree = ""; }; C0F0C9DE4D36C0025D1A49B0106644A4 /* NSObject+Expecta.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+Expecta.h"; path = "Expecta/NSObject+Expecta.h"; sourceTree = ""; }; C3EDF7B170EC221838CC2A773B0CDC59 /* EXPMatchers+beCloseTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beCloseTo.m"; path = "Expecta/Matchers/EXPMatchers+beCloseTo.m"; sourceTree = ""; }; C4EC8E6D70CF2CC9E094524A6560BC80 /* libPods-MasonryTestsLoader.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-MasonryTestsLoader.a"; path = "libPods-MasonryTestsLoader.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C565C77B7F3AC98E871994970653A958 /* EXPMatchers+conformTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+conformTo.m"; path = "Expecta/Matchers/EXPMatchers+conformTo.m"; sourceTree = ""; }; C5ABB1C6CB3F9F99597CCF6727731A7B /* Pods-Masonry iOS Examples.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Masonry iOS Examples.debug.xcconfig"; sourceTree = ""; }; C7004C5DD5811F3431B3C72C3ED02D96 /* Pods-MasonryTestsLoader-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MasonryTestsLoader-frameworks.sh"; sourceTree = ""; }; C98931A95CEDDC4098458BEB8FF864ED /* EXPMatchers+beIdenticalTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beIdenticalTo.h"; path = "Expecta/Matchers/EXPMatchers+beIdenticalTo.h"; sourceTree = ""; }; CBEA9FE72B61C2E594B205165A09ECA7 /* EXPExpect.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = EXPExpect.m; path = Expecta/EXPExpect.m; sourceTree = ""; }; CBFE4C2A8558AE9FF24FCA67343113E2 /* EXPMatchers+beSubclassOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beSubclassOf.h"; path = "Expecta/Matchers/EXPMatchers+beSubclassOf.h"; sourceTree = ""; }; D17CA42B2DBD2AB2BBA3CBB7E2205968 /* Masonry.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.xcconfig; sourceTree = ""; }; D242BA4F2D8595007967657C3EBF92CE /* EXPMatchers+respondTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+respondTo.h"; path = "Expecta/Matchers/EXPMatchers+respondTo.h"; sourceTree = ""; }; D50A0454EC2ACA566EC1A84F70DBE96A /* Expecta-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Expecta-dummy.m"; sourceTree = ""; }; D8A10F7BEA143532312B95447C5A5B7C /* ExpectaSupport.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ExpectaSupport.m; path = Expecta/ExpectaSupport.m; sourceTree = ""; }; DB37BB623433F136572448D26D6FB70A /* EXPMatchers+contain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+contain.m"; path = "Expecta/Matchers/EXPMatchers+contain.m"; sourceTree = ""; }; DBCE4AE4A77A457256CB505688569B23 /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASLayoutConstraint.m; sourceTree = ""; }; DD2917440B958D545CC2EE8F2240D37E /* EXPMatchers+beSupersetOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beSupersetOf.m"; path = "Expecta/Matchers/EXPMatchers+beSupersetOf.m"; sourceTree = ""; }; DDF04AEFCC4B011565BFFBFFF52B2FCE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; E1DAB7DBD1812988117194D50ACE07A0 /* EXPMatchers+beKindOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+beKindOf.h"; path = "Expecta/Matchers/EXPMatchers+beKindOf.h"; sourceTree = ""; }; E2824F3F718434AEC2CE23045FEC5541 /* Pods-MasonryTestsLoader-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MasonryTestsLoader-acknowledgements.plist"; sourceTree = ""; }; E2D9897D646E2BB9FBF73704C04440B2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; E36B444420761FDAD709E0D161F812C1 /* EXPMatchers+conformTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "EXPMatchers+conformTo.h"; path = "Expecta/Matchers/EXPMatchers+conformTo.h"; sourceTree = ""; }; E4CFDB3889CFAC5E05497101D3F82C0A /* EXPMatchers+beLessThan.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "EXPMatchers+beLessThan.m"; path = "Expecta/Matchers/EXPMatchers+beLessThan.m"; sourceTree = ""; }; E66C1687519434878576CA9CA479B868 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MASCompositeConstraint.h; sourceTree = ""; }; EB9E853361218FD2866DABF9A3E384D5 /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MASConstraintMaker.m; sourceTree = ""; }; EF1B79566A439B7A68A81F499EBFDDE1 /* Pods-Masonry iOS Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Masonry iOS Tests.debug.xcconfig"; sourceTree = ""; }; FC8A8F10966AF0D4BEF49EBF2CFF4C0C /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = Masonry.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 03F8C9DE4B5918EEA35CE61AA3A1186A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 0E8E7C035F8969CF3DC93E5490A6158B /* Foundation.framework in Frameworks */, F7B20B4187947E3B6B93F0457C239D0B /* XCTest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 583B8AB450D47A22AD844DA398F34FCC /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DBA55CF16CB958E3F3D38079F18EBC06 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 6FD8312A1AEB348F49A81C438DB25115 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( F0B56A7D38A399A2F67F9920C9526A66 /* Foundation.framework in Frameworks */, 6209E20926D79222E59F58B962BFAA1E /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 9E80CE71F73E7DB19033544A8A4E9F55 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( F589CF64CC8ED22D9F37824176FBBB72 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; A3EB68BB62C219069E6DBA1A070D7F3F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( D904A66B88A11E0356D09C38CA20102D /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 0DA9AF80DA7ECA5B4D31C526D9F57DB2 /* Development Pods */ = { isa = PBXGroup; children = ( 18D532DEFE002898478F83CCDCC47B5D /* Masonry */, ); name = "Development Pods"; sourceTree = ""; }; 113776CC3D7FEF15CE1357194041AAFC /* Targets Support Files */ = { isa = PBXGroup; children = ( 523AEFB63B1A95928D17E7547C93E598 /* Pods-Masonry iOS Examples */, 9183704F5C71C360D6CB1A399612D0E0 /* Pods-Masonry iOS Tests */, BD399A650CE28E083F4B32EED754F012 /* Pods-MasonryTestsLoader */, ); name = "Targets Support Files"; sourceTree = ""; }; 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { isa = PBXGroup; children = ( 926C31924772091F3FBE0E8F025C2B0D /* iOS */, ); name = Frameworks; sourceTree = ""; }; 18D532DEFE002898478F83CCDCC47B5D /* Masonry */ = { isa = PBXGroup; children = ( CFF7DF6CE7E3205ECC5D3904C3AC169D /* Masonry */, C4880E6FCE3E79307C7AD19D76754823 /* Support Files */, ); name = Masonry; path = ..; sourceTree = ""; }; 2C212CDC4B22CF51422FF7C8D4BF9E56 /* Pods */ = { isa = PBXGroup; children = ( DA1988695DF0633137E2D7B5035D2CDC /* Expecta */, ); name = Pods; sourceTree = ""; }; 523AEFB63B1A95928D17E7547C93E598 /* Pods-Masonry iOS Examples */ = { isa = PBXGroup; children = ( 67872159D235C01079FD18A895BC35BE /* Pods-Masonry iOS Examples-acknowledgements.markdown */, 3ABABA36A05ECCDA76F9388C3A7262E8 /* Pods-Masonry iOS Examples-acknowledgements.plist */, 0F2DF08BADAA0D595D88E9A5F2F4AE8F /* Pods-Masonry iOS Examples-dummy.m */, 7559C19053134AD8CF9C91D122AC2090 /* Pods-Masonry iOS Examples-frameworks.sh */, 1C13229D7A9FD06FAA259C99FB5A6E11 /* Pods-Masonry iOS Examples-resources.sh */, C5ABB1C6CB3F9F99597CCF6727731A7B /* Pods-Masonry iOS Examples.debug.xcconfig */, 1B998D4CCC665C40E8A45CF07DFD7ABC /* Pods-Masonry iOS Examples.release.xcconfig */, ); name = "Pods-Masonry iOS Examples"; path = "Target Support Files/Pods-Masonry iOS Examples"; sourceTree = ""; }; 6B57A62A4ECEF9976CBA3885013FA6AC /* Products */ = { isa = PBXGroup; children = ( 2A7DB9040882B1058689C275628BAD96 /* libExpecta.a */, 2B6A8C9B5A40329ADEFB0567ED8489DC /* libMasonry.a */, 8B4562385452B8EF12C3E0EFC2E07D12 /* libPods-Masonry iOS Examples.a */, 10A477660D2D97AEF58A6795020511A9 /* libPods-Masonry iOS Tests.a */, C4EC8E6D70CF2CC9E094524A6560BC80 /* libPods-MasonryTestsLoader.a */, ); name = Products; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 0DA9AF80DA7ECA5B4D31C526D9F57DB2 /* Development Pods */, 122DA2E5084A4393C29BE363C764795C /* Frameworks */, 2C212CDC4B22CF51422FF7C8D4BF9E56 /* Pods */, 6B57A62A4ECEF9976CBA3885013FA6AC /* Products */, 113776CC3D7FEF15CE1357194041AAFC /* Targets Support Files */, ); sourceTree = ""; }; 9183704F5C71C360D6CB1A399612D0E0 /* Pods-Masonry iOS Tests */ = { isa = PBXGroup; children = ( BF54E13A05CB850F6732BED53C409DF8 /* Pods-Masonry iOS Tests-acknowledgements.markdown */, 3D0C38F1CACBCE8726531E82CF48BE6A /* Pods-Masonry iOS Tests-acknowledgements.plist */, 5478FCE860D549499E9B142210C4E612 /* Pods-Masonry iOS Tests-dummy.m */, 0341D10523364E42D0E6F9935E3DA6DE /* Pods-Masonry iOS Tests-frameworks.sh */, 58004526F7F7D8C02F9C425D2847EA60 /* Pods-Masonry iOS Tests-resources.sh */, EF1B79566A439B7A68A81F499EBFDDE1 /* Pods-Masonry iOS Tests.debug.xcconfig */, 590084C07434815AE5BEC2E76CD54154 /* Pods-Masonry iOS Tests.release.xcconfig */, ); name = "Pods-Masonry iOS Tests"; path = "Target Support Files/Pods-Masonry iOS Tests"; sourceTree = ""; }; 926C31924772091F3FBE0E8F025C2B0D /* iOS */ = { isa = PBXGroup; children = ( DE147446A1225BA68EA82615B1436CC1 /* Foundation.framework */, DDF04AEFCC4B011565BFFBFFF52B2FCE /* UIKit.framework */, E2D9897D646E2BB9FBF73704C04440B2 /* XCTest.framework */, ); name = iOS; sourceTree = ""; }; BD399A650CE28E083F4B32EED754F012 /* Pods-MasonryTestsLoader */ = { isa = PBXGroup; children = ( 4B6B3284B56CCD1FFA3F49D1751D4763 /* Pods-MasonryTestsLoader-acknowledgements.markdown */, E2824F3F718434AEC2CE23045FEC5541 /* Pods-MasonryTestsLoader-acknowledgements.plist */, 40B4963257702BBD9CAF03BECB9D16F0 /* Pods-MasonryTestsLoader-dummy.m */, C7004C5DD5811F3431B3C72C3ED02D96 /* Pods-MasonryTestsLoader-frameworks.sh */, 0792517CDD83AC956FA10DA378F7C590 /* Pods-MasonryTestsLoader-resources.sh */, 41073685DCEF4DD54806A297165DB39F /* Pods-MasonryTestsLoader.debug.xcconfig */, AD6D89D8C414349AAD70BD448A0EB42D /* Pods-MasonryTestsLoader.release.xcconfig */, ); name = "Pods-MasonryTestsLoader"; path = "Target Support Files/Pods-MasonryTestsLoader"; sourceTree = ""; }; C4880E6FCE3E79307C7AD19D76754823 /* Support Files */ = { isa = PBXGroup; children = ( D17CA42B2DBD2AB2BBA3CBB7E2205968 /* Masonry.xcconfig */, 585243F6624B3378D0DA0CF280D9F8EA /* Masonry-dummy.m */, 639FB58CFFC214FCCF32C06B0ACC9B5B /* Masonry-prefix.pch */, ); name = "Support Files"; path = "Pods/Target Support Files/Masonry"; sourceTree = ""; }; C934D5D64F7FA6AE026CB137FBAD29E5 /* Support Files */ = { isa = PBXGroup; children = ( 489F09523F5700F4F414FA98E0BDEEE4 /* Expecta.xcconfig */, D50A0454EC2ACA566EC1A84F70DBE96A /* Expecta-dummy.m */, 190660A7B90AD2F0323CF9185E32C8D5 /* Expecta-prefix.pch */, ); name = "Support Files"; path = "../Target Support Files/Expecta"; sourceTree = ""; }; CFF7DF6CE7E3205ECC5D3904C3AC169D /* Masonry */ = { isa = PBXGroup; children = ( E66C1687519434878576CA9CA479B868 /* MASCompositeConstraint.h */, 8524B32277BDB7E1A36FB5F3EB3BAC6B /* MASCompositeConstraint.m */, 9F34293A1C0AD9FD7013D79B910FE7E5 /* MASConstraint.h */, AEEF83956F9DBD675F4C2EF46B690567 /* MASConstraint.m */, 48FB054B1F997F66CA0E17DB3B26223C /* MASConstraint+Private.h */, 0A28546AD6B1C73C384E28625120AED5 /* MASConstraintMaker.h */, EB9E853361218FD2866DABF9A3E384D5 /* MASConstraintMaker.m */, 6CBE98CC00A3DD78FC850D713EB164BE /* MASLayoutConstraint.h */, DBCE4AE4A77A457256CB505688569B23 /* MASLayoutConstraint.m */, FC8A8F10966AF0D4BEF49EBF2CFF4C0C /* Masonry.h */, 5D2BB147FD43518883D32412C882B443 /* MASUtilities.h */, AE58747F7ED5EE1564AC83C82F3C9DEA /* MASViewAttribute.h */, BB267133DB0AAEF96D19D2085B85E06D /* MASViewAttribute.m */, 194EE173246D25F2D7ED8C47FAF2ACF4 /* MASViewConstraint.h */, 7A54ADC5F5885AE49835C21390D7B42C /* MASViewConstraint.m */, 01B7B1098F825865196B739BF9E36C04 /* NSArray+MASAdditions.h */, 2A31938A554F154B402756FCBFE7167B /* NSArray+MASAdditions.m */, 593CB40473F1E441BC65F0044379DA72 /* NSArray+MASShorthandAdditions.h */, 4AF06A246FC5C7C1E779C3BFB883040C /* NSLayoutConstraint+MASDebugAdditions.h */, 358E8501C72A8B4A191589A7570FCC15 /* NSLayoutConstraint+MASDebugAdditions.m */, 3683CAB8F5A6384907767DF9817A4B09 /* View+MASAdditions.h */, 02DA3844CF514753E9CC1AE66A762D26 /* View+MASAdditions.m */, 2B80588779A2286A5E054DE4D0DDC03A /* View+MASShorthandAdditions.h */, 6F83FB50741120EF2F5F9723A76C9099 /* ViewController+MASAdditions.h */, 5A30D7435201DE311E06A35CEA390581 /* ViewController+MASAdditions.m */, ); name = Masonry; path = Masonry; sourceTree = ""; }; DA1988695DF0633137E2D7B5035D2CDC /* Expecta */ = { isa = PBXGroup; children = ( 55CDC4616612ED7AA50A3E836E82B6BE /* EXPBlockDefinedMatcher.h */, 57E3007D6F08B4F287C35811E372C9D8 /* EXPBlockDefinedMatcher.m */, 7F338BE8E88D6EB9496878863145B7C5 /* EXPDefines.h */, AEDF716CFA2F6ADA12E2C6D67EF8B2D2 /* EXPDoubleTuple.h */, 7EBF9BAD2F54920E12BA8D79EB3EE01C /* EXPDoubleTuple.m */, 50660A3CB85C3AEC478DB2211E3CD76D /* Expecta.h */, 4730731B518BAFE15142AA613F01F2EB /* ExpectaObject.h */, 1C060BC1E7116BC87FA94B45087D771B /* ExpectaObject.m */, 80708E2496B3C69452E559E575CD1D47 /* ExpectaSupport.h */, D8A10F7BEA143532312B95447C5A5B7C /* ExpectaSupport.m */, 7735CC4570D0C643EF99240D43284C4A /* EXPExpect.h */, CBEA9FE72B61C2E594B205165A09ECA7 /* EXPExpect.m */, 63BB2BA348CAEB74A836E775BF8ABE2C /* EXPFloatTuple.h */, 4EEA345137E6F1B86DEC1ECEA04BEBD5 /* EXPFloatTuple.m */, 8F3B66464C8F4DC1EDFFEA58A98F9B5C /* EXPMatcher.h */, 0A3DE5BA9F1F1BFDC50FA062018A4FF9 /* EXPMatcherHelpers.h */, 7BD870522AC013353A13269A9CDEA664 /* EXPMatcherHelpers.m */, 61A4675B57359AB9653085CE195438A0 /* EXPMatchers.h */, 1FD8638DC7137054523DFDCD37576559 /* EXPMatchers+beCloseTo.h */, C3EDF7B170EC221838CC2A773B0CDC59 /* EXPMatchers+beCloseTo.m */, 481E644C11C98774BE98309BA0A2CB6C /* EXPMatchers+beFalsy.h */, 2547652506D61F49D4B0882ED6B64B16 /* EXPMatchers+beFalsy.m */, 49E1D663D9B2CCDFFC739982A06D57C5 /* EXPMatchers+beginWith.h */, 34177F23961DA5ABF45170FA2037F8C1 /* EXPMatchers+beginWith.m */, 1F04D682D92E0B2B40FCE8BE214BDA61 /* EXPMatchers+beGreaterThan.h */, B1B09BEB8A5DCEEF709CBA1F5CEE0B3B /* EXPMatchers+beGreaterThan.m */, 59623D6FE7CFF9076F3ACA8D492A0A1E /* EXPMatchers+beGreaterThanOrEqualTo.h */, 7C9A0D7E24E5DCE2B938FC4C4901B353 /* EXPMatchers+beGreaterThanOrEqualTo.m */, C98931A95CEDDC4098458BEB8FF864ED /* EXPMatchers+beIdenticalTo.h */, 687D54A17077AB5A8B750650CACBF3B3 /* EXPMatchers+beIdenticalTo.m */, 5B9D165EC173241B2C9EFF6FDB72491D /* EXPMatchers+beInstanceOf.h */, 5C71CEC9EB6A0B127237D9BE7AAB6081 /* EXPMatchers+beInstanceOf.m */, 10904D53FD27FC7E59BF92201687D517 /* EXPMatchers+beInTheRangeOf.h */, 3B014C13318B98A27EB6C15EB341678A /* EXPMatchers+beInTheRangeOf.m */, E1DAB7DBD1812988117194D50ACE07A0 /* EXPMatchers+beKindOf.h */, 1F4C6FD0E96DEE3BA24A38BA86A2EE83 /* EXPMatchers+beKindOf.m */, 8140BF73F39AA0E15893403B6B2DCD9D /* EXPMatchers+beLessThan.h */, E4CFDB3889CFAC5E05497101D3F82C0A /* EXPMatchers+beLessThan.m */, 122F547802BB911D1B9F0D52C33B568D /* EXPMatchers+beLessThanOrEqualTo.h */, 7B14D8EAF812AD82BC8BA17C3DE5B573 /* EXPMatchers+beLessThanOrEqualTo.m */, 1D20E91754698E478D6D3E468D5EC2C8 /* EXPMatchers+beNil.h */, 2251A125FE1F9EE61891B85AAAE71511 /* EXPMatchers+beNil.m */, CBFE4C2A8558AE9FF24FCA67343113E2 /* EXPMatchers+beSubclassOf.h */, 98AFDA78C0BA149C8976CF3889419AA7 /* EXPMatchers+beSubclassOf.m */, 2F3869A1E846595FC8A567E9EF91600E /* EXPMatchers+beSupersetOf.h */, DD2917440B958D545CC2EE8F2240D37E /* EXPMatchers+beSupersetOf.m */, 0AAF8809A7BBA8A694825848A7EF07D2 /* EXPMatchers+beTruthy.h */, 56B7202FE09B3976D80FD78EF63258F6 /* EXPMatchers+beTruthy.m */, E36B444420761FDAD709E0D161F812C1 /* EXPMatchers+conformTo.h */, C565C77B7F3AC98E871994970653A958 /* EXPMatchers+conformTo.m */, 44127DD3F6457EEB52F5B0B644C748E5 /* EXPMatchers+contain.h */, DB37BB623433F136572448D26D6FB70A /* EXPMatchers+contain.m */, 5EEECBC2AC825C5498273AB762F561EF /* EXPMatchers+endWith.h */, B20D7BAA1D4E85394D4C0BCBCB2BF960 /* EXPMatchers+endWith.m */, 8780C4CC76E68DD8EA97F0E4B3287D64 /* EXPMatchers+equal.h */, BFE37A3BBF6AEB4B7163AAE1BD655CDD /* EXPMatchers+equal.m */, 75992ED787187D30BE4B5F69BEF5EE30 /* EXPMatchers+haveCountOf.h */, 663B481626C7E7C19A7A42120FFC0E77 /* EXPMatchers+haveCountOf.m */, 88907F8AEA4C9B20AEB63E2047F54502 /* EXPMatchers+match.h */, 10F25824C22E66EAFBAA5C0F62629D84 /* EXPMatchers+match.m */, 2C5D45C77F469660C6D6155EA159784F /* EXPMatchers+postNotification.h */, 065A35D6EF149C4D848B49BAA59DAE1E /* EXPMatchers+postNotification.m */, 10F0627165FE862DA384F755B45FD6A7 /* EXPMatchers+raise.h */, 9D1DE5A0855C3142FCDE4471717B4C92 /* EXPMatchers+raise.m */, 13852BA59629381181212D4693F5CEC8 /* EXPMatchers+raiseWithReason.h */, 228937A58D5E1EF34C595366A42C018E /* EXPMatchers+raiseWithReason.m */, D242BA4F2D8595007967657C3EBF92CE /* EXPMatchers+respondTo.h */, 9616A699420336DD8F227A5C41E36432 /* EXPMatchers+respondTo.m */, 1F1DE5E5E11E91062A5DA859EDCE3C49 /* EXPUnsupportedObject.h */, 035F256E7A521234689F67B3EC887567 /* EXPUnsupportedObject.m */, C0F0C9DE4D36C0025D1A49B0106644A4 /* NSObject+Expecta.h */, 82F3CFD18ABD64DD8E88230EE43D854A /* NSValue+Expecta.h */, ADBF0443B4181A4D41268AB9F62AA73C /* NSValue+Expecta.m */, C934D5D64F7FA6AE026CB137FBAD29E5 /* Support Files */, ); name = Expecta; path = Expecta; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 05E58D356A38DD487823D5BE24334920 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 0B3330DD885757A45805E83A69E7AFFD /* EXPBlockDefinedMatcher.h in Headers */, EFCF1E2468BC28069F92B4702B5DD463 /* EXPDefines.h in Headers */, EE5A8DD4F03A890084772DA66DE9BE93 /* EXPDoubleTuple.h in Headers */, 0CD876A643FA00F42565F0B4CFE5C360 /* Expecta.h in Headers */, B72D6F9CD6DCCF9339A269BC0CABA88C /* ExpectaObject.h in Headers */, 660BEA8AC93BC6DF29A73D1570C10120 /* ExpectaSupport.h in Headers */, 31D27BF6DE823F040465EEC46431E22E /* EXPExpect.h in Headers */, F3D6C90DF502E4B6BFA4B4B950FB176B /* EXPFloatTuple.h in Headers */, 7C4FFAF7E7BD72B4775C2966898B3A83 /* EXPMatcher.h in Headers */, C64C4032827660F5ED12E425857BE673 /* EXPMatcherHelpers.h in Headers */, 47E018E82EA7801C93BE8D632FBAA3EC /* EXPMatchers+beCloseTo.h in Headers */, 61E89F8C6D2C5658ECADCC9BE04E4E0F /* EXPMatchers+beFalsy.h in Headers */, 5EB8C17604A5FCA7B0F9174850D0441F /* EXPMatchers+beginWith.h in Headers */, B1964DABF421B8BA6BB9AB9E1CC0E387 /* EXPMatchers+beGreaterThan.h in Headers */, BB0E62892680D990AC167E4629F95062 /* EXPMatchers+beGreaterThanOrEqualTo.h in Headers */, 7100640F169A4EC93CA15F0D8B5AFE8F /* EXPMatchers+beIdenticalTo.h in Headers */, DFFE7035A8177E14B29DE53973AE3B1E /* EXPMatchers+beInstanceOf.h in Headers */, 94C94F986312F61D076591DBCEC07104 /* EXPMatchers+beInTheRangeOf.h in Headers */, 8994485FB1398BF225377D4C109CA38B /* EXPMatchers+beKindOf.h in Headers */, BAA98BF425D78B9F9FB405680EA0CB3D /* EXPMatchers+beLessThan.h in Headers */, B1820A5E15F22942E386756A0473E808 /* EXPMatchers+beLessThanOrEqualTo.h in Headers */, 19CDE56AC4388C284D9A394F64E0530C /* EXPMatchers+beNil.h in Headers */, 4C2D57EF131B9A1AA1A65F36DA717BC7 /* EXPMatchers+beSubclassOf.h in Headers */, 76FFE0A5253E08250D976CAE912B89D9 /* EXPMatchers+beSupersetOf.h in Headers */, A193FB77C3606DE847937B79BD869F26 /* EXPMatchers+beTruthy.h in Headers */, 87C087B7F1B93C2DD0B42A93B3E9D9C4 /* EXPMatchers+conformTo.h in Headers */, D3B4D194BECF709DFA85E588891B885E /* EXPMatchers+contain.h in Headers */, 4FE0FA38EA4BC9922DB982A2FB4B504A /* EXPMatchers+endWith.h in Headers */, 4B76A75E1FA371E7EF6C821CD52514A1 /* EXPMatchers+equal.h in Headers */, 11B98D7660EAD3B22A6F8DAFAC8E96F8 /* EXPMatchers+haveCountOf.h in Headers */, 62A200B73B76F6740A3EEA168FBFFF41 /* EXPMatchers+match.h in Headers */, B241CF27E6B9D2DBC3236BDC1BDA5B69 /* EXPMatchers+postNotification.h in Headers */, 119C10C9E57E10B254B8B13A06D332F4 /* EXPMatchers+raise.h in Headers */, 4E89738B989CA5A6018187E52FE0E216 /* EXPMatchers+raiseWithReason.h in Headers */, 7A50398D1D6F1D22165ECAA192F9D1CF /* EXPMatchers+respondTo.h in Headers */, 12ADCD5E7598997A3486E62E784DB241 /* EXPMatchers.h in Headers */, B7FB8C30C577D624F5E0B1FDB3E6CD8B /* EXPUnsupportedObject.h in Headers */, 69DCF5F3A96B49720B728BA6EF5E095A /* NSObject+Expecta.h in Headers */, 120A345233C900C50BAD6F3950FAB8FA /* NSValue+Expecta.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 7B091D57BCA2DBE1E64B837A161E9E23 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 76A58C6131A1264FDE3DADAEA0AC83F5 /* MASCompositeConstraint.h in Headers */, 3E2C9C19590011C8FE1F3966F4AF52D5 /* MASConstraint+Private.h in Headers */, 9F196561D7369053FA6D9FD4374E85B9 /* MASConstraint.h in Headers */, 0F7BD72B0882E4D4DD27C3B914EC3857 /* MASConstraintMaker.h in Headers */, AEEF0434A83EF5F1949252A8409F71DD /* MASLayoutConstraint.h in Headers */, D69C7F6B7677C82AABBF7FE0057CE931 /* Masonry.h in Headers */, 28DD12DAF70F49B558112AA5E2809F19 /* MASUtilities.h in Headers */, 42FA711D0BA099127544F7A978075C9D /* MASViewAttribute.h in Headers */, 0D4B6D7C17953EF6C0BEFADA699DA6D2 /* MASViewConstraint.h in Headers */, 2C8FBF03AD0FD40587A84D2994D758B4 /* NSArray+MASAdditions.h in Headers */, 3AB6F716B6B591E90D2E2CB1434B55BB /* NSArray+MASShorthandAdditions.h in Headers */, 067B3CDE5AAD4D941172A17C9EEA5916 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, AFD341AE846EE3D48F3832FB858FD31C /* View+MASAdditions.h in Headers */, 4F51EE6366844B6C34DD13F77D9A76CA /* View+MASShorthandAdditions.h in Headers */, 38B02E0B37B1F0225FBE396BD51461D9 /* ViewController+MASAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 46D68D26DCAAC4D999D549BA45F0B0EC /* Expecta */ = { isa = PBXNativeTarget; buildConfigurationList = D88EDEBF3855FDEF25FC2B2C9BC585A7 /* Build configuration list for PBXNativeTarget "Expecta" */; buildPhases = ( 5A1715485AF02533C3EE06033E9DA73F /* Sources */, 03F8C9DE4B5918EEA35CE61AA3A1186A /* Frameworks */, 05E58D356A38DD487823D5BE24334920 /* Headers */, ); buildRules = ( ); dependencies = ( ); name = Expecta; productName = Expecta; productReference = 2A7DB9040882B1058689C275628BAD96 /* libExpecta.a */; productType = "com.apple.product-type.library.static"; }; 9DC8D9E02903E93BD0B2FEC9D846EA20 /* Masonry */ = { isa = PBXNativeTarget; buildConfigurationList = 34CAE1CB89EDBF2E53735CC5D4E5E69F /* Build configuration list for PBXNativeTarget "Masonry" */; buildPhases = ( B23F63142B50E8F550DD2612D6EC304E /* Sources */, 6FD8312A1AEB348F49A81C438DB25115 /* Frameworks */, 7B091D57BCA2DBE1E64B837A161E9E23 /* Headers */, ); buildRules = ( ); dependencies = ( ); name = Masonry; productName = Masonry; productReference = 2B6A8C9B5A40329ADEFB0567ED8489DC /* libMasonry.a */; productType = "com.apple.product-type.library.static"; }; B179403FF6D25C7B7A20B6BC7BB7D496 /* Pods-MasonryTestsLoader */ = { isa = PBXNativeTarget; buildConfigurationList = 84EA7C388F7334394620E2B60F337AF0 /* Build configuration list for PBXNativeTarget "Pods-MasonryTestsLoader" */; buildPhases = ( DFE87F186448CBCB3F82C8AF4CFC35FA /* Sources */, 583B8AB450D47A22AD844DA398F34FCC /* Frameworks */, 0298D5A9AEDE52C4B23B10839B5B4F22 /* Export Environment Vars */, ); buildRules = ( ); dependencies = ( C2B6764EE104DB246A756A4DFE11B8D7 /* PBXTargetDependency */, ); name = "Pods-MasonryTestsLoader"; productName = "Pods-MasonryTestsLoader"; productReference = C4EC8E6D70CF2CC9E094524A6560BC80 /* libPods-MasonryTestsLoader.a */; productType = "com.apple.product-type.library.static"; }; ED9816227181DEA06E7E727FF25B471D /* Pods-Masonry iOS Examples */ = { isa = PBXNativeTarget; buildConfigurationList = 315B20EF5C9788CF371A2375E2025660 /* Build configuration list for PBXNativeTarget "Pods-Masonry iOS Examples" */; buildPhases = ( 2AC3450D42E3A3D2F5901AE7C9035C9E /* Sources */, A3EB68BB62C219069E6DBA1A070D7F3F /* Frameworks */, ); buildRules = ( ); dependencies = ( 3D91A82FDB882886527EEF10899EA5B6 /* PBXTargetDependency */, ); name = "Pods-Masonry iOS Examples"; productName = "Pods-Masonry iOS Examples"; productReference = 8B4562385452B8EF12C3E0EFC2E07D12 /* libPods-Masonry iOS Examples.a */; productType = "com.apple.product-type.library.static"; }; F851684D769DB63C33469D937E0F9C64 /* Pods-Masonry iOS Tests */ = { isa = PBXNativeTarget; buildConfigurationList = 403F400D236646D1D85497936B6572D1 /* Build configuration list for PBXNativeTarget "Pods-Masonry iOS Tests" */; buildPhases = ( D74BBCF7C15B95FA4A31681E55A0FE05 /* Sources */, 9E80CE71F73E7DB19033544A8A4E9F55 /* Frameworks */, ); buildRules = ( ); dependencies = ( 91F718810BB49C6036F14791DC0B796B /* PBXTargetDependency */, ); name = "Pods-Masonry iOS Tests"; productName = "Pods-Masonry iOS Tests"; productReference = 10A477660D2D97AEF58A6795020511A9 /* libPods-Masonry iOS Tests.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; productRefGroup = 6B57A62A4ECEF9976CBA3885013FA6AC /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 46D68D26DCAAC4D999D549BA45F0B0EC /* Expecta */, 9DC8D9E02903E93BD0B2FEC9D846EA20 /* Masonry */, ED9816227181DEA06E7E727FF25B471D /* Pods-Masonry iOS Examples */, F851684D769DB63C33469D937E0F9C64 /* Pods-Masonry iOS Tests */, B179403FF6D25C7B7A20B6BC7BB7D496 /* Pods-MasonryTestsLoader */, ); }; /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ 0298D5A9AEDE52C4B23B10839B5B4F22 /* Export Environment Vars */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Export Environment Vars"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > $SRCROOT/../script/env.sh"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 2AC3450D42E3A3D2F5901AE7C9035C9E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 6DA9AB53FE1CA890DF5FB0468FA0F476 /* Pods-Masonry iOS Examples-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 5A1715485AF02533C3EE06033E9DA73F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CC995F4F36E9D6237AFC6F729364B867 /* EXPBlockDefinedMatcher.m in Sources */, 045E77138594FCD0492D74EE7C22AC90 /* EXPDoubleTuple.m in Sources */, E95DE019212836608A35BF3270AADF17 /* Expecta-dummy.m in Sources */, A904D2D6242F68CC3B959E2B0FC8B4F9 /* ExpectaObject.m in Sources */, C091203A57422574B3263D1E9BA53A87 /* ExpectaSupport.m in Sources */, 1C74D210067A2D584AA672E61F246ECC /* EXPExpect.m in Sources */, 643DE0287F1066D083368EAC928DF078 /* EXPFloatTuple.m in Sources */, 63CDCCAC82CBC33021220531D93213A2 /* EXPMatcherHelpers.m in Sources */, 4943F7D828D56A874ACCA7AC312F863B /* EXPMatchers+beCloseTo.m in Sources */, C498F24E736A80A0F6C440DBC33AF494 /* EXPMatchers+beFalsy.m in Sources */, C670343470EAC260E60ABD463CC39E2D /* EXPMatchers+beginWith.m in Sources */, 2C944499E3BB44E17E10959A76BBAEA3 /* EXPMatchers+beGreaterThan.m in Sources */, CDA268F5B643324DD61A0E25BD4179ED /* EXPMatchers+beGreaterThanOrEqualTo.m in Sources */, B709C0890B67EB6C1AB9B9738CDBEEC6 /* EXPMatchers+beIdenticalTo.m in Sources */, B2880B5D7D91AACFCEF345934CFEBA55 /* EXPMatchers+beInstanceOf.m in Sources */, 28BC58EE3C7374C4C2DEF6D029011C84 /* EXPMatchers+beInTheRangeOf.m in Sources */, 885C2534832AF6B1DFA98FA19C4D9994 /* EXPMatchers+beKindOf.m in Sources */, A12B39559E464A1089E4389274973616 /* EXPMatchers+beLessThan.m in Sources */, 2523657BEE249A532CDFD495AC911F39 /* EXPMatchers+beLessThanOrEqualTo.m in Sources */, 0435080233FFD861A266AB43BE3279D3 /* EXPMatchers+beNil.m in Sources */, 71FBC2F8907E29EB767026E6A08F7EEF /* EXPMatchers+beSubclassOf.m in Sources */, 391226D83570CA724B533A2C609A5EF5 /* EXPMatchers+beSupersetOf.m in Sources */, 1E2343F7AE04C5D386CCD455E84F13E0 /* EXPMatchers+beTruthy.m in Sources */, 58E38027B0A4F6CA7BE54F0AE8D4885B /* EXPMatchers+conformTo.m in Sources */, FE84239BE923F217FD38E45B4F770EFD /* EXPMatchers+contain.m in Sources */, F8E39087737225714939DB0252FB1114 /* EXPMatchers+endWith.m in Sources */, 863C5CC8F4698A0C85AB53C9B072D889 /* EXPMatchers+equal.m in Sources */, 24FF4A3B66A2F383BA14790790108406 /* EXPMatchers+haveCountOf.m in Sources */, 0FE4C580D709657792E5661E74F171D5 /* EXPMatchers+match.m in Sources */, D94F3CDE976C052BF0BD112E257A7F19 /* EXPMatchers+postNotification.m in Sources */, A5CB8C92268FCAC7B00F12EE55B43338 /* EXPMatchers+raise.m in Sources */, 1D622FBC8A4262E6B398F5CCCB1D9650 /* EXPMatchers+raiseWithReason.m in Sources */, 5D50DA13C7A8B2AF549AA4F05E69F9F4 /* EXPMatchers+respondTo.m in Sources */, ED087996824EE3256B222E3BAEBAB14D /* EXPUnsupportedObject.m in Sources */, 4EB308BF802E6F21BABDA8B8718CC7AB /* NSValue+Expecta.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; B23F63142B50E8F550DD2612D6EC304E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E220D02AE7833F8B9202B0304FFBB644 /* MASCompositeConstraint.m in Sources */, 2D814705CE041C701138BD9147CB21AA /* MASConstraint.m in Sources */, EBFA48D334098E6BAB801E6FB8F756C0 /* MASConstraintMaker.m in Sources */, 1AF47B7901796231A318934C2F0DDC04 /* MASLayoutConstraint.m in Sources */, B66BCA2DD1043A4356B5286F346F8049 /* Masonry-dummy.m in Sources */, A8A60B0CEECC7D7C9D8CA6B2DC811C64 /* MASViewAttribute.m in Sources */, 07B309A8727E5DBE05DB1F644F7B8D8A /* MASViewConstraint.m in Sources */, E846C94664199B4B993866C557EEC20D /* NSArray+MASAdditions.m in Sources */, 80408C0CF9D13D89E500446267DD0041 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, 409B7E241957B5C0ADFA4DEA82CDA7AB /* View+MASAdditions.m in Sources */, D2BD7E6904BDD20074AB5A8B04400EB2 /* ViewController+MASAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; D74BBCF7C15B95FA4A31681E55A0FE05 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1F002B6CD1662BADA6556D76FFFE0B96 /* Pods-Masonry iOS Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; DFE87F186448CBCB3F82C8AF4CFC35FA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( AC80F28E4B250E6535484F5269566FF0 /* Pods-MasonryTestsLoader-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 3D91A82FDB882886527EEF10899EA5B6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Masonry; target = 9DC8D9E02903E93BD0B2FEC9D846EA20 /* Masonry */; targetProxy = AA5F0BBF6F9F116C791133368DE92755 /* PBXContainerItemProxy */; }; 91F718810BB49C6036F14791DC0B796B /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Expecta; target = 46D68D26DCAAC4D999D549BA45F0B0EC /* Expecta */; targetProxy = 3A31C048AC5B5E5AB145E49BF610B911 /* PBXContainerItemProxy */; }; C2B6764EE104DB246A756A4DFE11B8D7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Masonry; target = 9DC8D9E02903E93BD0B2FEC9D846EA20 /* Masonry */; targetProxy = 5E51BB7C485C3BB1001A7E9EF94414CF /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 06C735D53481C37742C3736F2A7D5661 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 489F09523F5700F4F414FA98E0BDEEE4 /* Expecta.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Expecta/Expecta-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; }; name = Debug; }; 0D04C9824688FBC954D824C0404A3E00 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = AD6D89D8C414349AAD70BD448A0EB42D /* Pods-MasonryTestsLoader.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; 1C7D17A37D091C98D2F0DD886C3A9320 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; name = Release; }; 3640836F61E86EC291C35C10A0C6C895 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = D17CA42B2DBD2AB2BBA3CBB7E2205968 /* Masonry.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; }; name = Release; }; 4563D8BBE880D823F6BD5DDF706D753C /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 489F09523F5700F4F414FA98E0BDEEE4 /* Expecta.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Expecta/Expecta-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; }; name = Release; }; 8B6F0C8DE4F0C3C276DE0869916A9854 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D17CA42B2DBD2AB2BBA3CBB7E2205968 /* Masonry.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; }; name = Debug; }; BEFC70E6C48ED31E2194921A7560D273 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 1B998D4CCC665C40E8A45CF07DFD7ABC /* Pods-Masonry iOS Examples.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; DA2C49C7DD25DEB1B2FD7E82FE00F85A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = EF1B79566A439B7A68A81F499EBFDDE1 /* Pods-Masonry iOS Tests.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; }; E0ED321AE074A8803A400A79BF0B2A54 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 41073685DCEF4DD54806A297165DB39F /* Pods-MasonryTestsLoader.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; }; E7BA51E64E8E497287675229455FF9BE /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 590084C07434815AE5BEC2E76CD54154 /* Pods-Masonry iOS Tests.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; FE787B4338C5C609AA6C2113045B53EB /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = C5ABB1C6CB3F9F99597CCF6727731A7B /* Pods-Masonry iOS Examples.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( 1C7D17A37D091C98D2F0DD886C3A9320 /* Debug */, 34FE9531DA9AF2820790339988D5FF41 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 315B20EF5C9788CF371A2375E2025660 /* Build configuration list for PBXNativeTarget "Pods-Masonry iOS Examples" */ = { isa = XCConfigurationList; buildConfigurations = ( FE787B4338C5C609AA6C2113045B53EB /* Debug */, BEFC70E6C48ED31E2194921A7560D273 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 34CAE1CB89EDBF2E53735CC5D4E5E69F /* Build configuration list for PBXNativeTarget "Masonry" */ = { isa = XCConfigurationList; buildConfigurations = ( 8B6F0C8DE4F0C3C276DE0869916A9854 /* Debug */, 3640836F61E86EC291C35C10A0C6C895 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 403F400D236646D1D85497936B6572D1 /* Build configuration list for PBXNativeTarget "Pods-Masonry iOS Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( DA2C49C7DD25DEB1B2FD7E82FE00F85A /* Debug */, E7BA51E64E8E497287675229455FF9BE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 84EA7C388F7334394620E2B60F337AF0 /* Build configuration list for PBXNativeTarget "Pods-MasonryTestsLoader" */ = { isa = XCConfigurationList; buildConfigurations = ( E0ED321AE074A8803A400A79BF0B2A54 /* Debug */, 0D04C9824688FBC954D824C0404A3E00 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; D88EDEBF3855FDEF25FC2B2C9BC585A7 /* Build configuration list for PBXNativeTarget "Expecta" */ = { isa = XCConfigurationList; buildConfigurations = ( 06C735D53481C37742C3736F2A7D5661 /* Debug */, 4563D8BBE880D823F6BD5DDF706D753C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; } ================================================ FILE: Pods/Target Support Files/Expecta/Expecta-dummy.m ================================================ #import @interface PodsDummy_Expecta : NSObject @end @implementation PodsDummy_Expecta @end ================================================ FILE: Pods/Target Support Files/Expecta/Expecta-prefix.pch ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ================================================ FILE: Pods/Target Support Files/Expecta/Expecta.xcconfig ================================================ CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Expecta ENABLE_BITCODE = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = -framework "Foundation" -framework "XCTest" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES ================================================ FILE: Pods/Target Support Files/Masonry/Masonry-dummy.m ================================================ #import @interface PodsDummy_Masonry : NSObject @end @implementation PodsDummy_Masonry @end ================================================ FILE: Pods/Target Support Files/Masonry/Masonry-prefix.pch ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ================================================ FILE: Pods/Target Support Files/Masonry/Masonry.xcconfig ================================================ CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/.. PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## Masonry Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - https://cocoapods.org ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License MIT Title Masonry Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-dummy.m ================================================ #import @interface PodsDummy_Pods_Masonry_iOS_Examples : NSObject @end @implementation PodsDummy_Pods_Masonry_iOS_Examples @end ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-frameworks.sh ================================================ #!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # use filter instead of exclude so missing patterns dont' throw errors echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Copies the dSYM of a vendored framework install_dsym() { local source="$1" if [ -r "$source" ]; then echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" fi } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" # Get architectures for current file archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi } if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples-resources.sh ================================================ #!/bin/sh set -e mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" XCASSET_FILES=() case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; 1) TARGET_DEVICE_ARGS="--target-device iphone" ;; 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; 3) TARGET_DEVICE_ARGS="--target-device tv" ;; 4) TARGET_DEVICE_ARGS="--target-device watch" ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; esac install_resource() { if [[ "$1" = /* ]] ; then RESOURCE_PATH="$1" else RESOURCE_PATH="${PODS_ROOT}/$1" fi if [[ ! -e "$RESOURCE_PATH" ]] ; then cat << EOM error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. EOM exit 1 fi case $RESOURCE_PATH in *.storyboard) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true rsync --delete -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac } mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi rm -f "$RESOURCES_TO_COPY" if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) while read line; do if [[ $line != "${PODS_ROOT}*" ]]; then XCASSET_FILES+=("$line") fi done <<<"$OTHER_XCASSETS" printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples.debug.xcconfig ================================================ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Examples/Pods-Masonry iOS Examples.release.xcconfig ================================================ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## Expecta Copyright (c) 2011-2015 Specta Team - https://github.com/specta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - https://cocoapods.org ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Copyright (c) 2011-2015 Specta Team - https://github.com/specta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License MIT Title Expecta Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-dummy.m ================================================ #import @interface PodsDummy_Pods_Masonry_iOS_Tests : NSObject @end @implementation PodsDummy_Pods_Masonry_iOS_Tests @end ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-frameworks.sh ================================================ #!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # use filter instead of exclude so missing patterns dont' throw errors echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Copies the dSYM of a vendored framework install_dsym() { local source="$1" if [ -r "$source" ]; then echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" fi } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" # Get architectures for current file archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi } if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-resources.sh ================================================ #!/bin/sh set -e mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" XCASSET_FILES=() case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; 1) TARGET_DEVICE_ARGS="--target-device iphone" ;; 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; 3) TARGET_DEVICE_ARGS="--target-device tv" ;; 4) TARGET_DEVICE_ARGS="--target-device watch" ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; esac install_resource() { if [[ "$1" = /* ]] ; then RESOURCE_PATH="$1" else RESOURCE_PATH="${PODS_ROOT}/$1" fi if [[ ! -e "$RESOURCE_PATH" ]] ; then cat << EOM error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. EOM exit 1 fi case $RESOURCE_PATH in *.storyboard) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true rsync --delete -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac } mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi rm -f "$RESOURCES_TO_COPY" if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) while read line; do if [[ $line != "${PODS_ROOT}*" ]]; then XCASSET_FILES+=("$line") fi done <<<"$OTHER_XCASSETS" printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests.debug.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -framework "Foundation" -framework "XCTest" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests.release.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -framework "Foundation" -framework "XCTest" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## Masonry Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - https://cocoapods.org ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License MIT Title Masonry Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-dummy.m ================================================ #import @interface PodsDummy_Pods_MasonryTestsLoader : NSObject @end @implementation PodsDummy_Pods_MasonryTestsLoader @end ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-frameworks.sh ================================================ #!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # use filter instead of exclude so missing patterns dont' throw errors echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Copies the dSYM of a vendored framework install_dsym() { local source="$1" if [ -r "$source" ]; then echo "rsync --delete -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" fi } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" # Get architectures for current file archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi } if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-resources.sh ================================================ #!/bin/sh set -e mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" XCASSET_FILES=() case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; 1) TARGET_DEVICE_ARGS="--target-device iphone" ;; 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; 3) TARGET_DEVICE_ARGS="--target-device tv" ;; 4) TARGET_DEVICE_ARGS="--target-device watch" ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; esac install_resource() { if [[ "$1" = /* ]] ; then RESOURCE_PATH="$1" else RESOURCE_PATH="${PODS_ROOT}/$1" fi if [[ ! -e "$RESOURCE_PATH" ]] ; then cat << EOM error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. EOM exit 1 fi case $RESOURCE_PATH in *.storyboard) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true rsync --delete -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac } mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync --delete -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi rm -f "$RESOURCES_TO_COPY" if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) while read line; do if [[ $line != "${PODS_ROOT}*" ]]; then XCASSET_FILES+=("$line") fi done <<<"$OTHER_XCASSETS" printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader.debug.xcconfig ================================================ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader.release.xcconfig ================================================ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Masonry" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" -isystem "${PODS_ROOT}/Headers/Public/Masonry" OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/.. PODS_ROOT = ${SRCROOT}/../Pods ================================================ FILE: README.md ================================================ # Masonry [![Build Status](https://travis-ci.org/SnapKit/Masonry.svg?branch=master)](https://travis-ci.org/SnapKit/Masonry) [![Coverage Status](https://img.shields.io/coveralls/SnapKit/Masonry.svg?style=flat-square)](https://coveralls.io/r/SnapKit/Masonry) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Pod Version](https://img.shields.io/cocoapods/v/Masonry.svg?style=flat) **Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Masonry supports iOS and Mac OS X. For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading. ## What's wrong with NSLayoutConstraints? Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive. Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side ```obj-c UIView *superview = self.view; UIView *view1 = [[UIView alloc] init]; view1.translatesAutoresizingMaskIntoConstraints = NO; view1.backgroundColor = [UIColor greenColor]; [superview addSubview:view1]; UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [superview addConstraints:@[ //view1 constraints [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeTop multiplier:1.0 constant:padding.top], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeLeft multiplier:1.0 constant:padding.left], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-padding.bottom], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeRight multiplier:1 constant:-padding.right], ]]; ``` Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views. Another option is to use Visual Format Language (VFL), which is a bit less long winded. However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array. ## Prepare to meet your Maker! Heres the same constraints created using MASConstraintMaker ```obj-c UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler make.left.equalTo(superview.mas_left).with.offset(padding.left); make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom); make.right.equalTo(superview.mas_right).with.offset(-padding.right); }]; ``` Or even shorter ```obj-c [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(superview).with.insets(padding); }]; ``` Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`. Masonry however will automagically add constraints to the appropriate view. Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you. ## Not all things are created equal > `.equalTo` equivalent to **NSLayoutRelationEqual** > `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual** > `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual** These three equality constraints accept one argument which can be any of the following: #### 1. MASViewAttribute ```obj-c make.centerX.lessThanOrEqualTo(view2.mas_left); ``` MASViewAttribute | NSLayoutAttribute ------------------------- | -------------------------- view.mas_left | NSLayoutAttributeLeft view.mas_right | NSLayoutAttributeRight view.mas_top | NSLayoutAttributeTop view.mas_bottom | NSLayoutAttributeBottom view.mas_leading | NSLayoutAttributeLeading view.mas_trailing | NSLayoutAttributeTrailing view.mas_width | NSLayoutAttributeWidth view.mas_height | NSLayoutAttributeHeight view.mas_centerX | NSLayoutAttributeCenterX view.mas_centerY | NSLayoutAttributeCenterY view.mas_baseline | NSLayoutAttributeBaseline #### 2. UIView/NSView if you want view.left to be greater than or equal to label.left : ```obj-c //these two constraints are exactly the same make.left.greaterThanOrEqualTo(label); make.left.greaterThanOrEqualTo(label.mas_left); ``` #### 3. NSNumber Auto Layout allows width and height to be set to constant values. if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks: ```obj-c //width >= 200 && width <= 400 make.width.greaterThanOrEqualTo(@200); make.width.lessThanOrEqualTo(@400) ``` However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values. So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view’s superview ie: ```obj-c //creates view.left = view.superview.left + 10 make.left.lessThanOrEqualTo(@10) ``` Instead of using NSNumber, you can use primitives and structs to build your constraints, like so: ```obj-c make.top.mas_equalTo(42); make.height.mas_equalTo(20); make.size.mas_equalTo(CGSizeMake(50, 100)); make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0)); make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0)); ``` By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry. #### 4. NSArray An array of a mixture of any of the previous types ```obj-c make.height.equalTo(@[view1.mas_height, view2.mas_height]); make.height.equalTo(@[view1, view2]); make.left.equalTo(@[view1, @100, view3.right]); ```` ## Learn to prioritize > `.priority` allows you to specify an exact priority > `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh** > `.priorityMedium` is half way between high and low > `.priorityLow` equivalent to **UILayoutPriorityDefaultLow** Priorities are can be tacked on to the end of a constraint chain like so: ```obj-c make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow(); make.top.equalTo(label.mas_top).with.priority(600); ``` ## Composition, composition, composition Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints #### edges ```obj-c // make top, left, bottom, right equal view2 make.edges.equalTo(view2); // make top = superview.top + 5, left = superview.left + 10, // bottom = superview.bottom - 15, right = superview.right - 20 make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20)) ``` #### size ```obj-c // make width and height greater than or equal to titleLabel make.size.greaterThanOrEqualTo(titleLabel) // make width = superview.width + 100, height = superview.height - 50 make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50)) ``` #### center ```obj-c // make centerX and centerY = button1 make.center.equalTo(button1) // make centerX = superview.centerX - 5, centerY = superview.centerY + 10 make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10)) ``` You can chain view attributes for increased readability: ```obj-c // All edges but the top should equal those of the superview make.left.right.and.bottom.equalTo(superview); make.top.equalTo(otherView); ``` ## Hold on for dear life Sometimes you need modify existing constraints in order to animate or remove/replace constraints. In Masonry there are a few different approaches to updating constraints. #### 1. References You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property. You could also reference multiple constraints by storing them away in an array. ```obj-c // in public/private interface @property (nonatomic, strong) MASConstraint *topConstraint; ... // when making constraints [view1 mas_makeConstraints:^(MASConstraintMaker *make) { self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top); make.left.equalTo(superview.mas_left).with.offset(padding.left); }]; ... // then later you can call [self.topConstraint uninstall]; ``` #### 2. mas_updateConstraints Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints` ```obj-c // this is Apple's recommended place for adding/updating constraints // this method can get called multiple times in response to setNeedsUpdateConstraints // which can be called by UIKit internally or in your code if you need to trigger an update to your constraints - (void)updateConstraints { [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self); make.width.equalTo(@(self.buttonSize.width)).priorityLow(); make.height.equalTo(@(self.buttonSize.height)).priorityLow(); make.width.lessThanOrEqualTo(self); make.height.lessThanOrEqualTo(self); }]; //according to apple super should be called at end of method [super updateConstraints]; } ``` ### 3. mas_remakeConstraints `mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in. `mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove. ```obj-c - (void)changeButtonPosition { [self.button mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.equalTo(self.buttonSize); if (topLeft) { make.top.and.left.offset(10); } else { make.bottom.and.right.offset(-10); } }]; } ``` You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project. ## When the ^&*!@ hits the fan! Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this: ```obj-c Unable to simultaneously satisfy constraints.....blah blah blah.... ( "=5000)]>", "", "", "" ) Will attempt to recover by breaking constraint =5000)]> ``` Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`. Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry. which means your console output can now look like this: ```obj-c Unable to simultaneously satisfy constraints......blah blah blah.... ( "", "= 5000>", "", "" ) Will attempt to recover by breaking constraint = 5000> ``` For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace. ## Where should I create my constraints? ```objc @implementation DIYCustomView - (id)init { self = [super init]; if (!self) return nil; // --- Create your views here --- self.button = [[UIButton alloc] init]; return self; } // tell UIKit that you are using AutoLayout + (BOOL)requiresConstraintBasedLayout { return YES; } // this is Apple's recommended place for adding/updating constraints - (void)updateConstraints { // --- remake/update constraints here [self.button remakeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(self.buttonSize.width)); make.height.equalTo(@(self.buttonSize.height)); }]; //according to apple super should be called at end of method [super updateConstraints]; } - (void)didTapButton:(UIButton *)button { // --- Do your changes ie change variables that affect your layout etc --- self.buttonSize = CGSize(200, 200); // tell constraints they need updating [self setNeedsUpdateConstraints]; } @end ``` ## Installation Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods). In your Podfile >`pod 'Masonry'` If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry >`#define MAS_SHORTHAND` Get busy Masoning >`#import "Masonry.h"` ## Code Snippets Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! `mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) { <#code#> }];` ## Features * Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! * Great debug support, give your views and constraints meaningful names. * Constraints read like sentences. * No crazy macro magic. Masonry won't pollute the global namespace with macros. * Not string or dictionary based and hence you get compile time checking. ## TODO * Eye candy * Mac example project * More tests and examples ================================================ FILE: Tests/GcovTestObserver.m ================================================ // // GcovTestObserver.m // ClassyTests // // Created by Jonas Budelmann on 19/11/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface GcovTestObserver : XCTestObserver @end @implementation GcovTestObserver - (void)stopObserving { [super stopObserving]; UIApplication* application = [UIApplication sharedApplication]; [application.delegate applicationWillTerminate:application]; } @end ================================================ FILE: Tests/Masonry Tests.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 03674DA26B0749DA89CBB9C4 /* libPods-MasonryTestsLoader.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 47918AE732004ACDA52EF295 /* libPods-MasonryTestsLoader.a */; }; 1ABDF84BB7EB4FD087045E36 /* libPods-Masonry iOS Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CF4FBEAC97D4EA5ABA1D512 /* libPods-Masonry iOS Tests.a */; }; 3D21C42B1845D0CA001D5F97 /* NSArray+MASAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D21C42A1845D0C0001D5F97 /* NSArray+MASAdditionsSpec.m */; }; 447354911B3A1818004DACCB /* ViewController+MASAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4473548F1B3A17B4004DACCB /* ViewController+MASAdditionsSpec.m */; }; DD717A0218442A6400FAA7A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A0118442A6400FAA7A8 /* Foundation.framework */; }; DD717A0418442A6400FAA7A8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A0318442A6400FAA7A8 /* CoreGraphics.framework */; }; DD717A0618442A6400FAA7A8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A0518442A6400FAA7A8 /* UIKit.framework */; }; DD717A0C18442A6400FAA7A8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DD717A0A18442A6400FAA7A8 /* InfoPlist.strings */; }; DD717A0E18442A6400FAA7A8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A0D18442A6400FAA7A8 /* main.m */; }; DD717A1218442A6400FAA7A8 /* CASAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A1118442A6400FAA7A8 /* CASAppDelegate.m */; }; DD717A1418442A6400FAA7A8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD717A1318442A6400FAA7A8 /* Images.xcassets */; }; DD717A3318442ADC00FAA7A8 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A1A18442A6400FAA7A8 /* XCTest.framework */; }; DD717A3418442ADC00FAA7A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A0118442A6400FAA7A8 /* Foundation.framework */; }; DD717A3518442ADC00FAA7A8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD717A0518442A6400FAA7A8 /* UIKit.framework */; }; DD717A5118442EC600FAA7A8 /* MASCompositeConstraintSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4818442EC600FAA7A8 /* MASCompositeConstraintSpec.m */; }; DD717A5218442EC600FAA7A8 /* MASConstraintDelegateMock.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4A18442EC600FAA7A8 /* MASConstraintDelegateMock.m */; }; DD717A5318442EC600FAA7A8 /* MASConstraintMakerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4B18442EC600FAA7A8 /* MASConstraintMakerSpec.m */; }; DD717A5418442EC600FAA7A8 /* MASViewAttributeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4C18442EC600FAA7A8 /* MASViewAttributeSpec.m */; }; DD717A5518442EC600FAA7A8 /* MASViewConstraintSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4D18442EC600FAA7A8 /* MASViewConstraintSpec.m */; }; DD717A5618442EC600FAA7A8 /* NSLayoutConstraint+MASDebugAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A4E18442EC600FAA7A8 /* NSLayoutConstraint+MASDebugAdditionsSpec.m */; }; DD717A5718442EC600FAA7A8 /* View+MASAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A5018442EC600FAA7A8 /* View+MASAdditionsSpec.m */; }; DD717A631844303200FAA7A8 /* GcovTestObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = DD717A5F1844303200FAA7A8 /* GcovTestObserver.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ DD717A3F18442ADD00FAA7A8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DD7179F418442A1F00FAA7A8 /* Project object */; proxyType = 1; remoteGlobalIDString = DD7179FD18442A6400FAA7A8; remoteInfo = MasonryTestsLoader; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 1CF4FBEAC97D4EA5ABA1D512 /* libPods-Masonry iOS Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Masonry iOS Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 20CC4ABE19D3EE262A136582 /* Pods-Masonry iOS Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Masonry iOS Tests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests.release.xcconfig"; sourceTree = ""; }; 3D21C42A1845D0C0001D5F97 /* NSArray+MASAdditionsSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSArray+MASAdditionsSpec.m"; sourceTree = ""; }; 4473548F1B3A17B4004DACCB /* ViewController+MASAdditionsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ViewController+MASAdditionsSpec.m"; sourceTree = ""; }; 47918AE732004ACDA52EF295 /* libPods-MasonryTestsLoader.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MasonryTestsLoader.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B3C285A8F21659F8AC931CFE /* Pods-MasonryTestsLoader.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MasonryTestsLoader.release.xcconfig"; path = "../Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader.release.xcconfig"; sourceTree = ""; }; D7C49E3BFEC39EF9CC752050 /* Pods-Masonry iOS Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Masonry iOS Tests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests.debug.xcconfig"; sourceTree = ""; }; DD7179FE18442A6400FAA7A8 /* MasonryTestsLoader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MasonryTestsLoader.app; sourceTree = BUILT_PRODUCTS_DIR; }; DD717A0118442A6400FAA7A8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DD717A0318442A6400FAA7A8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DD717A0518442A6400FAA7A8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; DD717A0918442A6400FAA7A8 /* MasonryTestsLoader-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MasonryTestsLoader-Info.plist"; sourceTree = ""; }; DD717A0B18442A6400FAA7A8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; DD717A0D18442A6400FAA7A8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DD717A0F18442A6400FAA7A8 /* MasonryTestsLoader-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MasonryTestsLoader-Prefix.pch"; sourceTree = ""; }; DD717A1018442A6400FAA7A8 /* CASAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CASAppDelegate.h; sourceTree = ""; }; DD717A1118442A6400FAA7A8 /* CASAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CASAppDelegate.m; sourceTree = ""; }; DD717A1318442A6400FAA7A8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; DD717A1A18442A6400FAA7A8 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; DD717A3218442ADC00FAA7A8 /* Masonry iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Masonry iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; DD717A4818442EC600FAA7A8 /* MASCompositeConstraintSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASCompositeConstraintSpec.m; sourceTree = ""; }; DD717A4918442EC600FAA7A8 /* MASConstraintDelegateMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MASConstraintDelegateMock.h; sourceTree = ""; }; DD717A4A18442EC600FAA7A8 /* MASConstraintDelegateMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraintDelegateMock.m; sourceTree = ""; }; DD717A4B18442EC600FAA7A8 /* MASConstraintMakerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASConstraintMakerSpec.m; sourceTree = ""; }; DD717A4C18442EC600FAA7A8 /* MASViewAttributeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewAttributeSpec.m; sourceTree = ""; }; DD717A4D18442EC600FAA7A8 /* MASViewConstraintSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewConstraintSpec.m; sourceTree = ""; }; DD717A4E18442EC600FAA7A8 /* NSLayoutConstraint+MASDebugAdditionsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MASDebugAdditionsSpec.m"; sourceTree = ""; }; DD717A5018442EC600FAA7A8 /* View+MASAdditionsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "View+MASAdditionsSpec.m"; sourceTree = ""; }; DD717A5F1844303200FAA7A8 /* GcovTestObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GcovTestObserver.m; sourceTree = ""; }; DD717A601844303200FAA7A8 /* MasonryTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MasonryTests-Info.plist"; sourceTree = ""; }; DD717A611844303200FAA7A8 /* MasonryTests-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MasonryTests-Prefix.pch"; sourceTree = ""; }; DD717A621844303200FAA7A8 /* XCTest+Spec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "XCTest+Spec.h"; sourceTree = ""; }; DD717A651844358800FAA7A8 /* NSObject+MASSubscriptSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+MASSubscriptSupport.h"; sourceTree = ""; }; FA30CDC14969096518121CA2 /* Pods-MasonryTestsLoader.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MasonryTestsLoader.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ DD7179FB18442A6400FAA7A8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DD717A0418442A6400FAA7A8 /* CoreGraphics.framework in Frameworks */, DD717A0618442A6400FAA7A8 /* UIKit.framework in Frameworks */, DD717A0218442A6400FAA7A8 /* Foundation.framework in Frameworks */, 03674DA26B0749DA89CBB9C4 /* libPods-MasonryTestsLoader.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; DD717A2F18442ADC00FAA7A8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DD717A3318442ADC00FAA7A8 /* XCTest.framework in Frameworks */, DD717A3518442ADC00FAA7A8 /* UIKit.framework in Frameworks */, DD717A3418442ADC00FAA7A8 /* Foundation.framework in Frameworks */, 1ABDF84BB7EB4FD087045E36 /* libPods-Masonry iOS Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 39E4168F51AD67BA390486D7 /* Pods */ = { isa = PBXGroup; children = ( D7C49E3BFEC39EF9CC752050 /* Pods-Masonry iOS Tests.debug.xcconfig */, 20CC4ABE19D3EE262A136582 /* Pods-Masonry iOS Tests.release.xcconfig */, FA30CDC14969096518121CA2 /* Pods-MasonryTestsLoader.debug.xcconfig */, B3C285A8F21659F8AC931CFE /* Pods-MasonryTestsLoader.release.xcconfig */, ); name = Pods; sourceTree = ""; }; DD7179F318442A1F00FAA7A8 = { isa = PBXGroup; children = ( DD717A4718442EC600FAA7A8 /* Specs */, DD717A5E18442F3900FAA7A8 /* Supporting Files */, DD717A0018442A6400FAA7A8 /* Frameworks */, DD7179FF18442A6400FAA7A8 /* Products */, 39E4168F51AD67BA390486D7 /* Pods */, ); sourceTree = ""; }; DD7179FF18442A6400FAA7A8 /* Products */ = { isa = PBXGroup; children = ( DD7179FE18442A6400FAA7A8 /* MasonryTestsLoader.app */, DD717A3218442ADC00FAA7A8 /* Masonry iOS Tests.xctest */, ); name = Products; sourceTree = ""; }; DD717A0018442A6400FAA7A8 /* Frameworks */ = { isa = PBXGroup; children = ( DD717A0118442A6400FAA7A8 /* Foundation.framework */, DD717A0318442A6400FAA7A8 /* CoreGraphics.framework */, DD717A0518442A6400FAA7A8 /* UIKit.framework */, DD717A1A18442A6400FAA7A8 /* XCTest.framework */, 1CF4FBEAC97D4EA5ABA1D512 /* libPods-Masonry iOS Tests.a */, 47918AE732004ACDA52EF295 /* libPods-MasonryTestsLoader.a */, ); name = Frameworks; sourceTree = ""; }; DD717A0718442A6400FAA7A8 /* MasonryTestsLoader */ = { isa = PBXGroup; children = ( DD717A1018442A6400FAA7A8 /* CASAppDelegate.h */, DD717A1118442A6400FAA7A8 /* CASAppDelegate.m */, DD717A1318442A6400FAA7A8 /* Images.xcassets */, DD717A0918442A6400FAA7A8 /* MasonryTestsLoader-Info.plist */, DD717A0A18442A6400FAA7A8 /* InfoPlist.strings */, DD717A0D18442A6400FAA7A8 /* main.m */, DD717A0F18442A6400FAA7A8 /* MasonryTestsLoader-Prefix.pch */, ); path = MasonryTestsLoader; sourceTree = ""; }; DD717A4718442EC600FAA7A8 /* Specs */ = { isa = PBXGroup; children = ( DD717A4818442EC600FAA7A8 /* MASCompositeConstraintSpec.m */, DD717A4918442EC600FAA7A8 /* MASConstraintDelegateMock.h */, DD717A4A18442EC600FAA7A8 /* MASConstraintDelegateMock.m */, DD717A4B18442EC600FAA7A8 /* MASConstraintMakerSpec.m */, DD717A4C18442EC600FAA7A8 /* MASViewAttributeSpec.m */, DD717A4D18442EC600FAA7A8 /* MASViewConstraintSpec.m */, DD717A4E18442EC600FAA7A8 /* NSLayoutConstraint+MASDebugAdditionsSpec.m */, DD717A5018442EC600FAA7A8 /* View+MASAdditionsSpec.m */, 4473548F1B3A17B4004DACCB /* ViewController+MASAdditionsSpec.m */, 3D21C42A1845D0C0001D5F97 /* NSArray+MASAdditionsSpec.m */, ); path = Specs; sourceTree = ""; }; DD717A5E18442F3900FAA7A8 /* Supporting Files */ = { isa = PBXGroup; children = ( DD717A0718442A6400FAA7A8 /* MasonryTestsLoader */, DD717A651844358800FAA7A8 /* NSObject+MASSubscriptSupport.h */, DD717A5F1844303200FAA7A8 /* GcovTestObserver.m */, DD717A601844303200FAA7A8 /* MasonryTests-Info.plist */, DD717A611844303200FAA7A8 /* MasonryTests-Prefix.pch */, DD717A621844303200FAA7A8 /* XCTest+Spec.h */, ); name = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ DD7179FD18442A6400FAA7A8 /* MasonryTestsLoader */ = { isa = PBXNativeTarget; buildConfigurationList = DD717A2818442A6400FAA7A8 /* Build configuration list for PBXNativeTarget "MasonryTestsLoader" */; buildPhases = ( 31A2D7D777514D639ED660C8 /* [CP] Check Pods Manifest.lock */, DD7179FA18442A6400FAA7A8 /* Sources */, DD7179FB18442A6400FAA7A8 /* Frameworks */, DD7179FC18442A6400FAA7A8 /* Resources */, DB244E91C65945F39DE14644 /* [CP] Copy Pods Resources */, 5B07E509D5304034616D89F7 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = MasonryTestsLoader; productName = MasonryTestsLoader; productReference = DD7179FE18442A6400FAA7A8 /* MasonryTestsLoader.app */; productType = "com.apple.product-type.application"; }; DD717A3118442ADC00FAA7A8 /* Masonry iOS Tests */ = { isa = PBXNativeTarget; buildConfigurationList = DD717A4118442ADD00FAA7A8 /* Build configuration list for PBXNativeTarget "Masonry iOS Tests" */; buildPhases = ( 9F27CD2D75E246C0A787A688 /* [CP] Check Pods Manifest.lock */, DD717A2E18442ADC00FAA7A8 /* Sources */, DD717A2F18442ADC00FAA7A8 /* Frameworks */, DD717A3018442ADC00FAA7A8 /* Resources */, DC72D687A4114D04BBA75896 /* [CP] Copy Pods Resources */, 5AEE51071FAE8B3BB28C9E5E /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( DD717A4018442ADD00FAA7A8 /* PBXTargetDependency */, ); name = "Masonry iOS Tests"; productName = "Masonry iOS Tests"; productReference = DD717A3218442ADC00FAA7A8 /* Masonry iOS Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ DD7179F418442A1F00FAA7A8 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0900; TargetAttributes = { DD717A3118442ADC00FAA7A8 = { TestTargetID = DD7179FD18442A6400FAA7A8; }; }; }; buildConfigurationList = DD7179F718442A1F00FAA7A8 /* Build configuration list for PBXProject "Masonry Tests" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = DD7179F318442A1F00FAA7A8; productRefGroup = DD7179FF18442A6400FAA7A8 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( DD7179FD18442A6400FAA7A8 /* MasonryTestsLoader */, DD717A3118442ADC00FAA7A8 /* Masonry iOS Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ DD7179FC18442A6400FAA7A8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( DD717A0C18442A6400FAA7A8 /* InfoPlist.strings in Resources */, DD717A1418442A6400FAA7A8 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; DD717A3018442ADC00FAA7A8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 31A2D7D777514D639ED660C8 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-MasonryTestsLoader-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 5AEE51071FAE8B3BB28C9E5E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 5B07E509D5304034616D89F7 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 9F27CD2D75E246C0A787A688 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-Masonry iOS Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; DB244E91C65945F39DE14644 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-MasonryTestsLoader/Pods-MasonryTestsLoader-resources.sh\"\n"; showEnvVarsInLog = 0; }; DC72D687A4114D04BBA75896 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Masonry iOS Tests/Pods-Masonry iOS Tests-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ DD7179FA18442A6400FAA7A8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( DD717A1218442A6400FAA7A8 /* CASAppDelegate.m in Sources */, DD717A0E18442A6400FAA7A8 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; DD717A2E18442ADC00FAA7A8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( DD717A5518442EC600FAA7A8 /* MASViewConstraintSpec.m in Sources */, DD717A5318442EC600FAA7A8 /* MASConstraintMakerSpec.m in Sources */, DD717A5618442EC600FAA7A8 /* NSLayoutConstraint+MASDebugAdditionsSpec.m in Sources */, DD717A5718442EC600FAA7A8 /* View+MASAdditionsSpec.m in Sources */, DD717A631844303200FAA7A8 /* GcovTestObserver.m in Sources */, 447354911B3A1818004DACCB /* ViewController+MASAdditionsSpec.m in Sources */, 3D21C42B1845D0CA001D5F97 /* NSArray+MASAdditionsSpec.m in Sources */, DD717A5418442EC600FAA7A8 /* MASViewAttributeSpec.m in Sources */, DD717A5218442EC600FAA7A8 /* MASConstraintDelegateMock.m in Sources */, DD717A5118442EC600FAA7A8 /* MASCompositeConstraintSpec.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ DD717A4018442ADD00FAA7A8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DD7179FD18442A6400FAA7A8 /* MasonryTestsLoader */; targetProxy = DD717A3F18442ADD00FAA7A8 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ DD717A0A18442A6400FAA7A8 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( DD717A0B18442A6400FAA7A8 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ DD7179F818442A1F00FAA7A8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; }; name = Debug; }; DD7179F918442A1F00FAA7A8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; }; name = Release; }; DD717A2918442A6400FAA7A8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = FA30CDC14969096518121CA2 /* Pods-MasonryTestsLoader.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MasonryTestsLoader/MasonryTestsLoader-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "MasonryTestsLoader/MasonryTestsLoader-Info.plist"; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; name = Debug; }; DD717A2A18442A6400FAA7A8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = B3C285A8F21659F8AC931CFE /* Pods-MasonryTestsLoader.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MasonryTestsLoader/MasonryTestsLoader-Prefix.pch"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "MasonryTestsLoader/MasonryTestsLoader-Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; }; name = Release; }; DD717A4218442ADD00FAA7A8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D7C49E3BFEC39EF9CC752050 /* Pods-Masonry iOS Tests.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MasonryTestsLoader.app/MasonryTestsLoader"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MasonryTests-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "MasonryTests-Info.plist"; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; name = Debug; }; DD717A4318442ADD00FAA7A8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 20CC4ABE19D3EE262A136582 /* Pods-Masonry iOS Tests.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MasonryTestsLoader.app/MasonryTestsLoader"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MasonryTests-Prefix.pch"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "MasonryTests-Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = "com.cloudling.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; TEST_HOST = "$(BUNDLE_LOADER)"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = xctest; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ DD7179F718442A1F00FAA7A8 /* Build configuration list for PBXProject "Masonry Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( DD7179F818442A1F00FAA7A8 /* Debug */, DD7179F918442A1F00FAA7A8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; DD717A2818442A6400FAA7A8 /* Build configuration list for PBXNativeTarget "MasonryTestsLoader" */ = { isa = XCConfigurationList; buildConfigurations = ( DD717A2918442A6400FAA7A8 /* Debug */, DD717A2A18442A6400FAA7A8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; DD717A4118442ADD00FAA7A8 /* Build configuration list for PBXNativeTarget "Masonry iOS Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( DD717A4218442ADD00FAA7A8 /* Debug */, DD717A4318442ADD00FAA7A8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = DD7179F418442A1F00FAA7A8 /* Project object */; } ================================================ FILE: Tests/Masonry Tests.xcodeproj/xcshareddata/xcschemes/Masonry iOS Tests.xcscheme ================================================ ================================================ FILE: Tests/MasonryTests-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: Tests/MasonryTests-Prefix.pch ================================================ // // Prefix header for all source files of the 'MasonryTests' target in the 'Masonry' project // #ifdef __OBJC__ #import #define EXP_SHORTHAND #import "XCTest+Spec.h" #import "Expecta.h" #import "MASUtilities.h" #if __MAC_OS_X_VERSION_MAX_ALLOWED <= 1070 #import "NSObject+MASSubscriptSupport.h" #endif #endif ================================================ FILE: Tests/MasonryTestsLoader/CASAppDelegate.h ================================================ // // CASAppDelegate.h // MasonryTestsLoader // // Created by Jonas Budelmann on 26/11/13. // // #import @interface CASAppDelegate : UIResponder @end ================================================ FILE: Tests/MasonryTestsLoader/CASAppDelegate.m ================================================ // // CASAppDelegate.m // MasonryTestsLoader // // Created by Jonas Budelmann on 26/11/13. // // #import "CASAppDelegate.h" @implementation CASAppDelegate + (void)initialize { // https://github.com/fastlane/fastlane/issues/3886#issuecomment-224884332 // XCode 7.3 introduced a bug where early registration of a test observer prevented // default XCTest test observer from being registered. That caused no logs being printed // onto console, which in result broke several tools that relied on this. // In order to go around the issue we're deferring registration to allow default // test observer to register first. dispatch_async(dispatch_get_main_queue(), ^{ [[NSUserDefaults standardUserDefaults] setValue:@"XCTestLog,GcovTestObserver" forKey:@"XCTestObserverClass"]; }); } - (void)applicationWillTerminate:(UIApplication *)application { extern void __gcov_flush(void); __gcov_flush(); } @end ================================================ FILE: Tests/MasonryTestsLoader/Images.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "1x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "2x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "1x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "2x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "1x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Tests/MasonryTestsLoader/Images.xcassets/LaunchImage.launchimage/Contents.json ================================================ { "images" : [ { "orientation" : "portrait", "idiom" : "iphone", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "2x" }, { "orientation" : "portrait", "idiom" : "iphone", "subtype" : "retina4", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "2x" }, { "orientation" : "portrait", "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "1x" }, { "orientation" : "landscape", "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "1x" }, { "orientation" : "portrait", "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "2x" }, { "orientation" : "landscape", "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Tests/MasonryTestsLoader/MasonryTestsLoader-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: Tests/MasonryTestsLoader/MasonryTestsLoader-Prefix.pch ================================================ // // Prefix header // // The contents of this file are implicitly included at the beginning of every source file. // #import #ifndef __IPHONE_3_0 #warning "This project uses features only available in iOS SDK 3.0 and later." #endif #ifdef __OBJC__ #import #import #endif ================================================ FILE: Tests/MasonryTestsLoader/en.lproj/InfoPlist.strings ================================================ /* Localized versions of Info.plist keys */ ================================================ FILE: Tests/MasonryTestsLoader/main.m ================================================ // // main.m // MasonryTestsLoader // // Created by Jonas Budelmann on 26/11/13. // // #import #import "CASAppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([CASAppDelegate class])); } } ================================================ FILE: Tests/NSObject+MASSubscriptSupport.h ================================================ // // NSObject+MASSubscriptSupport.h // Masonry // // Created by Jonas Budelmann on 28/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import @interface NSObject (MASSubscriptSupport) - (id)objectAtIndexedSubscript:(NSUInteger)idx; - (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx; - (void)setObject:(id)obj forKeyedSubscript:(id )key; - (id)objectForKeyedSubscript:(id)key; @end ================================================ FILE: Tests/Specs/MASCompositeConstraintSpec.m ================================================ // // MASCompositeConstraintSpec.m // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASCompositeConstraint.h" #import "MASViewConstraint.h" #import "MASConstraintDelegateMock.h" #import "View+MASAdditions.h" @interface MASCompositeConstraint () @property (nonatomic, strong) NSMutableArray *childConstraints; @end @interface MASViewConstraint () @property (nonatomic, weak) MASLayoutConstraint *layoutConstraint; @property (nonatomic, assign) CGFloat layoutConstant; @property (nonatomic, assign) MASLayoutPriority layoutPriority; @property (nonatomic, assign) CGFloat layoutMultiplier; @end SpecBegin(MASCompositeConstraint) { MASConstraintDelegateMock *delegate; MAS_VIEW *superview; MAS_VIEW *view; MASCompositeConstraint *composite; } - (void)setUp { delegate = MASConstraintDelegateMock.new; view = MAS_VIEW.new; superview = MAS_VIEW.new; [superview addSubview:view]; } - (void)testCompleteChildren { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_width], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_height] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; MAS_VIEW *newView = MAS_VIEW.new; //first equality statement composite.greaterThanOrEqualTo(newView).sizeOffset(CGSizeMake(90, 30)).multipliedBy(3).priorityLow(); expect(composite.childConstraints).to.haveCountOf(2); MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect(viewConstraint.secondViewAttribute.view).to.beIdenticalTo(newView); expect(viewConstraint.secondViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); expect(viewConstraint.layoutConstant).to.equal(90); expect(viewConstraint.layoutPriority).to.equal(MASLayoutPriorityDefaultLow); viewConstraint = composite.childConstraints[1]; expect(viewConstraint.secondViewAttribute.view).to.beIdenticalTo(newView); expect(viewConstraint.secondViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeHeight); expect(viewConstraint.layoutConstant).to.equal(30); expect(viewConstraint.layoutPriority).to.equal(MASLayoutPriorityDefaultLow); } - (void)testDoNotRemoveOnInstall { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_centerX], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_centerY] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; //first equality statement composite.equalTo(newView).centerOffset(CGPointMake(90, 30)).dividedBy(2).priorityHigh(); [composite install]; expect(composite.childConstraints).to.haveCountOf(2); MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect([viewConstraint layoutConstant]).to.equal(90); expect([viewConstraint layoutMultiplier]).to.equal(0.5); expect([viewConstraint layoutPriority]).to.equal(MASLayoutPriorityDefaultHigh); viewConstraint = composite.childConstraints[1]; expect([viewConstraint layoutConstant]).to.equal(30); expect([viewConstraint layoutMultiplier]).to.equal(0.5); expect([viewConstraint layoutPriority]).to.equal(MASLayoutPriorityDefaultHigh); } - (void)testSpawnChildCompositeConstraints { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_width], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_height] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; MAS_VIEW *otherView = MAS_VIEW.new; [superview addSubview:otherView]; composite.lessThanOrEqualTo(@[@2, otherView]); expect(composite.childConstraints).to.haveCountOf(2); expect(composite.childConstraints[0]).to.beKindOf(MASCompositeConstraint.class); expect(composite.childConstraints[1]).to.beKindOf(MASCompositeConstraint.class); } - (void)testModifyInsetsOnAppropriateChildren { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_right], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_top], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_bottom], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_left], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_baseline], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_width], ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; composite.with.insets((MASEdgeInsets){1, 2, 3, 4}); expect([children[0] layoutConstant]).to.equal(-4); expect([children[1] layoutConstant]).to.equal(1); expect([children[2] layoutConstant]).to.equal(-3); expect([children[3] layoutConstant]).to.equal(2); expect([children[4] layoutConstant]).to.equal(0); expect([children[5] layoutConstant]).to.equal(0); }; - (void)testModifyInsetOnAppropriateChildren { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_right], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_top], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_bottom], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_left], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_baseline], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_width], ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; composite.with.inset(1); expect([children[0] layoutConstant]).to.equal(-1); expect([children[1] layoutConstant]).to.equal(1); expect([children[2] layoutConstant]).to.equal(-1); expect([children[3] layoutConstant]).to.equal(1); expect([children[4] layoutConstant]).to.equal(0); expect([children[5] layoutConstant]).to.equal(0); }; - (void)testUninstall { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_leading], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_trailing] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; //first equality statement composite.equalTo(newView); [composite install]; expect(superview.constraints).to.haveCountOf(2); [composite uninstall]; expect(superview.constraints).to.haveCountOf(0); } - (void)testActivateDeactivate { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_leading], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_trailing] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; //first equality statement composite.equalTo(newView); [composite install]; expect(superview.constraints).to.haveCountOf(2); [composite deactivate]; expect(superview.constraints).to.haveCountOf(0); [composite activate]; expect(superview.constraints).to.haveCountOf(2); } - (void)testAttributeChainingShouldCallDelegate { NSArray *children = @[ [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_left], [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_right] ]; composite = [[MASCompositeConstraint alloc] initWithChildren:children]; composite.delegate = delegate; expect(composite.childConstraints.count).to.equal(2); MASConstraint *result = (id)composite.and.bottom; expect(result).to.beIdenticalTo(composite); expect(delegate.chainedConstraints).to.equal(@[composite]); expect(composite.childConstraints.count).to.equal(3); MASViewConstraint *newChild = composite.childConstraints[2]; expect(newChild.firstViewAttribute.layoutAttribute).to.equal(@(NSLayoutAttributeBottom)); expect(newChild.delegate).to.beIdenticalTo(composite); } SpecEnd ================================================ FILE: Tests/Specs/MASConstraintDelegateMock.h ================================================ // // MASConstraintDelegate.h // Masonry // // Created by Jonas Budelmann on 28/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASConstraint+Private.h" @interface MASConstraintDelegateMock : NSObject @property (nonatomic, strong) NSMutableArray *constraints; @property (nonatomic, strong) NSMutableArray *chainedConstraints; @end ================================================ FILE: Tests/Specs/MASConstraintDelegateMock.m ================================================ // // MASConstraintDelegate.m // Masonry // // Created by Jonas Budelmann on 28/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASConstraintDelegateMock.h" #import "MASViewConstraint.h" @implementation MASConstraintDelegateMock - (id)init { self = [super init]; if (!self) return nil; self.constraints = NSMutableArray.new; self.chainedConstraints = NSMutableArray.new; return self; } - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { [self.constraints replaceObjectAtIndex:[self.constraints indexOfObject:constraint] withObject:replacementConstraint]; } - (id)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { [self.chainedConstraints addObject:constraint]; MASViewConstraint *viewConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:[[MASViewAttribute alloc] initWithView:nil layoutAttribute:layoutAttribute]]; return viewConstraint; } @end ================================================ FILE: Tests/Specs/MASConstraintMakerSpec.m ================================================ // // MASConstraintMakerSpec.m // Masonry // // Created by Jonas Budelmann on 25/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASConstraintMaker.h" #import "MASCompositeConstraint.h" #import "MASViewConstraint.h" #import "MASConstraint+Private.h" @interface MASConstraintMaker () @property (nonatomic, weak) MAS_VIEW *view; @property (nonatomic, strong) NSMutableArray *constraints; @end @interface MASCompositeConstraint () @property (nonatomic, strong) NSMutableArray *childConstraints; @end SpecBegin(MASConstraintMaker) { __strong MASConstraintMaker *maker; __strong MAS_VIEW *superview; __strong MAS_VIEW *view; __strong MASCompositeConstraint *composite; } - (void)setUp { composite = nil; view = MAS_VIEW.new; superview = MAS_VIEW.new; [superview addSubview:view]; maker = [[MASConstraintMaker alloc] initWithView:view]; } - (void)testCreateSingleAttribute { composite = (MASCompositeConstraint *)maker.attributes(MASAttributeHeight); expect(composite.childConstraints).to.haveCountOf(1); MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeHeight); } - (void)testCreateAttributes { composite = (MASCompositeConstraint *)maker.attributes(MASAttributeCenterX | MASAttributeWidth); expect(composite.childConstraints).to.haveCountOf(2); // children are ordered like MASAttribute, so the first is width MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); viewConstraint = composite.childConstraints[1]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeCenterX); } - (void)testCreateCenterYAndCenterXChildren { composite = (MASCompositeConstraint *)maker.center; expect(composite.childConstraints).to.haveCountOf(2); MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeCenterX); viewConstraint = composite.childConstraints[1]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeCenterY); } - (void)testCreateAllEdges { MAS_VIEW *newView = MAS_VIEW.new; composite = (MASCompositeConstraint *)maker.edges; composite.equalTo(newView); expect(composite.childConstraints).to.haveCountOf(4); MASViewConstraint *viewConstraint; //left viewConstraint = composite.childConstraints[0]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeLeft); //right viewConstraint = composite.childConstraints[1]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeRight); //top viewConstraint = composite.childConstraints[2]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeTop); //bottom viewConstraint = composite.childConstraints[3]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeBottom); } - (void)testCreateWidthAndHeightChildren { composite = (MASCompositeConstraint *)maker.size; expect(composite.childConstraints).to.haveCountOf(2); MASViewConstraint *viewConstraint = composite.childConstraints[0]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); viewConstraint = composite.childConstraints[1]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeHeight); } - (void)testInstallConstraints { MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; maker.edges.equalTo(newView); maker.centerX.equalTo(@[newView, @10]); expect([maker install]).to.haveCountOf(2); } - (void)testUpdateConstraints { MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; maker.updateExisting = YES; maker.left.equalTo(newView).offset(10); [maker install]; NSLayoutConstraint *constraint1 = superview.constraints[0]; expect(constraint1.constant).to.equal(10); maker.left.equalTo(newView).offset(20); [maker install]; expect(superview.constraints).to.haveCountOf(1); NSLayoutConstraint *constraint2 = superview.constraints[0]; expect(constraint2.constant).to.equal(20); expect(constraint2).to.beIdenticalTo(constraint2); } - (void)testDoNotUpdateConstraints { MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; maker.updateExisting = YES; maker.left.equalTo(newView).offset(10); [maker install]; NSLayoutConstraint *constraint1 = superview.constraints[0]; expect(constraint1.constant).to.equal(10); maker.right.equalTo(newView).offset(20); [maker install]; expect(superview.constraints).to.haveCountOf(2); NSLayoutConstraint *constraint2 = superview.constraints[1]; expect(constraint1.constant).to.equal(10); expect(constraint2.constant).to.equal(20); } - (void)testRemoveConstraints { MAS_VIEW *newView = MAS_VIEW.new; [superview addSubview:newView]; maker.left.equalTo(newView).offset(10); maker.right.equalTo(newView).offset(20); maker.width.equalTo(newView).offset(30); [maker install]; expect(superview.constraints).to.haveCountOf(3); expect([MASViewConstraint installedConstraintsForView:view]).to.haveCountOf(3); maker.removeExisting = YES; maker.height.equalTo(newView).offset(100); [maker install]; expect(superview.constraints).to.haveCountOf(1); expect([MASViewConstraint installedConstraintsForView:view]).to.haveCountOf(1); NSLayoutConstraint *constraint1 = superview.constraints[0]; expect(constraint1.constant).to.equal(100); } - (void)testCreateNewViewAttributes { expect(maker.left).notTo.beIdenticalTo(maker.left); expect(maker.right).notTo.beIdenticalTo(maker.right); expect(maker.top).notTo.beIdenticalTo(maker.top); expect(maker.bottom).notTo.beIdenticalTo(maker.bottom); expect(maker.baseline).notTo.beIdenticalTo(maker.baseline); expect(maker.leading).notTo.beIdenticalTo(maker.leading); expect(maker.trailing).notTo.beIdenticalTo(maker.trailing); expect(maker.width).notTo.beIdenticalTo(maker.width); expect(maker.height).notTo.beIdenticalTo(maker.height); expect(maker.centerX).notTo.beIdenticalTo(maker.centerX); expect(maker.centerY).notTo.beIdenticalTo(maker.centerY); } - (void)testAttributeChainingWithComposite { composite = (MASCompositeConstraint *)maker.size; expect(maker.constraints.count).to.equal(1); expect(composite.childConstraints.count).to.equal(2); composite = (id)composite.left; expect(maker.constraints.count).to.equal(1); expect(composite.childConstraints.count).to.equal(3); MASViewConstraint *viewConstraint = composite.childConstraints[2]; expect(viewConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(viewConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeLeft); expect(viewConstraint.delegate).to.beIdenticalTo(composite); } - (void)testAttributeChainingWithViewConstraint { MASViewConstraint *viewConstraint = (MASViewConstraint *)maker.width; expect(maker.constraints.count).to.equal(1); expect(viewConstraint).to.beIdenticalTo(maker.constraints[0]); expect(viewConstraint.delegate).to.beIdenticalTo(maker); composite = (id)viewConstraint.height; expect(composite).to.beKindOf(MASCompositeConstraint.class); expect(maker.constraints.count).to.equal(1); expect(composite).to.beIdenticalTo(maker.constraints[0]); expect(composite.delegate).to.beIdenticalTo(maker); expect(viewConstraint.delegate).to.beIdenticalTo(composite); MASViewConstraint *childConstraint = composite.childConstraints[0]; expect(childConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(childConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); expect(childConstraint.delegate).to.beIdenticalTo(composite); expect(childConstraint).to.beIdenticalTo(viewConstraint); childConstraint = composite.childConstraints[1]; expect(childConstraint.firstViewAttribute.view).to.beIdenticalTo(maker.view); expect(childConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeHeight); expect(childConstraint.delegate).to.beIdenticalTo(composite); } SpecEnd ================================================ FILE: Tests/Specs/MASViewAttributeSpec.m ================================================ // // MASViewAttributeSpec.m // Masonry // // Created by Craig Siemens on 2013-10-09. // Copyright 2013 Jonas Budelmann. All rights reserved. // #import "MASViewAttribute.h" SpecBegin(MASViewAttributeSpec){ MAS_VIEW *view; MASViewAttribute *viewAttribute; } - (void)setUp { view = [MAS_VIEW new]; viewAttribute = [[MASViewAttribute alloc] initWithView:view layoutAttribute:NSLayoutAttributeLeft]; } - (void)testIsEqual { //should return YES whe the view and layoutAttribute are the same MASViewAttribute *otherViewAttribute = [[MASViewAttribute alloc] initWithView:viewAttribute.view layoutAttribute:viewAttribute.layoutAttribute]; expect([viewAttribute isEqual:otherViewAttribute]).to.equal(YES); //should return NO when the view is different but the layoutAttribute is the same MAS_VIEW *otherView = [MAS_VIEW new]; otherViewAttribute = [[MASViewAttribute alloc] initWithView:otherView layoutAttribute:viewAttribute.layoutAttribute]; expect([viewAttribute isEqual:otherViewAttribute]).to.equal(NO); //should return NO when the view is the same but the layoutAttribute is different otherViewAttribute = [[MASViewAttribute alloc] initWithView:viewAttribute.view layoutAttribute:NSLayoutAttributeRight]; expect([viewAttribute isEqual:otherViewAttribute]).to.equal(NO); //should return NO when the view is different and the layoutAttribute is different otherViewAttribute = [[MASViewAttribute alloc] initWithView:otherView layoutAttribute:NSLayoutAttributeRight]; expect([viewAttribute isEqual:otherViewAttribute]).to.equal(NO); //should return NO when non view attribute passed", ^{ expect([viewAttribute isEqual:NSArray.new]).to.equal(NO); } - (void)testHashing { //should return the same hash when the view and layoutAttribute are the same MASViewAttribute *otherViewAttribute = [[MASViewAttribute alloc] initWithView:viewAttribute.view layoutAttribute:viewAttribute.layoutAttribute]; expect([viewAttribute hash]).to.equal([otherViewAttribute hash]); //should return a different hash when the view is different but the layoutAttribute is the same MAS_VIEW *otherView = [MAS_VIEW new]; otherViewAttribute = [[MASViewAttribute alloc] initWithView:otherView layoutAttribute:viewAttribute.layoutAttribute]; expect([viewAttribute hash]).toNot.equal([otherViewAttribute hash]); //should return a different hash when the view is the same but the layoutAttribute is different otherViewAttribute = [[MASViewAttribute alloc] initWithView:viewAttribute.view layoutAttribute:NSLayoutAttributeRight]; expect([viewAttribute hash]).toNot.equal([otherViewAttribute hash]); //should return a different hash when the view is different and the layoutAttribute is different otherViewAttribute = [[MASViewAttribute alloc] initWithView:otherView layoutAttribute:NSLayoutAttributeRight]; expect([viewAttribute hash]).toNot.equal([otherViewAttribute hash]); } SpecEnd ================================================ FILE: Tests/Specs/MASViewConstraintSpec.m ================================================ // // MASViewConstraintSpec.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewConstraint.h" #import "MASConstraint+Private.h" #import "MASConstraint.h" #import "View+MASAdditions.h" #import "MASConstraintDelegateMock.h" #import "MASCompositeConstraint.h" @interface MASViewConstraint () @property (nonatomic, weak) MASLayoutConstraint *layoutConstraint; @property (nonatomic, assign) NSLayoutRelation layoutRelation; @property (nonatomic, assign) MASLayoutPriority layoutPriority; @property (nonatomic, assign) CGFloat layoutMultiplier; @property (nonatomic, assign) CGFloat layoutConstant; @property (nonatomic, assign) BOOL hasLayoutRelation; @end @interface MASCompositeConstraint () @property (nonatomic, strong) NSMutableArray *childConstraints; @end SpecBegin(MASViewConstraint) { MASConstraintDelegateMock *delegate; MAS_VIEW *superview; MASViewConstraint *constraint; MAS_VIEW *otherView; } - (void)setUp { superview = MAS_VIEW.new; delegate = MASConstraintDelegateMock.new; MAS_VIEW *view = MAS_VIEW.new; constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_width]; constraint.delegate = delegate; [superview addSubview:view]; otherView = MAS_VIEW.new; [superview addSubview:otherView]; } - (void)testRelationCreateEqualConstraint { MASViewAttribute *secondViewAttribute = otherView.mas_top; MASViewConstraint *newConstraint = (id)constraint.equalTo(secondViewAttribute); expect(newConstraint).to.beIdenticalTo(constraint); expect(constraint.secondViewAttribute).to.beIdenticalTo(secondViewAttribute); expect(constraint.layoutRelation).to.equal(NSLayoutRelationEqual); } - (void)testRelationCreateGreaterThanOrEqualConstraint { MASViewAttribute *secondViewAttribute = otherView.mas_top; MASViewConstraint *newConstraint = (id)constraint.greaterThanOrEqualTo(secondViewAttribute); expect(newConstraint).to.beIdenticalTo(constraint); expect(constraint.secondViewAttribute).to.beIdenticalTo(secondViewAttribute); expect(constraint.layoutRelation).to.equal(NSLayoutRelationGreaterThanOrEqual); } - (void)testRelationCreateLessThanOrEqualConstraint { MASViewAttribute *secondViewAttribute = otherView.mas_top; MASViewConstraint *newConstraint = (id)constraint.lessThanOrEqualTo(secondViewAttribute); expect(newConstraint).to.beIdenticalTo(constraint); expect(constraint.secondViewAttribute).to.beIdenticalTo(secondViewAttribute); expect(constraint.layoutRelation).to.equal(NSLayoutRelationLessThanOrEqual); } - (void)testRelationNotAllowUpdateOfEqual { MASViewAttribute *secondViewAttribute = otherView.mas_top; constraint.lessThanOrEqualTo(secondViewAttribute); expect(^{ constraint.equalTo(secondViewAttribute); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testRelationNotAllowUpdateOfLessThanOrEqual{ MASViewAttribute *secondViewAttribute = otherView.mas_top; constraint.equalTo(secondViewAttribute); expect(^{ constraint.lessThanOrEqualTo(secondViewAttribute); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testRelationNotAllowUpdateOfGreaterThanOrEqual { MASViewAttribute *secondViewAttribute = otherView.mas_top; constraint.greaterThanOrEqualTo(secondViewAttribute); expect(^{ constraint.greaterThanOrEqualTo(secondViewAttribute); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testRelationAcceptsView { MAS_VIEW *view = MAS_VIEW.new; constraint.equalTo(view); expect(constraint.secondViewAttribute.view).to.beIdenticalTo(view); expect(constraint.firstViewAttribute.layoutAttribute).to.equal(constraint.secondViewAttribute.layoutAttribute); } - (void)testRelationAcceptsNumber { constraint.equalTo(@42); expect(constraint.secondViewAttribute.view).to.beNil(); expect(constraint.layoutConstant).to.equal(42); } - (void)testRelationAcceptsValueWithCGPoint { CGPoint point = CGPointMake(10, 20); NSValue *value = [NSValue value:&point withObjCType:@encode(CGPoint)]; MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.equalTo(value); expect(centerX.layoutConstant).to.equal(10); MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.equalTo(value); expect(centerY.layoutConstant).to.equal(20); MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.equalTo(value); expect(width.layoutConstant).to.equal(0); } - (void)testRelationAcceptsValueWithCGSize { CGSize size = CGSizeMake(30, 40); NSValue *value = [NSValue value:&size withObjCType:@encode(CGSize)]; MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.equalTo(value); expect(width.layoutConstant).to.equal(30); MASViewConstraint *height = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_height]; height.equalTo(value); expect(height.layoutConstant).to.equal(40); MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.equalTo(value); expect(centerX.layoutConstant).to.equal(0); } - (void)testRelationAcceptsValueWithEdgeInsets { MASEdgeInsets insets = (MASEdgeInsets){10, 20, 30, 40}; NSValue *value = [NSValue value:&insets withObjCType:@encode(MASEdgeInsets)]; MASViewConstraint *top = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_top]; top.equalTo(value); expect(top.layoutConstant).to.equal(10); MASViewConstraint *left = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_left]; left.equalTo(value); expect(left.layoutConstant).to.equal(20); MASViewConstraint *leading = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_leading]; leading.equalTo(value); expect(leading.layoutConstant).to.equal(20); MASViewConstraint *bottom = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_bottom]; bottom.equalTo(value); expect(bottom.layoutConstant).to.equal(-30); MASViewConstraint *right = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_right]; right.equalTo(value); expect(right.layoutConstant).to.equal(-40); MASViewConstraint *trailing = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_trailing]; trailing.equalTo(value); expect(trailing.layoutConstant).to.equal(-40); MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.equalTo(value); expect(centerX.layoutConstant).to.equal(0); } - (void)testRelationCreatesCompositeWithArrayOfViews { NSArray *views = @[MAS_VIEW.new, MAS_VIEW.new, MAS_VIEW.new]; [delegate.constraints addObject:constraint]; MASCompositeConstraint *composite = (id)constraint.equalTo(views).priorityMedium().offset(-10); expect(delegate.constraints).to.haveCountOf(1); expect(delegate.constraints[0]).to.beKindOf(MASCompositeConstraint.class); for (MASViewConstraint *childConstraint in composite.childConstraints) { NSUInteger index = [composite.childConstraints indexOfObject:childConstraint]; expect(childConstraint.secondViewAttribute.view).to.beIdenticalTo((MAS_VIEW *)views[index]); expect(childConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); expect(childConstraint.secondViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); expect(childConstraint.layoutPriority).to.equal(MASLayoutPriorityDefaultMedium); expect(childConstraint.layoutConstant).to.equal(-10); } } - (void)testRelationCreatesCompositeWithArrayOfAttributes { NSArray *viewAttributes = @[MAS_VIEW.new.mas_height, MAS_VIEW.new.mas_left]; [delegate.constraints addObject:constraint]; MASCompositeConstraint *composite = (id)constraint.equalTo(viewAttributes).priority(60).offset(10); expect(delegate.constraints).to.haveCountOf(1); expect(delegate.constraints[0]).to.beKindOf(MASCompositeConstraint.class); for (MASViewConstraint *childConstraint in composite.childConstraints) { NSUInteger index = [composite.childConstraints indexOfObject:childConstraint]; expect(childConstraint.secondViewAttribute.view).to.beIdenticalTo([viewAttributes[index] view]); expect(childConstraint.firstViewAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); expect(childConstraint.secondViewAttribute.layoutAttribute).to.equal([viewAttributes[index] layoutAttribute]); expect(childConstraint.layoutPriority).to.equal(60); expect(childConstraint.layoutConstant).to.equal(10); } } - (void)testRelationComplainsWithUnsupportedArgument { expect(^{ constraint.equalTo(@{}); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testRelationAcceptsAutoboxedScalar { constraint.mas_equalTo(42); expect(constraint.layoutConstant).to.equal(42); } - (void)testRelationAcceptsAutoboxedCGPoint { MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.mas_equalTo(CGPointMake(10, 20)); expect(centerX.layoutConstant).to.equal(10); MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.mas_equalTo(CGPointMake(10, 20)); expect(centerY.layoutConstant).to.equal(20); } - (void)testRelationAcceptsAutoboxedCGSize { MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.mas_equalTo(CGSizeMake(30, 40)); expect(width.layoutConstant).to.equal(30); MASViewConstraint *height = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_height]; height.mas_equalTo(CGSizeMake(30, 40)); expect(height.layoutConstant).to.equal(40); } - (void)testRelationAcceptsAutoboxedEdgeInsets { MASEdgeInsets insets = (MASEdgeInsets){10, 20, 30, 40}; MASViewConstraint *top = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_top]; top.mas_equalTo(insets); expect(top.layoutConstant).to.equal(10); MASViewConstraint *left = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_left]; left.mas_equalTo(insets); expect(left.layoutConstant).to.equal(20); MASViewConstraint *bottom = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_bottom]; bottom.mas_equalTo(insets); expect(bottom.layoutConstant).to.equal(-30); MASViewConstraint *right = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_right]; right.mas_equalTo(insets); expect(right.layoutConstant).to.equal(-40); } - (void)testRelationAutoboxingComplainsWithUnsupportedArgument { expect(^{ constraint.mas_equalTo(@{}); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testPriorityHigh { constraint.equalTo(otherView); constraint.with.priorityHigh(); [constraint install]; expect(constraint.layoutPriority).to.equal(MASLayoutPriorityDefaultHigh); expect(constraint.layoutConstraint.priority).to.equal(MASLayoutPriorityDefaultHigh); } - (void)testPriorityLow { constraint.equalTo(otherView); constraint.with.priorityLow(); [constraint install]; expect(constraint.layoutPriority).to.equal(MASLayoutPriorityDefaultLow); expect(constraint.layoutConstraint.priority).to.equal(MASLayoutPriorityDefaultLow); } - (void)testPriorityMedium { constraint.equalTo(otherView); constraint.with.priorityMedium(); [constraint install]; expect(constraint.layoutPriority).to.equal(MASLayoutPriorityDefaultMedium); expect(constraint.layoutConstraint.priority).to.equal(MASLayoutPriorityDefaultMedium); } - (void)testMultiplierNotUpdate { [constraint install]; expect(^{ constraint.multipliedBy(0.9); }).to.raise(@"NSInternalInconsistencyException"); } - (void)testMultiplierWithMultipliedBy { constraint.equalTo(otherView); constraint.multipliedBy(5); [constraint install]; expect(constraint.layoutMultiplier).to.equal(5); expect(constraint.layoutConstraint.multiplier).to.equal(5); } - (void)testMultiplierWithDividedBy { constraint.equalTo(otherView); constraint.dividedBy(10); [constraint install]; expect(constraint.layoutMultiplier).to.equal(0.1); expect(constraint.layoutConstraint.multiplier).to.beCloseTo(0.1); } - (void)testConstantUpdateAfterConstraintCreated { [constraint install]; constraint.offset(10); expect(constraint.layoutConstant).to.equal(10); expect(constraint.layoutConstraint.constant).to.equal(10); } - (void)testConstantUpdateSidesOffset { MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.with.insets((MASEdgeInsets){10, 10, 10, 10}); expect(centerY.layoutConstant).to.equal(0); MASViewConstraint *top = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_top]; top.insets((MASEdgeInsets){15, 10, 10, 10}); expect(top.layoutConstant).to.equal(15); MASViewConstraint *left = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_left]; left.insets((MASEdgeInsets){10, 15, 10, 10}); expect(left.layoutConstant).to.equal(15); MASViewConstraint *bottom = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_bottom]; bottom.insets((MASEdgeInsets){10, 10, 15, 10}); expect(bottom.layoutConstant).to.equal(-15); MASViewConstraint *right = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_right]; right.insets((MASEdgeInsets){10, 10, 10, 15}); expect(right.layoutConstant).to.equal(-15); } - (void)testConstantUpdateCenterOffsetOnly { MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.centerOffset(CGPointMake(-20, -10)); expect(width.layoutConstant).to.equal(0); MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.centerOffset(CGPointMake(-20, -10)); expect(centerX.layoutConstant).to.equal(-20); MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.centerOffset(CGPointMake(-20, -10)); expect(centerY.layoutConstant).to.equal(-10); } - (void)testConstantUpdateSizeOffsetOnly { MASViewConstraint *bottom = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_bottom]; bottom.sizeOffset(CGSizeMake(-40, 55)); expect(bottom.layoutConstant).to.equal(0); MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.sizeOffset(CGSizeMake(-40, 55)); expect(width.layoutConstant).to.equal(-40); MASViewConstraint *height = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_height]; height.sizeOffset(CGSizeMake(-40, 55)); expect(height.layoutConstant).to.equal(55); } - (void)testAutoboxedConstantUpdateOffset { constraint.mas_offset(42); expect(constraint.layoutConstant).to.equal(42); } - (void)testAutoboxedConstantUpdateSidesOffset { MASEdgeInsets insets = (MASEdgeInsets){10, 20, 30, 40}; MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.mas_offset(insets); expect(centerY.layoutConstant).to.equal(0); MASViewConstraint *top = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_top]; top.mas_offset(insets); expect(top.layoutConstant).to.equal(10); MASViewConstraint *left = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_left]; left.mas_offset(insets); expect(left.layoutConstant).to.equal(20); MASViewConstraint *bottom = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_bottom]; bottom.mas_offset(insets); expect(bottom.layoutConstant).to.equal(-30); MASViewConstraint *right = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_right]; right.mas_offset(insets); expect(right.layoutConstant).to.equal(-40); } - (void)testAutoboxedConstantUpdateCenterOffset { MASViewConstraint *centerX = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerX]; centerX.mas_offset(CGPointMake(-20, -10)); expect(centerX.layoutConstant).to.equal(-20); MASViewConstraint *centerY = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_centerY]; centerY.mas_offset(CGPointMake(-20, -10)); expect(centerY.layoutConstant).to.equal(-10); } - (void)testAutoboxedConstantUpdateSizeOffset { MASViewConstraint *width = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_width]; width.mas_offset(CGSizeMake(-40, 55)); expect(width.layoutConstant).to.equal(-40); MASViewConstraint *height = [[MASViewConstraint alloc] initWithFirstViewAttribute:otherView.mas_height]; height.mas_offset(CGSizeMake(-40, 55)); expect(height.layoutConstant).to.equal(55); } - (void)testInstallLayoutConstraintOnCommit { MASViewAttribute *secondViewAttribute = otherView.mas_height; constraint.equalTo(secondViewAttribute); constraint.multipliedBy(0.5); constraint.offset(10); constraint.priority(345); [constraint install]; expect(constraint.layoutConstraint.firstAttribute).to.equal(NSLayoutAttributeWidth); expect(constraint.layoutConstraint.secondAttribute).to.equal(NSLayoutAttributeHeight); expect(constraint.layoutConstraint.firstItem).to.beIdenticalTo(constraint.firstViewAttribute.view); expect(constraint.layoutConstraint.secondItem).to.beIdenticalTo(constraint.secondViewAttribute.view); expect(constraint.layoutConstraint.relation).to.equal(NSLayoutRelationEqual); expect(constraint.layoutConstraint.constant).to.equal(10); expect(constraint.layoutConstraint.priority).to.equal(345); expect(constraint.layoutConstraint.multiplier).to.equal(0.5); expect(superview.constraints[0]).to.beIdenticalTo(constraint.layoutConstraint); } - (void)testInstallRelativeToSuperview { MAS_VIEW *view = MAS_VIEW.new; constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:view.mas_baseline]; constraint.delegate = delegate; [superview addSubview:view]; constraint.equalTo(@10); [constraint install]; expect(constraint.layoutConstraint.firstAttribute).to.equal(NSLayoutAttributeBaseline); expect(constraint.layoutConstraint.secondAttribute).to.equal(NSLayoutAttributeBaseline); expect(constraint.layoutConstraint.firstItem).to.beIdenticalTo(constraint.firstViewAttribute.view); expect(constraint.layoutConstraint.secondItem).to.beIdenticalTo(superview); expect(constraint.layoutConstraint.relation).to.equal(NSLayoutRelationEqual); expect(constraint.layoutConstraint.constant).to.equal(10); expect(superview.constraints[0]).to.beIdenticalTo(constraint.layoutConstraint); } - (void)testInstallWidthAsConstant { constraint.equalTo(@10); [constraint install]; expect(constraint.layoutConstraint.firstAttribute).to.equal(NSLayoutAttributeWidth); expect(constraint.layoutConstraint.secondAttribute).to.equal(NSLayoutAttributeNotAnAttribute); expect(constraint.layoutConstraint.firstItem).to.beIdenticalTo(constraint.firstViewAttribute.view); expect(constraint.layoutConstraint.secondItem).to.beNil(); expect(constraint.layoutConstraint.relation).to.equal(NSLayoutRelationEqual); expect(constraint.layoutConstraint.constant).to.equal(10); expect(constraint.firstViewAttribute.view.constraints[0]).to.beIdenticalTo(constraint.layoutConstraint); } - (void)testUninstallConstraint { MASViewAttribute *secondViewAttribute = otherView.mas_height; constraint.equalTo(secondViewAttribute); [constraint install]; expect(superview.constraints).to.haveCountOf(1); expect(superview.constraints[0]).to.equal(constraint.layoutConstraint); [constraint uninstall]; expect(superview.constraints).to.haveCountOf(0); } - (void)testAttributeChainingShouldNotHaveRelation { MASViewAttribute *secondViewAttribute = otherView.mas_top; constraint.lessThanOrEqualTo(secondViewAttribute); expect(^{ __unused id result = constraint.bottom; }).to.raise(@"NSInternalInconsistencyException"); } - (void)testAttributeChainingShouldCallDelegate { MASViewConstraint *result = (id)constraint.and.bottom; expect(result.firstViewAttribute.layoutAttribute).to.equal(@(NSLayoutAttributeBottom)); expect(delegate.chainedConstraints).to.equal(@[constraint]); } SpecEnd ================================================ FILE: Tests/Specs/NSArray+MASAdditionsSpec.m ================================================ // // NSArray+MASAdditionsSpec.m // Masonry // // Created by Daniel Hammond on 11/26/13. // #import "NSArray+MASAdditions.h" #import "MASViewConstraint.h" SpecBegin(NSArray_MASAdditions) - (void)testShouldFailWhenArrayContainsNonViews { NSArray *array = @[ MAS_VIEW.new, [NSObject new] ]; expect(^{ [array mas_makeConstraints:^(MASConstraintMaker *make) {}]; }).to.raise(@"NSInternalInconsistencyException"); } - (void)testShouldCreateConstraintsForEachView { MAS_VIEW *superView = MAS_VIEW.new; MAS_VIEW *subject1 = MAS_VIEW.new; [superView addSubview:subject1]; MAS_VIEW *subject2 = MAS_VIEW.new; [superView addSubview:subject2]; NSArray *views = @[ subject1, subject2 ]; NSArray *constraints = [views mas_makeConstraints:^(MASConstraintMaker *make) { expect(make.updateExisting).to.beFalsy(); make.width.equalTo(superView); }]; expect(constraints).to.haveCountOf(views.count); for (MASViewConstraint *constraint in constraints) { MASViewAttribute *firstAttribute = [constraint firstViewAttribute]; expect([views indexOfObject:firstAttribute.view]).toNot.equal(NSNotFound); expect(firstAttribute.layoutAttribute).to.equal(NSLayoutAttributeWidth); MASViewAttribute *second = [constraint secondViewAttribute]; expect(second.view).to.equal(superView); expect(second.layoutAttribute).to.equal(NSLayoutAttributeWidth); } } - (void)testShouldSetUpdateExistingForArray { NSArray *views = @[ MAS_VIEW.new ]; [views mas_updateConstraints:^(MASConstraintMaker *make) { expect(make.updateExisting).to.beTruthy(); }]; } - (void)testShouldSetRemoveExistingForArray { NSArray *views = @[ MAS_VIEW.new ]; [views mas_remakeConstraints:^(MASConstraintMaker *make) { expect(make.removeExisting).to.beTruthy(); }]; } - (void)testDistributeViewsWithFixedSpacingShouldFailWhenArrayContainsLessTwoViews { MAS_VIEW *superView = MAS_VIEW.new; MAS_VIEW *subject1 = MAS_VIEW.new; [superView addSubview:subject1]; MAS_VIEW *subject2 = MAS_VIEW.new; [superView addSubview:subject2]; NSArray *views = @[ subject1]; expect(^{ [views mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedSpacing:10.0 leadSpacing:5.0 tailSpacing:5.0]; }).to.raiseAny(); } - (void)testDistributeViewsWithFixedItemLengthShouldFailWhenArrayContainsLessTwoViews { MAS_VIEW *superView = MAS_VIEW.new; MAS_VIEW *subject1 = MAS_VIEW.new; [superView addSubview:subject1]; MAS_VIEW *subject2 = MAS_VIEW.new; [superView addSubview:subject2]; NSArray *views = @[ subject1]; expect(^{ [views mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedItemLength:10.0 leadSpacing:5.0 tailSpacing:5.0]; }).to.raiseAny(); } - (void)testDistributeViewsWithFixedSpacingShouldHaveCorrectNumberOfConstraints { MAS_VIEW *superView = MAS_VIEW.new; MAS_VIEW *subject1 = MAS_VIEW.new; [superView addSubview:subject1]; MAS_VIEW *subject2 = MAS_VIEW.new; [superView addSubview:subject2]; MAS_VIEW *subject3 = MAS_VIEW.new; [superView addSubview:subject3]; NSArray *views = @[ subject1,subject2,subject3 ]; [views mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedSpacing:10.0 leadSpacing:5.0 tailSpacing:5.0]; //left view NSArray *arr1 = [MASViewConstraint installedConstraintsForView:subject1]; expect(arr1).to.haveCountOf(1); //middle view NSArray *arr2 = [MASViewConstraint installedConstraintsForView:subject2]; expect(arr2).to.haveCountOf(2); //right view NSArray *arr3 = [MASViewConstraint installedConstraintsForView:subject3]; expect(arr3).to.haveCountOf(3); } - (void)testDistributeViewsWithFixedItemLengthShouldHaveCorrectNumberOfConstraints { MAS_VIEW *superView = MAS_VIEW.new; MAS_VIEW *subject1 = MAS_VIEW.new; [superView addSubview:subject1]; MAS_VIEW *subject2 = MAS_VIEW.new; [superView addSubview:subject2]; MAS_VIEW *subject3 = MAS_VIEW.new; [superView addSubview:subject3]; NSArray *views = @[ subject1,subject2,subject3 ]; [views mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedItemLength:30.0 leadSpacing:5.0 tailSpacing:5.0]; //left view NSArray *arr1 = [MASViewConstraint installedConstraintsForView:subject1]; expect(arr1).to.haveCountOf(2); //middle view NSArray *arr2 = [MASViewConstraint installedConstraintsForView:subject2]; expect(arr2).to.haveCountOf(2); //right view NSArray *arr3 = [MASViewConstraint installedConstraintsForView:subject3]; expect(arr3).to.haveCountOf(2); } SpecEnd ================================================ FILE: Tests/Specs/NSLayoutConstraint+MASDebugAdditionsSpec.m ================================================ // // NSLayoutConstraint+MASDebugAdditionsSpec.m // Masonry // // Created by Jonas Budelmann on 8/09/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "NSLayoutConstraint+MASDebugAdditions.h" #import "View+MASAdditions.h" #import "MASLayoutConstraint.h" #import "MASCompositeConstraint.h" #import "MASViewConstraint.h" SpecBegin(NSLayoutConstraint_MASDebugAdditions) - (void)testDisplayViewKey { MAS_VIEW *newView = MAS_VIEW.new; newView.mas_key = @"newView"; MASLayoutConstraint *layoutConstraint = [MASLayoutConstraint constraintWithItem:newView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:300]; layoutConstraint.priority = MASLayoutPriorityDefaultLow; NSString *description = [NSString stringWithFormat:@"= 300 ^low>", layoutConstraint, MAS_VIEW.class]; expect([layoutConstraint description]).to.equal(description); } - (void)testDisplayLayoutConstraintKey { MAS_VIEW *newView1 = MAS_VIEW.new; newView1.mas_key = @"newView1"; MAS_VIEW *newView2 = MAS_VIEW.new; newView2.mas_key = @"newView2"; MASLayoutConstraint *layoutConstraint = [MASLayoutConstraint constraintWithItem:newView1 attribute:NSLayoutAttributeBaseline relatedBy:NSLayoutRelationEqual toItem:newView2 attribute:NSLayoutAttributeTop multiplier:2 constant:300]; layoutConstraint.mas_key = @"helloConstraint"; NSString *description = [NSString stringWithFormat:@"", MAS_VIEW.class, MAS_VIEW.class]; expect([layoutConstraint description]).to.equal(description); } - (void)testDisplayConstraintKey { MAS_VIEW *superview = MAS_VIEW.new; MAS_VIEW *newView1 = MAS_VIEW.new; newView1.mas_key = @"newView1"; MAS_VIEW *newView2 = MAS_VIEW.new; newView2.mas_key = @"newView2"; [superview addSubview:newView1]; [superview addSubview:newView2]; [newView1 mas_makeConstraints:^(MASConstraintMaker *make) { make.left.greaterThanOrEqualTo(@[newView2, @10]).key(@"left"); }]; NSString *description = [NSString stringWithFormat:@"= %@:newView2.left>", MAS_VIEW.class, MAS_VIEW.class]; expect([superview.constraints[0] description]).to.equal(description); } SpecEnd ================================================ FILE: Tests/Specs/View+MASAdditionsSpec.m ================================================ // // View+MASAdditionsSpec.m // Masonry // // Created by Jonas Budelmann on 8/09/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "View+MASAdditions.h" SpecBegin(View_MASAdditions) - (void)testSetTranslatesAutoresizingMaskIntoConstraints { MAS_VIEW *newView = MAS_VIEW.new; [newView mas_makeConstraints:^(MASConstraintMaker *make) { expect(make.updateExisting).to.beFalsy(); }]; expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy(); } - (void)testSetUpdateExisting { MAS_VIEW *newView = MAS_VIEW.new; [newView mas_updateConstraints:^(MASConstraintMaker *make) { expect(make.updateExisting).to.beTruthy(); }]; expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy(); } - (void)testSetRemoveExisting { MAS_VIEW *newView = MAS_VIEW.new; [newView mas_remakeConstraints:^(MASConstraintMaker *make) { expect(make.removeExisting).to.beTruthy(); }]; expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy(); } SpecEnd ================================================ FILE: Tests/Specs/ViewController+MASAdditionsSpec.m ================================================ // // ViewController+MASAdditionsSpec.m // Masonry // // Created by Craig Siemens on 2015-06-23. // // #import "ViewController+MASAdditions.h" #import "View+MASAdditions.h" SpecBegin(ViewController_MASAdditions) - (void)testLayoutGuideConstraints { #ifdef MAS_VIEW_CONTROLLER MAS_VIEW_CONTROLLER *vc = [MAS_VIEW_CONTROLLER new]; MAS_VIEW *view = [MAS_VIEW new]; [vc.view addSubview:view]; [view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(vc.mas_topLayoutGuide); make.bottom.equalTo(vc.mas_bottomLayoutGuide); }]; expect(vc.view.constraints).to.haveCountOf(6); #endif } SpecEnd ================================================ FILE: Tests/XCTest+Spec.h ================================================ // // Spec.h // ClassyTests // // Created by Jonas Budelmann on 18/10/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import #import // declare XCTestCase subclass interface and implementation #define SpecBegin(name) \ @interface name##Spec : XCTestCase @end \ @implementation name##Spec // close XCTestCase #define SpecEnd \ @end ================================================ FILE: script/coveralls.sh ================================================ #!/bin/bash source script/env.sh declare -r gcov_dir="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}/" ## ====== generateGcov() { # doesn't set output dir to gcov... cd "${gcov_dir}" for file in ${gcov_dir}/*.gcda do gcov-4.2 "${file}" -o "${gcov_dir}" done cd - } copyGcovToProjectDir() { cp -r "${gcov_dir}" gcov } removeGcov() { rm -r gcov } main() { # generate + copy generateGcov copyGcovToProjectDir # post coveralls ${@+"$@"} # clean up removeGcov } main ${@+"$@"} ================================================ FILE: script/exportenv.sh ================================================ export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > script/env.sh