diff --git a/Example/MFControlLibrary.xcodeproj/project.pbxproj b/Example/MFControlLibrary.xcodeproj/project.pbxproj index ba99c72..f6c8623 100644 --- a/Example/MFControlLibrary.xcodeproj/project.pbxproj +++ b/Example/MFControlLibrary.xcodeproj/project.pbxproj @@ -8,7 +8,11 @@ /* Begin PBXBuildFile section */ 1628AD7595EBC20F57516CEC /* Pods_MFControlLibrary_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0486D3D6BD994384236D47EE /* Pods_MFControlLibrary_Tests.framework */; }; - 590362AC20B817096986CBB0 /* Pods_MFControlLibrary_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E93350AAE811273C61269D /* Pods_MFControlLibrary_Example.framework */; }; + 374945C71F1089EC006F5A52 /* MFBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 374945C61F1089EC006F5A52 /* MFBaseViewController.m */; }; + 374945CA1F108A0E006F5A52 /* MFBaseNavigationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 374945C91F108A0E006F5A52 /* MFBaseNavigationViewController.m */; }; + 374945CD1F108A91006F5A52 /* MFMutableAttributedStringViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 374945CC1F108A91006F5A52 /* MFMutableAttributedStringViewController.m */; }; + 3770CA2B1F13B70800E9D726 /* MFAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3770CA2A1F13B70800E9D726 /* MFAlertViewController.m */; }; + 37C5239B1F171934009828C6 /* MFControlLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37C5239A1F171934009828C6 /* MFControlLibrary.framework */; }; 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; @@ -24,6 +28,7 @@ 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; + 9F88394ED4BDDD619FDAA0B8 /* Pods_MFControlLibrary_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E93350AAE811273C61269D /* Pods_MFControlLibrary_Example.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -38,9 +43,19 @@ /* Begin PBXFileReference section */ 0486D3D6BD994384236D47EE /* Pods_MFControlLibrary_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MFControlLibrary_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0A05F13FA56940D3F007DDFA /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = ""; }; - 29E0034035D6BF49768B7803 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 0A05F13FA56940D3F007DDFA /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 29E0034035D6BF49768B7803 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 34E93350AAE811273C61269D /* Pods_MFControlLibrary_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MFControlLibrary_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 374945C51F1089EC006F5A52 /* MFBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFBaseViewController.h; sourceTree = ""; }; + 374945C61F1089EC006F5A52 /* MFBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFBaseViewController.m; sourceTree = ""; }; + 374945C81F108A0E006F5A52 /* MFBaseNavigationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFBaseNavigationViewController.h; sourceTree = ""; }; + 374945C91F108A0E006F5A52 /* MFBaseNavigationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFBaseNavigationViewController.m; sourceTree = ""; }; + 374945CB1F108A91006F5A52 /* MFMutableAttributedStringViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFMutableAttributedStringViewController.h; sourceTree = ""; }; + 374945CC1F108A91006F5A52 /* MFMutableAttributedStringViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFMutableAttributedStringViewController.m; sourceTree = ""; }; + 3770CA291F13B70800E9D726 /* MFAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFAlertViewController.h; sourceTree = ""; }; + 3770CA2A1F13B70800E9D726 /* MFAlertViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFAlertViewController.m; sourceTree = ""; }; + 37C523981F171920009828C6 /* Pods_MFControlLibrary_Tests.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pods_MFControlLibrary_Tests.framework; path = "Pods/../build/Debug-iphoneos/Pods_MFControlLibrary_Tests.framework"; sourceTree = ""; }; + 37C5239A1F171934009828C6 /* MFControlLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MFControlLibrary.framework; path = "Pods/../build/Debug-iphoneos/MFControlLibrary/MFControlLibrary.framework"; sourceTree = ""; }; 6003F58A195388D20070C39A /* MFControlLibrary_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MFControlLibrary_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -66,7 +81,7 @@ AE8D26FB70E0FBB9374403ED /* Pods-MFControlLibrary_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MFControlLibrary_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.debug.xcconfig"; sourceTree = ""; }; B1690C9FDBA7DF8AEC6F7A3B /* Pods-MFControlLibrary_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MFControlLibrary_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.debug.xcconfig"; sourceTree = ""; }; C390D9561050A454CDD32A72 /* Pods-MFControlLibrary_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MFControlLibrary_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.release.xcconfig"; sourceTree = ""; }; - E42C25EE166BF4D602E699CB /* MFControlLibrary.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = MFControlLibrary.podspec; path = ../MFControlLibrary.podspec; sourceTree = ""; }; + E42C25EE166BF4D602E699CB /* MFControlLibrary.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = MFControlLibrary.podspec; path = ../MFControlLibrary.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,10 +89,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 37C5239B1F171934009828C6 /* MFControlLibrary.framework in Frameworks */, 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - 590362AC20B817096986CBB0 /* Pods_MFControlLibrary_Example.framework in Frameworks */, + 9F88394ED4BDDD619FDAA0B8 /* Pods_MFControlLibrary_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,6 +122,21 @@ name = Pods; sourceTree = ""; }; + 374945C41F1089D7006F5A52 /* ViewController */ = { + isa = PBXGroup; + children = ( + 374945C51F1089EC006F5A52 /* MFBaseViewController.h */, + 374945C61F1089EC006F5A52 /* MFBaseViewController.m */, + 374945C81F108A0E006F5A52 /* MFBaseNavigationViewController.h */, + 374945C91F108A0E006F5A52 /* MFBaseNavigationViewController.m */, + 374945CB1F108A91006F5A52 /* MFMutableAttributedStringViewController.h */, + 374945CC1F108A91006F5A52 /* MFMutableAttributedStringViewController.m */, + 3770CA291F13B70800E9D726 /* MFAlertViewController.h */, + 3770CA2A1F13B70800E9D726 /* MFAlertViewController.m */, + ); + path = ViewController; + sourceTree = ""; + }; 6003F581195388D10070C39A = { isa = PBXGroup; children = ( @@ -130,6 +161,8 @@ 6003F58C195388D20070C39A /* Frameworks */ = { isa = PBXGroup; children = ( + 37C5239A1F171934009828C6 /* MFControlLibrary.framework */, + 37C523981F171920009828C6 /* Pods_MFControlLibrary_Tests.framework */, 6003F58D195388D20070C39A /* Foundation.framework */, 6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F591195388D20070C39A /* UIKit.framework */, @@ -148,6 +181,7 @@ 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 6003F5A5195388D20070C39A /* MFViewController.h */, 6003F5A6195388D20070C39A /* MFViewController.m */, + 374945C41F1089D7006F5A52 /* ViewController */, 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 6003F5A8195388D20070C39A /* Images.xcassets */, 6003F594195388D20070C39A /* Supporting Files */, @@ -303,13 +337,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MFControlLibrary_Example-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"; + 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; }; 79E8665D00361165690776ED /* [CP] Check Pods Manifest.lock */ = { @@ -318,13 +355,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MFControlLibrary_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"; + 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; }; B5A9943965560F4661A98ED9 /* [CP] Copy Pods Resources */ = { @@ -348,9 +388,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/MFControlLibrary/MFControlLibrary.framework", + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MFControlLibrary.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -378,9 +423,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -395,7 +443,11 @@ buildActionMask = 2147483647; files = ( 6003F59E195388D20070C39A /* MFAppDelegate.m in Sources */, + 374945CA1F108A0E006F5A52 /* MFBaseNavigationViewController.m in Sources */, 6003F5A7195388D20070C39A /* MFViewController.m in Sources */, + 3770CA2B1F13B70800E9D726 /* MFAlertViewController.m in Sources */, + 374945CD1F108A91006F5A52 /* MFMutableAttributedStringViewController.m in Sources */, + 374945C71F1089EC006F5A52 /* MFBaseViewController.m in Sources */, 6003F59A195388D20070C39A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -524,6 +576,11 @@ baseConfigurationReference = AE8D26FB70E0FBB9374403ED /* Pods-MFControlLibrary_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/build/Debug-iphoneos", + "$(PROJECT_DIR)/build/Debug-iphoneos/MFControlLibrary", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MFControlLibrary/MFControlLibrary-Prefix.pch"; INFOPLIST_FILE = "MFControlLibrary/MFControlLibrary-Info.plist"; @@ -539,6 +596,11 @@ baseConfigurationReference = AB1027830E14F7B650296039 /* Pods-MFControlLibrary_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/build/Debug-iphoneos", + "$(PROJECT_DIR)/build/Debug-iphoneos/MFControlLibrary", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MFControlLibrary/MFControlLibrary-Prefix.pch"; INFOPLIST_FILE = "MFControlLibrary/MFControlLibrary-Info.plist"; diff --git a/Example/MFControlLibrary/Base.lproj/Main.storyboard b/Example/MFControlLibrary/Base.lproj/Main.storyboard index b3b12cc..ff2bd58 100644 --- a/Example/MFControlLibrary/Base.lproj/Main.storyboard +++ b/Example/MFControlLibrary/Base.lproj/Main.storyboard @@ -1,8 +1,12 @@ - - + + + + + - + + @@ -14,14 +18,34 @@ - + - + + - + + + + + + + + + + + + + + + + + + + + diff --git a/Example/MFControlLibrary/MFAppDelegate.m b/Example/MFControlLibrary/MFAppDelegate.m index d59b637..93dd2d3 100644 --- a/Example/MFControlLibrary/MFAppDelegate.m +++ b/Example/MFControlLibrary/MFAppDelegate.m @@ -8,11 +8,22 @@ #import "MFAppDelegate.h" +//#import + +#import + +//#import + +//#import + +//could not build module @implementation MFAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. + + MFAlterView *a = nil; return YES; } diff --git a/Example/MFControlLibrary/MFViewController.m b/Example/MFControlLibrary/MFViewController.m index d97402d..c5afe34 100644 --- a/Example/MFControlLibrary/MFViewController.m +++ b/Example/MFControlLibrary/MFViewController.m @@ -8,7 +8,16 @@ #import "MFViewController.h" -@interface MFViewController () +#import "MFMutableAttributedStringViewController.h" +#import "MFAlertViewController.h" + +@interface MFViewController () + +@property (nonatomic, strong) UITableView *tableView; +@property (nonatomic, copy) NSArray *titleArray; +@property (nonatomic, copy) NSArray *classArray; + +@property (nonatomic, copy) NSArray *> *demoInfoArray; @end @@ -17,13 +26,63 @@ @implementation MFViewController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. + + self.demoInfoArray = @[ + @{@"富文本展示": [MFMutableAttributedStringViewController class]}, + @{@"提示框": [MFAlertViewController class]} + ]; + + [self.view addSubview:self.tableView]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. +} + +#pragma mark - getter + +- (UITableView *)tableView +{ + if (_tableView == nil) { + _tableView = [[UITableView alloc] init]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.tableFooterView = [[UIView alloc] init]; + _tableView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 64); + } + return _tableView; +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.demoInfoArray.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString * cellIdentifier = @"cell"; + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; + } + if (indexPath.row < self.demoInfoArray.count) { + cell.textLabel.text = [[self.demoInfoArray[indexPath.row] allKeys] firstObject]; + } + return cell; +} + +#pragma mark - UITableViewDelegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + if (indexPath.row < self.demoInfoArray.count) { + Class class = [[self.demoInfoArray[indexPath.row] allValues] firstObject]; + [self.navigationController pushViewController:[[class alloc] init] animated:YES]; + } } @end diff --git a/Example/MFControlLibrary/ViewController/MFAlertViewController.h b/Example/MFControlLibrary/ViewController/MFAlertViewController.h new file mode 100644 index 0000000..8e087b0 --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFAlertViewController.h @@ -0,0 +1,13 @@ +// +// MFAlertViewController.h +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/10. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFBaseViewController.h" + +@interface MFAlertViewController : MFBaseViewController + +@end diff --git a/Example/MFControlLibrary/ViewController/MFAlertViewController.m b/Example/MFControlLibrary/ViewController/MFAlertViewController.m new file mode 100644 index 0000000..ef6fb1a --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFAlertViewController.m @@ -0,0 +1,43 @@ +// +// MFAlertViewController.m +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/10. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFAlertViewController.h" + +#import + +@interface MFAlertViewController () + +@end + +@implementation MFAlertViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.backgroundColor = [UIColor redColor]; + button.frame = CGRectMake(20, (self.view.bounds.size.height - 50 - 64) / 2 - 64, self.view.bounds.size.width - 40, 50); + [button setTitle:@"警告框" forState:UIControlStateNormal]; + [button addTarget:self action:@selector(present) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:button]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + +#pragma mark - button menthod + +- (void)present +{ + [MFAlterView showAlertWithTitle:@"确定取消?" message:@"订单金额巨大,请慎重" buttonTitleArray:@[@"确定", @"取消"] handler:^(NSInteger index) { + NSLog(@"index = %ld", (long)index); + }]; +} + +@end diff --git a/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.h b/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.h new file mode 100644 index 0000000..dfa501e --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.h @@ -0,0 +1,13 @@ +// +// MFBaseNavigationViewController.h +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import + +@interface MFBaseNavigationViewController : UINavigationController + +@end diff --git a/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.m b/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.m new file mode 100644 index 0000000..23978a8 --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFBaseNavigationViewController.m @@ -0,0 +1,37 @@ +// +// MFBaseNavigationViewController.m +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFBaseNavigationViewController.h" + +@interface MFBaseNavigationViewController () + +@end + +@implementation MFBaseNavigationViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Example/MFControlLibrary/ViewController/MFBaseViewController.h b/Example/MFControlLibrary/ViewController/MFBaseViewController.h new file mode 100644 index 0000000..3b54820 --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFBaseViewController.h @@ -0,0 +1,13 @@ +// +// MFBaseViewController.h +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import + +@interface MFBaseViewController : UIViewController + +@end diff --git a/Example/MFControlLibrary/ViewController/MFBaseViewController.m b/Example/MFControlLibrary/ViewController/MFBaseViewController.m new file mode 100644 index 0000000..240caa8 --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFBaseViewController.m @@ -0,0 +1,38 @@ +// +// MFBaseViewController.m +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFBaseViewController.h" + +@interface MFBaseViewController () + +@end + +@implementation MFBaseViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.h b/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.h new file mode 100644 index 0000000..f60504f --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.h @@ -0,0 +1,13 @@ +// +// MFMutableAttributedStringViewController.h +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFBaseViewController.h" + +@interface MFMutableAttributedStringViewController : MFBaseViewController + +@end diff --git a/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.m b/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.m new file mode 100644 index 0000000..1a8b6b8 --- /dev/null +++ b/Example/MFControlLibrary/ViewController/MFMutableAttributedStringViewController.m @@ -0,0 +1,37 @@ +// +// MFMutableAttributedStringViewController.m +// MFControlLibrary +// +// Created by XuMengFan on 2017/7/8. +// Copyright © 2017年 953950782@qq.com. All rights reserved. +// + +#import "MFMutableAttributedStringViewController.h" + +@interface MFMutableAttributedStringViewController () + +@end + +@implementation MFMutableAttributedStringViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Example/Podfile b/Example/Podfile index de93b25..dae404f 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -6,6 +6,7 @@ target 'MFControlLibrary_Example' do target 'MFControlLibrary_Tests' do inherit! :search_paths - + pod 'Masonry' + end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 8b27fa0..ed49c9a 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,7 +1,10 @@ PODS: - - MFControlLibrary (0.1.0) + - Masonry (1.0.2) + - MFControlLibrary (0.1.0): + - Masonry DEPENDENCIES: + - Masonry - MFControlLibrary (from `../`) EXTERNAL SOURCES: @@ -9,8 +12,9 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - MFControlLibrary: 5dd5e23fe0c1c6dbf29052cffa71c3e229804065 + Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e + MFControlLibrary: a49519bf2a6d0103425f7d558224deff2a7669b5 -PODFILE CHECKSUM: 4675a43a0ac60727052b211b45f8efff1a5e9039 +PODFILE CHECKSUM: 666205d379d624f147424f9ca7698c18c2aa2049 -COCOAPODS: 1.2.1 +COCOAPODS: 1.3.1 diff --git a/Example/Pods/Local Podspecs/MFControlLibrary.podspec.json b/Example/Pods/Local Podspecs/MFControlLibrary.podspec.json index 65ea04b..0441e71 100644 --- a/Example/Pods/Local Podspecs/MFControlLibrary.podspec.json +++ b/Example/Pods/Local Podspecs/MFControlLibrary.podspec.json @@ -1,15 +1,15 @@ { "name": "MFControlLibrary", "version": "0.1.0", - "summary": "A short description of MFControlLibrary.", - "description": "TODO: Add long description of the pod here.", + "summary": "该控件库为日常所常用工具类集合,使用便捷", + "description": "库文件主要有一下几类功能:\n1.宏定义类:提供常用的宏定义(如数字比较,判断等)\n2.常用类类目:提供常用的分类方法(如日期转,富文本等)\n3.常用工具类:提供各种常用的小工具(如弹窗等)", "homepage": "https://github.com/953950782@qq.com/MFControlLibrary", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { - "953950782@qq.com": "xmf@xkeshi.com" + "mf": "weekendlittleant@126.com" }, "source": { "git": "https://github.com/953950782@qq.com/MFControlLibrary.git", @@ -18,5 +18,15 @@ "platforms": { "ios": "8.0" }, - "source_files": "MFControlLibrary/Classes/**/*" + "frameworks": [ + "UIKit", + "Foundation" + ], + "source_files": "MFControlLibrary/**/*.{h,m}", + "public_header_files": "MFControlLibrary/**/*.h", + "dependencies": { + "Masonry": [ + + ] + } } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 8b27fa0..ed49c9a 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,7 +1,10 @@ PODS: - - MFControlLibrary (0.1.0) + - Masonry (1.0.2) + - MFControlLibrary (0.1.0): + - Masonry DEPENDENCIES: + - Masonry - MFControlLibrary (from `../`) EXTERNAL SOURCES: @@ -9,8 +12,9 @@ EXTERNAL SOURCES: :path: ../ SPEC CHECKSUMS: - MFControlLibrary: 5dd5e23fe0c1c6dbf29052cffa71c3e229804065 + Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e + MFControlLibrary: a49519bf2a6d0103425f7d558224deff2a7669b5 -PODFILE CHECKSUM: 4675a43a0ac60727052b211b45f8efff1a5e9039 +PODFILE CHECKSUM: 666205d379d624f147424f9ca7698c18c2aa2049 -COCOAPODS: 1.2.1 +COCOAPODS: 1.3.1 diff --git a/Example/Pods/Masonry/LICENSE b/Example/Pods/Masonry/LICENSE new file mode 100644 index 0000000..a843c00 --- /dev/null +++ b/Example/Pods/Masonry/LICENSE @@ -0,0 +1,19 @@ +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. \ No newline at end of file diff --git a/Example/Pods/Masonry/Masonry/MASCompositeConstraint.h b/Example/Pods/Masonry/Masonry/MASCompositeConstraint.h new file mode 100644 index 0000000..934c6f1 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASCompositeConstraint.h @@ -0,0 +1,26 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/MASCompositeConstraint.m b/Example/Pods/Masonry/Masonry/MASCompositeConstraint.m new file mode 100644 index 0000000..ed63ed6 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASCompositeConstraint.m @@ -0,0 +1,177 @@ +// +// 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)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 diff --git a/Example/Pods/Masonry/Masonry/MASConstraint+Private.h b/Example/Pods/Masonry/Masonry/MASConstraint+Private.h new file mode 100644 index 0000000..ee0fd96 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASConstraint+Private.h @@ -0,0 +1,66 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/MASConstraint.h b/Example/Pods/Masonry/Masonry/MASConstraint.h new file mode 100644 index 0000000..70a10c8 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASConstraint.h @@ -0,0 +1,258 @@ +// +// 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 + * 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 * (^)())priorityLow; + +/** + * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium + */ +- (MASConstraint * (^)())priorityMedium; + +/** + * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh + */ +- (MASConstraint * (^)())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; + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +- (MASConstraint *)firstBaseline; +- (MASConstraint *)lastBaseline; + +#endif + +#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 + * 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 diff --git a/Example/Pods/Masonry/Masonry/MASConstraint.m b/Example/Pods/Masonry/Masonry/MASConstraint.m new file mode 100644 index 0000000..f24ec10 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASConstraint.m @@ -0,0 +1,292 @@ +// +// 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 * (^)())priorityLow { + return ^id{ + self.priority(MASLayoutPriorityDefaultLow); + return self; + }; +} + +- (MASConstraint * (^)())priorityMedium { + return ^id{ + self.priority(MASLayoutPriorityDefaultMedium); + return self; + }; +} + +- (MASConstraint * (^)())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 * (^)(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]; +} + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +- (MASConstraint *)firstBaseline { + return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; +} +- (MASConstraint *)lastBaseline { + return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; +} + +#endif + +#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)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 diff --git a/Example/Pods/Masonry/Masonry/MASConstraintMaker.h b/Example/Pods/Masonry/Masonry/MASConstraintMaker.h new file mode 100644 index 0000000..8f72b4c --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASConstraintMaker.h @@ -0,0 +1,146 @@ +// +// MASConstraintBuilder.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, + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + + MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, + MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, + +#endif + +#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; + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +@property (nonatomic, strong, readonly) MASConstraint *firstBaseline; +@property (nonatomic, strong, readonly) MASConstraint *lastBaseline; + +#endif + +#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 MASConstrait 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 diff --git a/Example/Pods/Masonry/Masonry/MASConstraintMaker.m b/Example/Pods/Masonry/Masonry/MASConstraintMaker.m new file mode 100644 index 0000000..6e40a26 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASConstraintMaker.m @@ -0,0 +1,273 @@ +// +// MASConstraintBuilder.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 +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + | MASAttributeFirstBaseline | MASAttributeLastBaseline +#endif +#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 (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + + if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline]; + if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline]; + +#endif + +#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]; + }; +} + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +- (MASConstraint *)firstBaseline { + return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; +} + +- (MASConstraint *)lastBaseline { + return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; +} + +#endif + + +#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 diff --git a/Example/Pods/Masonry/Masonry/MASLayoutConstraint.h b/Example/Pods/Masonry/Masonry/MASLayoutConstraint.h new file mode 100644 index 0000000..699041c --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASLayoutConstraint.h @@ -0,0 +1,22 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/MASLayoutConstraint.m b/Example/Pods/Masonry/Masonry/MASLayoutConstraint.m new file mode 100644 index 0000000..3483f02 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASLayoutConstraint.m @@ -0,0 +1,13 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/MASUtilities.h b/Example/Pods/Masonry/Masonry/MASUtilities.h new file mode 100644 index 0000000..1dbfd93 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASUtilities.h @@ -0,0 +1,136 @@ +// +// 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)) diff --git a/Example/Pods/Masonry/Masonry/MASViewAttribute.h b/Example/Pods/Masonry/Masonry/MASViewAttribute.h new file mode 100644 index 0000000..f8eb700 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASViewAttribute.h @@ -0,0 +1,49 @@ +// +// MASAttribute.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 diff --git a/Example/Pods/Masonry/Masonry/MASViewAttribute.m b/Example/Pods/Masonry/Masonry/MASViewAttribute.m new file mode 100644 index 0000000..7131025 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASViewAttribute.m @@ -0,0 +1,46 @@ +// +// MASAttribute.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 diff --git a/Example/Pods/Masonry/Masonry/MASViewConstraint.h b/Example/Pods/Masonry/Masonry/MASViewConstraint.h new file mode 100644 index 0000000..5c78f7a --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASViewConstraint.h @@ -0,0 +1,48 @@ +// +// MASConstraint.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 diff --git a/Example/Pods/Masonry/Masonry/MASViewConstraint.m b/Example/Pods/Masonry/Masonry/MASViewConstraint.m new file mode 100644 index 0000000..84a801e --- /dev/null +++ b/Example/Pods/Masonry/Masonry/MASViewConstraint.m @@ -0,0 +1,397 @@ +// +// MASConstraint.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]) { + _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)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 diff --git a/Example/Pods/Masonry/Masonry/Masonry.h b/Example/Pods/Masonry/Masonry/Masonry.h new file mode 100644 index 0000000..d1bd579 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/Masonry.h @@ -0,0 +1,29 @@ +// +// 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" diff --git a/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.h b/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.h new file mode 100644 index 0000000..83be23d --- /dev/null +++ b/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.h @@ -0,0 +1,72 @@ +// +// 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 (^)(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 (^)(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 (^)(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 diff --git a/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.m b/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.m new file mode 100644 index 0000000..831d8cd --- /dev/null +++ b/Example/Pods/Masonry/Masonry/NSArray+MASAdditions.m @@ -0,0 +1,162 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h b/Example/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h new file mode 100644 index 0000000..8b47369 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h @@ -0,0 +1,41 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h b/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h new file mode 100644 index 0000000..1279b4f --- /dev/null +++ b/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h @@ -0,0 +1,16 @@ +// +// 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 diff --git a/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m b/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m new file mode 100644 index 0000000..3569cf8 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m @@ -0,0 +1,146 @@ +// +// 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", + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", + @(NSLayoutAttributeLastBaseline) : @"lastBaseline", +#endif + +#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 diff --git a/Example/Pods/Masonry/Masonry/View+MASAdditions.h b/Example/Pods/Masonry/Masonry/View+MASAdditions.h new file mode 100644 index 0000000..ab1e8ae --- /dev/null +++ b/Example/Pods/Masonry/Masonry/View+MASAdditions.h @@ -0,0 +1,101 @@ +// +// 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); + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +@property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; + +#endif + +#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; + +#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(^)(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(^)(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(^)(MASConstraintMaker *make))block; + +@end diff --git a/Example/Pods/Masonry/Masonry/View+MASAdditions.m b/Example/Pods/Masonry/Masonry/View+MASAdditions.m new file mode 100644 index 0000000..b53b68d --- /dev/null +++ b/Example/Pods/Masonry/Masonry/View+MASAdditions.m @@ -0,0 +1,166 @@ +// +// 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]; + }; +} + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +- (MASViewAttribute *)mas_firstBaseline { + return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; +} +- (MASViewAttribute *)mas_lastBaseline { + return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; +} + +#endif + +#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]; +} + +#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 diff --git a/Example/Pods/Masonry/Masonry/View+MASShorthandAdditions.h b/Example/Pods/Masonry/Masonry/View+MASShorthandAdditions.h new file mode 100644 index 0000000..0446056 --- /dev/null +++ b/Example/Pods/Masonry/Masonry/View+MASShorthandAdditions.h @@ -0,0 +1,115 @@ +// +// 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); + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +@property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; +@property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; + +#endif + +#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 + +- (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]; \ +} + +@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); + +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + +MAS_ATTR_FORWARD(firstBaseline); +MAS_ATTR_FORWARD(lastBaseline); + +#endif + +#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); + +#endif + +- (MASViewAttribute *(^)(NSLayoutAttribute))attribute { + return [self mas_attribute]; +} + +- (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 diff --git a/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.h b/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.h new file mode 100644 index 0000000..79fd1fa --- /dev/null +++ b/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.h @@ -0,0 +1,30 @@ +// +// 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; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; +@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; + + +@end + +#endif diff --git a/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.m b/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.m new file mode 100644 index 0000000..2f5139f --- /dev/null +++ b/Example/Pods/Masonry/Masonry/ViewController+MASAdditions.m @@ -0,0 +1,39 @@ +// +// 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) + +- (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]; +} + + + +@end + +#endif diff --git a/Example/Pods/Masonry/README.md b/Example/Pods/Masonry/README.md new file mode 100644 index 0000000..2b59a48 --- /dev/null +++ b/Example/Pods/Masonry/README.md @@ -0,0 +1,409 @@ +#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` -> `[ mas_makeConstraints:^(MASConstraintMaker *make){}];` + +`mas_update` -> `[ mas_updateConstraints:^(MASConstraintMaker *make){}];` + +`mas_remake` -> `[ mas_remakeConstraints:^(MASConstraintMaker *make){}];` + +## 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 + diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 2a2e57d..752ccf2 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,112 +7,244 @@ objects = { /* Begin PBXBuildFile section */ - 7EC270161F8CC2FF3DDDF0FF0BFD7EE1 /* Pods-MFControlLibrary_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3739C485A71E361747AD7B6CA3831756 /* Pods-MFControlLibrary_Example-dummy.m */; }; - 84C034D42C13A5908B2B523A5C1BB586 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 8E028B389B9FCFFD3665A127DBB93145 /* Pods-MFControlLibrary_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 644016E8DE0A9BA40AB28033911E8C29 /* Pods-MFControlLibrary_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8E0FEDC77D2E8FB93170C761311CAC3D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 969B3601696D045DDA009BA1F03DB696 /* Pods-MFControlLibrary_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BDDEADF8503F6A942CAC259E08B684F7 /* Pods-MFControlLibrary_Tests-dummy.m */; }; - B1F56A3181CC60780C3C8A0BBD7ED8E0 /* ReplaceMe.m in Sources */ = {isa = PBXBuildFile; fileRef = D114EA627B890993475714622829954F /* ReplaceMe.m */; }; - BAC4C0D5223BD6338CD513C4D97EDF76 /* Pods-MFControlLibrary_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A1AC7FD6EC61C303C9C036B04D39AD /* Pods-MFControlLibrary_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C660383E7657CDA88E29CCF11ABD1320 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - D10B4575C7CA14867535C3A0F5EAF860 /* MFControlLibrary-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E2B789A2D7FF7956F74DF71F9D277B3 /* MFControlLibrary-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E1D4424EFA5F7FE2EAC6014542C1ACC2 /* MFControlLibrary-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B65EDA7356D03492B030184976953580 /* MFControlLibrary-dummy.m */; }; + 003901D4EB2A8D2A7A82B02EE9AC144F /* MFCategoryHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B407F7FDE8849D649F8422D712343DC /* MFCategoryHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 04A7D6AADAB213CE7D26F8EAD2F87536 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = AD04C760F0EB4FE7B23D85D56145A97F /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 068EF598E554EC57038ACFB89CC2C47A /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = FF217FE4E512E3883BAD867868CB42D9 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 091D17D5D8F832D28546A72B788CF0AE /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F0183E721D7FD6AF70B4A911C1B1B95 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F3DF5C3BEFCC9838B53C37735B414BE /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A214B89738295B4A4B00EEB1960E8865 /* NSLayoutConstraint+MASDebugAdditions.m */; }; + 0FDB2B4F75591851F0F119EAE70B3F63 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F69E835336330FF06E7268D32D667C9 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 10D9C5F77CF15516B2B4E4AB77F31C2E /* PHDView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D6499B66B6436215DE59CB7CA0775E3 /* PHDView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 11FDB3C6DF6B0054059F20910C8BFFF2 /* NSMutableAttributedString+ContentStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = D5A6FACA530572E1E70C7CAB1E677D40 /* NSMutableAttributedString+ContentStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14CDEF56161066E9054E26AC6E8726E6 /* MFTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F4D3CE764EA0FEC28F3F67B54BA578A /* MFTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1DA107CCD0628D0FA3B4C062E00A1A58 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 848A22C69638D55424736A7E57530671 /* Foundation.framework */; }; + 25A51BAA3994296CE0A011ECB36F9D31 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC31C30AA1B843123575E6EBA38993C /* UIKit.framework */; }; + 2786DC5212BD2A4FF913F89D8E28E98F /* NSObject+MathCalculation.h in Headers */ = {isa = PBXBuildFile; fileRef = 59EB27EC0F6492189CE02C458628BE1D /* NSObject+MathCalculation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2854C9B1086758BD2B6681206B6759B4 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D5C71A7A4B3156186EC98A377E8543 /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 38E0CD63021889EE46E1A6B9FA0415F5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC31C30AA1B843123575E6EBA38993C /* UIKit.framework */; }; + 38F8A0EC51D26F2B8E5EBF27FB97B7F9 /* UITableViewCell+SeparatorLine.h in Headers */ = {isa = PBXBuildFile; fileRef = A90F3F3652391EFDC347485F41EEE467 /* UITableViewCell+SeparatorLine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B9597DC4135E89B6824DDEA19D20208 /* MFControlLibrary-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D235BEC776CC2BC6BB8A0DFA327E7D95 /* MFControlLibrary-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 403420C1F8C8936E791478B6D702A546 /* PHDView.m in Sources */ = {isa = PBXBuildFile; fileRef = 968D587D507C818498736394F478B73F /* PHDView.m */; }; + 4114B59063E7111494A20273CD7A95A3 /* Pods-MFControlLibrary_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 644016E8DE0A9BA40AB28033911E8C29 /* Pods-MFControlLibrary_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 432FA22864D148EBD4CB22F55AB68004 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 848A22C69638D55424736A7E57530671 /* Foundation.framework */; }; + 457ACF9150DCF9AF445B129CC9678FB6 /* Masonry-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 13FC8E35EDBC629D62166DD797E6DE52 /* Masonry-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4962081AD81BF033AC851899524D355E /* Pods-MFControlLibrary_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BDDEADF8503F6A942CAC259E08B684F7 /* Pods-MFControlLibrary_Tests-dummy.m */; }; + 4B624B252F44C4B71C38E2F12F21BE3C /* NSMutableAttributedString+ContentStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = D05733E8E6C474A5A76D0073880E6C37 /* NSMutableAttributedString+ContentStyle.m */; }; + 4D4F2050654580FE1F1D5F4F82CEDDB8 /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 77F2CF8861113B6F7AAE7EA65C6A7C1B /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4E929781AB2AA973BCB58627C572BC81 /* MFCommonToolHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C99E2CEC04B4490334B173011DA195A /* MFCommonToolHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51F7B8EEEC78F3DFCD87CFFB4C396638 /* UITableView+Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E383466079AACE5A7FF002102BC567A /* UITableView+Style.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 53BDF81D0A52EA526D597A5C5B139D7F /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 537638D0C329C86D4ED401237F5D895F /* MASCompositeConstraint.m */; }; + 54DDD0594A2A5494D8D2111B22B84E39 /* Masonry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BF35C23E029BF10AE1D3595169AFBCF /* Masonry.framework */; }; + 54F89A2C4F540F2E5044984438170E50 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 848A22C69638D55424736A7E57530671 /* Foundation.framework */; }; + 5630DD44261EBDA88D75361A77F2B6CB /* MFButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D5BF5DD20E16D5D96D2CB613732CA43 /* MFButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 59F81DE0305CC2AC448D2A3C6B3280A2 /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 986CB32629319F7F2256662716334944 /* MASConstraint.m */; }; + 61719AB3A2630263CD748A9620124DDE /* MFControlLibrary-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D2A402204650F675930602E658733A7 /* MFControlLibrary-dummy.m */; }; + 636BBA734C1A17A734761D674FAE8800 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 96DCAB46CA2931B8140F2639F17404AF /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6829BD859CBC870AEF9F85ABE41911CA /* NSObject+SystemSettingJump.h in Headers */ = {isa = PBXBuildFile; fileRef = C748321108A8615AAF8A648E8B83651B /* NSObject+SystemSettingJump.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6C23BBF56ED4DCC10CA1765A6736D1F8 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 611E26C24600589F4729E5EF510272FB /* MASLayoutConstraint.m */; }; + 722A8913CC1CD5EC6C904ADBBBDAB81D /* UITableView+Style.m in Sources */ = {isa = PBXBuildFile; fileRef = 20D06C292B078AEEDD25C50AE53FE8C5 /* UITableView+Style.m */; }; + 73BBDACC22CCA36A6DAAA167AD780BAF /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = FF3818136FED67BD32E3A7FAEDE4F68F /* MASConstraintMaker.m */; }; + 756DF24546C7D91459DCADC8F1C98660 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E4875E63FFAFF84A3CDFE99F28B551E /* MASViewConstraint.m */; }; + 77C5E4FFEAC9610EDC8C070BDAF912B8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 848A22C69638D55424736A7E57530671 /* Foundation.framework */; }; + 7C17BEA6034027310D1D205DB2008CA5 /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = C484EF8499F67EC81CA7E27930A63CDC /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 88DE7BAB1F4999A5F4B617F44E5FD1D3 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = A02D339E60E114FCC992372E93245BA1 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8A6EEF68E7625AB66A3A8DED1594F88F /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3980E01C213ECEDEABAC38C1CFD3946D /* ViewController+MASAdditions.m */; }; + 8CD45B754192DE834B642975E85257AB /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 79BEFB59B86F59C579FF7594DCF78FEB /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 936AB7106EB56F74F95F0F60D839B975 /* MFAlterView.h in Headers */ = {isa = PBXBuildFile; fileRef = 760A091EDA75161A1E1D34B5D5F183E3 /* MFAlterView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9BBD0C6F02D14A28D8CC8181DCA21D4F /* NSDate+Conversion.m in Sources */ = {isa = PBXBuildFile; fileRef = 167CBEC674172DBE778590875A7CD737 /* NSDate+Conversion.m */; }; + 9DC95DC043C4E77997325308BA0F481A /* UITableViewCell+SeparatorLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A7D18E3506BCD0302843086C49F06D4 /* UITableViewCell+SeparatorLine.m */; }; + 9E7AF49686AB2D95E4ABE22113DFD41C /* Pods-MFControlLibrary_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A1AC7FD6EC61C303C9C036B04D39AD /* Pods-MFControlLibrary_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A08A8AB356264E248D01F1BC0EF08166 /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FE937DE71A73D4B7779FF934EC2373E2 /* Masonry-dummy.m */; }; + A7370CE9231F9A4927142D79021879EC /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 0925CC604B01F156279E8952DDE3EDDB /* MASViewAttribute.m */; }; + B44383A3FA435C1E986942C817339302 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 61881F60AB333EA86CE7881063A4BA60 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B9D2407F8C9E3DAA8E8ED7BA8E3A092A /* NSObject+Handle.h in Headers */ = {isa = PBXBuildFile; fileRef = 80ED194C71AD4527150C9A82C180DA7F /* NSObject+Handle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BE157B0FE411C08547AB27A8A7C05A54 /* ReplaceMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 87989EE626F1CBC6B8D63D73CAE5C1DD /* ReplaceMe.m */; }; + BECA95674CBAAB9334C0EC88CBC14325 /* NSObject+Handle.m in Sources */ = {isa = PBXBuildFile; fileRef = 10B5FB1A9B8A25F3D5CE3265CF415662 /* NSObject+Handle.m */; }; + C0A16E00B4BC2D88A7833D5DAED62942 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A649F9297535214EF97548C9EA9FA33 /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4A07D7AF410735F1E03F57173BE8D87 /* NSDate+Conversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 53A62FD4D4F86EDD0DEE02D42845E056 /* NSDate+Conversion.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C8DF22EAFFC2F81B0426E2165AC93E44 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = ECBBB506D4D551AB1A637EE3145A459E /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CC8F9B4A1AC4E276EA8AA4C6F2BF3CD4 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 303B58A2959C8EEE96799AD558DDA1D3 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CFF6E5581E9537240F966353221A3981 /* MFAlterView.m in Sources */ = {isa = PBXBuildFile; fileRef = A703E84A40C54A3C8DE0E0B3820BD0E5 /* MFAlterView.m */; }; + D8B1525CB3DFCBD8E5032680530413D9 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = F8187F5CAD09C6C6B2B54C65B4A807C9 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E649FDD4AE0527DE65EEA41F61D85D93 /* MFTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 7308D980DBF0437BFCEEE6402116D518 /* MFTextField.m */; }; + E72EDE323AC9F92EC8A00A93AC186093 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B1C550CDA10D592ABB6A0383A3509F05 /* NSArray+MASAdditions.m */; }; + E80072EA9F2A841C725AB8B0872DEFA8 /* NSObject+SystemSettingJump.m in Sources */ = {isa = PBXBuildFile; fileRef = 06E1DE26D5D95704E4D43206C2953EA9 /* NSObject+SystemSettingJump.m */; }; + EE7005E465DF85FE90AB3D2227A1735E /* NSObject+MathCalculation.m in Sources */ = {isa = PBXBuildFile; fileRef = 58106BF33B21F9F20ED5B368BDC3A416 /* NSObject+MathCalculation.m */; }; + F0900A1C481F10C23169C7B2B12F62F1 /* MFButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E6CCFDFA65644FC44E7DB714AC288B3 /* MFButton.m */; }; + F4B3E44D5D2F6508BC1BB35A9FBDEC70 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EC0A25DD6F58D072A4ACFC92D9237BF /* View+MASAdditions.m */; }; + FA743E8ADD56097DCD0F1BF4A41949A5 /* Pods-MFControlLibrary_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3739C485A71E361747AD7B6CA3831756 /* Pods-MFControlLibrary_Example-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 1C17B91B8976E3BBE0F355761AD0288D /* PBXContainerItemProxy */ = { + 0529A3E4F704A1EE2A0D00DCD5A485AA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = CCB6BAF496980B378A8480C4C9553D06; + remoteGlobalIDString = D52144DE9D7255DE912490FF5A806573; + remoteInfo = Masonry; + }; + 4CBFE2AEDBD4C91D85EB154B5C995488 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D52144DE9D7255DE912490FF5A806573; + remoteInfo = Masonry; + }; + 988570C3796689E658AF6801E07F9F5F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8CF474B1912073526BE51159F44BC155; remoteInfo = MFControlLibrary; }; + CF4841D07E6CBC856030B15595AAD9B1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D52144DE9D7255DE912490FF5A806573; + remoteInfo = Masonry; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00F703006688EA886475CC07711A9F22 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0089349242332E8CC3E9FCB8F03F4AA1 /* MFControlLibrary-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MFControlLibrary-prefix.pch"; sourceTree = ""; }; + 06E1DE26D5D95704E4D43206C2953EA9 /* NSObject+SystemSettingJump.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SystemSettingJump.m"; sourceTree = ""; }; + 0925CC604B01F156279E8952DDE3EDDB /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = ""; }; + 0A7D18E3506BCD0302843086C49F06D4 /* UITableViewCell+SeparatorLine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UITableViewCell+SeparatorLine.m"; sourceTree = ""; }; + 0B407F7FDE8849D649F8422D712343DC /* MFCategoryHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MFCategoryHeader.h; sourceTree = ""; }; 0D90C17FF0F8629A92CBDEE9E9EFAA5C /* Pods-MFControlLibrary_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MFControlLibrary_Tests.debug.xcconfig"; sourceTree = ""; }; - 1B039EBE2F478A8DC20F5FEFAD0C21E5 /* MFControlLibrary.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = MFControlLibrary.modulemap; sourceTree = ""; }; + 0DC31C30AA1B843123575E6EBA38993C /* 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; }; + 0E6CCFDFA65644FC44E7DB714AC288B3 /* MFButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MFButton.m; sourceTree = ""; }; + 10B5FB1A9B8A25F3D5CE3265CF415662 /* NSObject+Handle.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Handle.m"; sourceTree = ""; }; + 13FC8E35EDBC629D62166DD797E6DE52 /* Masonry-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-umbrella.h"; sourceTree = ""; }; + 167CBEC674172DBE778590875A7CD737 /* NSDate+Conversion.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Conversion.m"; sourceTree = ""; }; + 181D4807DCD2B6EA3F1741FD7049BB3A /* MFControlLibrary.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MFControlLibrary.xcconfig; sourceTree = ""; }; + 1F0183E721D7FD6AF70B4A911C1B1B95 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = ""; }; + 20D06C292B078AEEDD25C50AE53FE8C5 /* UITableView+Style.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UITableView+Style.m"; sourceTree = ""; }; + 220D81933AFD3A189375D5E2EB4C4715 /* Pods_MFControlLibrary_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MFControlLibrary_Example.framework; path = "Pods-MFControlLibrary_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 25CEE66CC5F4E172E170DBF637BB6B11 /* Pods-MFControlLibrary_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MFControlLibrary_Example-resources.sh"; sourceTree = ""; }; 2C69948343F40A6FF55BDC988B70253D /* Pods-MFControlLibrary_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MFControlLibrary_Tests.release.xcconfig"; sourceTree = ""; }; + 2F69E835336330FF06E7268D32D667C9 /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; 2FAB68F4A48A147143B6582B4FFD6B1A /* Pods-MFControlLibrary_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MFControlLibrary_Example-frameworks.sh"; sourceTree = ""; }; + 3027ECF3675B7D92CFE998E7807ED8BD /* Masonry.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Masonry.modulemap; sourceTree = ""; }; + 303B58A2959C8EEE96799AD558DDA1D3 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = ""; }; 343F847B82A5B9AF48CC4214BDAB494F /* Pods-MFControlLibrary_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MFControlLibrary_Example.debug.xcconfig"; sourceTree = ""; }; 3739C485A71E361747AD7B6CA3831756 /* Pods-MFControlLibrary_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MFControlLibrary_Example-dummy.m"; sourceTree = ""; }; + 3980E01C213ECEDEABAC38C1CFD3946D /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = ""; }; + 3AA1F95E35F41F3CDDF171D24B890707 /* Pods_MFControlLibrary_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MFControlLibrary_Tests.framework; path = "Pods-MFControlLibrary_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3D6499B66B6436215DE59CB7CA0775E3 /* PHDView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PHDView.h; sourceTree = ""; }; 42CFCFB0A18223B38BDD1AC02C275934 /* Pods-MFControlLibrary_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MFControlLibrary_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 447237EEF3688B785D2086B390412672 /* MFControlLibrary.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MFControlLibrary.xcconfig; sourceTree = ""; }; - 482B0A4260E4A67A19750A7411E8FBBD /* Pods_MFControlLibrary_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MFControlLibrary_Example.framework; path = "Pods-MFControlLibrary_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 483C411F4BEC9BFCA6BCF39902491C08 /* Pods-MFControlLibrary_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MFControlLibrary_Example-acknowledgements.markdown"; sourceTree = ""; }; + 4D5BF5DD20E16D5D96D2CB613732CA43 /* MFButton.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MFButton.h; sourceTree = ""; }; + 537638D0C329C86D4ED401237F5D895F /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = ""; }; + 53A62FD4D4F86EDD0DEE02D42845E056 /* NSDate+Conversion.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSDate+Conversion.h"; sourceTree = ""; }; 55A1AC7FD6EC61C303C9C036B04D39AD /* Pods-MFControlLibrary_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MFControlLibrary_Tests-umbrella.h"; sourceTree = ""; }; - 641C83876D4147896485D798953D1DD1 /* Pods_MFControlLibrary_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MFControlLibrary_Tests.framework; path = "Pods-MFControlLibrary_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 58106BF33B21F9F20ED5B368BDC3A416 /* NSObject+MathCalculation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSObject+MathCalculation.m"; sourceTree = ""; }; + 59EB27EC0F6492189CE02C458628BE1D /* NSObject+MathCalculation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSObject+MathCalculation.h"; sourceTree = ""; }; + 5A649F9297535214EF97548C9EA9FA33 /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = ""; }; + 5D2A402204650F675930602E658733A7 /* MFControlLibrary-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MFControlLibrary-dummy.m"; sourceTree = ""; }; + 611E26C24600589F4729E5EF510272FB /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = ""; }; + 61881F60AB333EA86CE7881063A4BA60 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = ""; }; + 61C635FA63B207AC12EA2BD25D894A65 /* Masonry.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.xcconfig; sourceTree = ""; }; 644016E8DE0A9BA40AB28033911E8C29 /* Pods-MFControlLibrary_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MFControlLibrary_Example-umbrella.h"; sourceTree = ""; }; - 6604A7D69453B4569E4E4827FB9155A9 /* 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; }; + 6BF35C23E029BF10AE1D3595169AFBCF /* Masonry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Masonry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6E4875E63FFAFF84A3CDFE99F28B551E /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = ""; }; + 7308D980DBF0437BFCEEE6402116D518 /* MFTextField.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MFTextField.m; sourceTree = ""; }; + 760A091EDA75161A1E1D34B5D5F183E3 /* MFAlterView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MFAlterView.h; sourceTree = ""; }; 77DB88AEDBF79EC6D32CF13BFA4624BB /* Pods-MFControlLibrary_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MFControlLibrary_Tests-acknowledgements.plist"; sourceTree = ""; }; - 7E2B789A2D7FF7956F74DF71F9D277B3 /* MFControlLibrary-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MFControlLibrary-umbrella.h"; sourceTree = ""; }; + 77F2CF8861113B6F7AAE7EA65C6A7C1B /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = ""; }; + 79BEFB59B86F59C579FF7594DCF78FEB /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = ""; }; + 7EC0A25DD6F58D072A4ACFC92D9237BF /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = ""; }; + 7F44A621BE24B87AEF75DD7193846188 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8090BB485EA92887A74E757A832B3116 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 80ED194C71AD4527150C9A82C180DA7F /* NSObject+Handle.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSObject+Handle.h"; sourceTree = ""; }; + 848A22C69638D55424736A7E57530671 /* 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; }; + 87989EE626F1CBC6B8D63D73CAE5C1DD /* ReplaceMe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ReplaceMe.m; sourceTree = ""; }; + 8E383466079AACE5A7FF002102BC567A /* UITableView+Style.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UITableView+Style.h"; sourceTree = ""; }; + 8F4D3CE764EA0FEC28F3F67B54BA578A /* MFTextField.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MFTextField.h; sourceTree = ""; }; 91E6047006204D35A913FE4E7FAF9701 /* Pods-MFControlLibrary_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MFControlLibrary_Tests-resources.sh"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 94AD01DE3E3D5FBAA7DA23B9736EB782 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 94D482B8B5D66E48570683690A48855E /* MFControlLibrary-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MFControlLibrary-prefix.pch"; sourceTree = ""; }; + 968D587D507C818498736394F478B73F /* PHDView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PHDView.m; sourceTree = ""; }; + 96DCAB46CA2931B8140F2639F17404AF /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = ""; }; + 986CB32629319F7F2256662716334944 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = ""; }; + 9C99E2CEC04B4490334B173011DA195A /* MFCommonToolHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MFCommonToolHeader.h; sourceTree = ""; }; + A02D339E60E114FCC992372E93245BA1 /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = ""; }; A15A8DD9298644AA26B925FDADCEBC7A /* Pods-MFControlLibrary_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MFControlLibrary_Tests-frameworks.sh"; sourceTree = ""; }; - B65EDA7356D03492B030184976953580 /* MFControlLibrary-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MFControlLibrary-dummy.m"; sourceTree = ""; }; + A214B89738295B4A4B00EEB1960E8865 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; + A703E84A40C54A3C8DE0E0B3820BD0E5 /* MFAlterView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MFAlterView.m; sourceTree = ""; }; + A90F3F3652391EFDC347485F41EEE467 /* UITableViewCell+SeparatorLine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UITableViewCell+SeparatorLine.h"; sourceTree = ""; }; + AD04C760F0EB4FE7B23D85D56145A97F /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = ""; }; + B1C550CDA10D592ABB6A0383A3509F05 /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = ""; }; + B5554950AF1AF8F2FCE74F5A1065EB0E /* Masonry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Masonry.framework; path = Masonry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B7FAF284A44B2A058CC666A1C567C40F /* Pods-MFControlLibrary_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MFControlLibrary_Example.release.xcconfig"; sourceTree = ""; }; BDDEADF8503F6A942CAC259E08B684F7 /* Pods-MFControlLibrary_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MFControlLibrary_Tests-dummy.m"; sourceTree = ""; }; - D114EA627B890993475714622829954F /* ReplaceMe.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ReplaceMe.m; sourceTree = ""; }; - D7A6A5A12BA2A18B57480FEFAFF48D87 /* MFControlLibrary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MFControlLibrary.framework; path = MFControlLibrary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C484EF8499F67EC81CA7E27930A63CDC /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = ""; }; + C6D5C71A7A4B3156186EC98A377E8543 /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = ""; }; + C748321108A8615AAF8A648E8B83651B /* NSObject+SystemSettingJump.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSObject+SystemSettingJump.h"; sourceTree = ""; }; + C83EDF36116570C5B0B2B1C25F004676 /* MFControlLibrary.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = MFControlLibrary.modulemap; sourceTree = ""; }; + CD9460636A228DA2C8F5EC4A2AB7EBB6 /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; + D05733E8E6C474A5A76D0073880E6C37 /* NSMutableAttributedString+ContentStyle.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSMutableAttributedString+ContentStyle.m"; sourceTree = ""; }; + D235BEC776CC2BC6BB8A0DFA327E7D95 /* MFControlLibrary-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MFControlLibrary-umbrella.h"; sourceTree = ""; }; + D5A6FACA530572E1E70C7CAB1E677D40 /* NSMutableAttributedString+ContentStyle.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSMutableAttributedString+ContentStyle.h"; sourceTree = ""; }; + D6D27F94D82C996A26E705473247D504 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E46CB032CF4F20294F777FD19EFC7F9B /* Pods-MFControlLibrary_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MFControlLibrary_Example-acknowledgements.plist"; sourceTree = ""; }; E4C2045FF702317CDAC9470EEE3660FC /* Pods-MFControlLibrary_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-MFControlLibrary_Tests.modulemap"; sourceTree = ""; }; + ECBBB506D4D551AB1A637EE3145A459E /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = ""; }; + F8187F5CAD09C6C6B2B54C65B4A807C9 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; + FA654324DE78FD350D7693E3E50E5ACC /* MFControlLibrary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MFControlLibrary.framework; path = MFControlLibrary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FB25808616CC3FBD29D3522C5CD44756 /* Pods-MFControlLibrary_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-MFControlLibrary_Example.modulemap"; sourceTree = ""; }; + FE937DE71A73D4B7779FF934EC2373E2 /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; + FF217FE4E512E3883BAD867868CB42D9 /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = ""; }; + FF3818136FED67BD32E3A7FAEDE4F68F /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1FFF41946B6E72F0F6F941D35B466E38 /* Frameworks */ = { + 2A18C8F11E54D9F7FEF285C028F8C37F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84C034D42C13A5908B2B523A5C1BB586 /* Foundation.framework in Frameworks */, + 1DA107CCD0628D0FA3B4C062E00A1A58 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 4084303B454FA204799D1BE8FE7F5826 /* Frameworks */ = { + 4635C8A8D2D1525BF24A41D7AB280A00 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C660383E7657CDA88E29CCF11ABD1320 /* Foundation.framework in Frameworks */, + 54F89A2C4F540F2E5044984438170E50 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B7F8B62C898CFDED17F5FE6BC6D6A59D /* Frameworks */ = { + 67604FA1A90D75980365EE6D5EB6DD1D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8E0FEDC77D2E8FB93170C761311CAC3D /* Foundation.framework in Frameworks */, + 77C5E4FFEAC9610EDC8C070BDAF912B8 /* Foundation.framework in Frameworks */, + 54DDD0594A2A5494D8D2111B22B84E39 /* Masonry.framework in Frameworks */, + 25A51BAA3994296CE0A011ECB36F9D31 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F6EC657AC5A7BEE9A3D288B582F4C5E9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 432FA22864D148EBD4CB22F55AB68004 /* Foundation.framework in Frameworks */, + 38E0CD63021889EE46E1A6B9FA0415F5 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 03286EC8C2B77B0B520995C0AE7A4A84 /* Support Files */ = { - isa = PBXGroup; - children = ( - 00F703006688EA886475CC07711A9F22 /* Info.plist */, - 1B039EBE2F478A8DC20F5FEFAD0C21E5 /* MFControlLibrary.modulemap */, - 447237EEF3688B785D2086B390412672 /* MFControlLibrary.xcconfig */, - B65EDA7356D03492B030184976953580 /* MFControlLibrary-dummy.m */, - 94D482B8B5D66E48570683690A48855E /* MFControlLibrary-prefix.pch */, - 7E2B789A2D7FF7956F74DF71F9D277B3 /* MFControlLibrary-umbrella.h */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/MFControlLibrary"; - sourceTree = ""; - }; - 0C22A37581B2D360EE499A181DDEE764 /* Classes */ = { + 10159475E27730D645497006752EDB38 /* MFTextField */ = { isa = PBXGroup; children = ( - D114EA627B890993475714622829954F /* ReplaceMe.m */, + 8F4D3CE764EA0FEC28F3F67B54BA578A /* MFTextField.h */, + 7308D980DBF0437BFCEEE6402116D518 /* MFTextField.m */, ); - name = Classes; - path = Classes; + name = MFTextField; + path = MFTextField; sourceTree = ""; }; 182F282344E9C41F9C66C4DA70A132A4 /* Pods-MFControlLibrary_Tests */ = { @@ -142,68 +274,212 @@ name = "Targets Support Files"; sourceTree = ""; }; + 24719A5CD9D2C0E0950E316C54E5D040 /* .. */ = { + isa = PBXGroup; + children = ( + BAE9DB24EABF5345F9272155C74CD126 /* Category */, + 34CE9ACDFE925C90ABD3AEA3089559C3 /* Classes */, + C43F50710803D8A5DF77C24B1D87FA0C /* CommonTool */, + ); + name = ..; + path = MFControlLibrary; + sourceTree = ""; + }; 24EF9235D561B11FE4070898F08E8942 /* Development Pods */ = { isa = PBXGroup; children = ( - D45641637EF5FCFF0371A284F90874C7 /* MFControlLibrary */, + 8BBF60E345BC9D8EE3AAB6ADFB504FF7 /* MFControlLibrary */, ); name = "Development Pods"; sourceTree = ""; }; + 283972B4C114F2605B5F4011A5527663 /* MFButton */ = { + isa = PBXGroup; + children = ( + 4D5BF5DD20E16D5D96D2CB613732CA43 /* MFButton.h */, + 0E6CCFDFA65644FC44E7DB714AC288B3 /* MFButton.m */, + ); + name = MFButton; + path = MFButton; + sourceTree = ""; + }; + 34CE9ACDFE925C90ABD3AEA3089559C3 /* Classes */ = { + isa = PBXGroup; + children = ( + 3D6499B66B6436215DE59CB7CA0775E3 /* PHDView.h */, + 968D587D507C818498736394F478B73F /* PHDView.m */, + 87989EE626F1CBC6B8D63D73CAE5C1DD /* ReplaceMe.m */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 4B657A93B1E9093C4F21AA3FB2B8BAB2 /* NSObject */ = { + isa = PBXGroup; + children = ( + 80ED194C71AD4527150C9A82C180DA7F /* NSObject+Handle.h */, + 10B5FB1A9B8A25F3D5CE3265CF415662 /* NSObject+Handle.m */, + 59EB27EC0F6492189CE02C458628BE1D /* NSObject+MathCalculation.h */, + 58106BF33B21F9F20ED5B368BDC3A416 /* NSObject+MathCalculation.m */, + C748321108A8615AAF8A648E8B83651B /* NSObject+SystemSettingJump.h */, + 06E1DE26D5D95704E4D43206C2953EA9 /* NSObject+SystemSettingJump.m */, + ); + name = NSObject; + path = NSObject; + sourceTree = ""; + }; + 59511511C2B4BC905C933DCC67E365C4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6BF35C23E029BF10AE1D3595169AFBCF /* Masonry.framework */, + AB02C94D765D376FFAFCAF1BEEEEE566 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6551291CD630F283E88E73B65D92D437 /* UITableViewCell */ = { + isa = PBXGroup; + children = ( + A90F3F3652391EFDC347485F41EEE467 /* UITableViewCell+SeparatorLine.h */, + 0A7D18E3506BCD0302843086C49F06D4 /* UITableViewCell+SeparatorLine.m */, + ); + name = UITableViewCell; + path = UITableViewCell; + sourceTree = ""; + }; + 6FDE57039455A8A1DAF91D7409434267 /* NSDate */ = { + isa = PBXGroup; + children = ( + 53A62FD4D4F86EDD0DEE02D42845E056 /* NSDate+Conversion.h */, + 167CBEC674172DBE778590875A7CD737 /* NSDate+Conversion.m */, + ); + name = NSDate; + path = NSDate; + sourceTree = ""; + }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 24EF9235D561B11FE4070898F08E8942 /* Development Pods */, - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, - BAF77C70F7A949D57D7D7BA45E477BBB /* Products */, + 59511511C2B4BC905C933DCC67E365C4 /* Frameworks */, + E9B49E9D4F6BC02AA78DCF86BCED2145 /* Pods */, + ED1975D0D9EE62470F81E0662E3004A7 /* Products */, 1A8882D50E04C4668F173A4C996D191B /* Targets Support Files */, ); sourceTree = ""; }; - A474682BF961070E5CEA74AA92C83B31 /* MFControlLibrary */ = { + 8BBF60E345BC9D8EE3AAB6ADFB504FF7 /* MFControlLibrary */ = { isa = PBXGroup; children = ( - 0C22A37581B2D360EE499A181DDEE764 /* Classes */, + 24719A5CD9D2C0E0950E316C54E5D040 /* .. */, + EC60526CCF9E9ACF59A237ABECF52DE3 /* Support Files */, ); name = MFControlLibrary; - path = MFControlLibrary; + path = ../..; sourceTree = ""; }; - BAF77C70F7A949D57D7D7BA45E477BBB /* Products */ = { + A2A20986957FCCEF3865AFC2DAE207A8 /* Masonry */ = { isa = PBXGroup; children = ( - D7A6A5A12BA2A18B57480FEFAFF48D87 /* MFControlLibrary.framework */, - 482B0A4260E4A67A19750A7411E8FBBD /* Pods_MFControlLibrary_Example.framework */, - 641C83876D4147896485D798953D1DD1 /* Pods_MFControlLibrary_Tests.framework */, + 79BEFB59B86F59C579FF7594DCF78FEB /* MASCompositeConstraint.h */, + 537638D0C329C86D4ED401237F5D895F /* MASCompositeConstraint.m */, + ECBBB506D4D551AB1A637EE3145A459E /* MASConstraint.h */, + 986CB32629319F7F2256662716334944 /* MASConstraint.m */, + 77F2CF8861113B6F7AAE7EA65C6A7C1B /* MASConstraint+Private.h */, + A02D339E60E114FCC992372E93245BA1 /* MASConstraintMaker.h */, + FF3818136FED67BD32E3A7FAEDE4F68F /* MASConstraintMaker.m */, + C484EF8499F67EC81CA7E27930A63CDC /* MASLayoutConstraint.h */, + 611E26C24600589F4729E5EF510272FB /* MASLayoutConstraint.m */, + 303B58A2959C8EEE96799AD558DDA1D3 /* Masonry.h */, + AD04C760F0EB4FE7B23D85D56145A97F /* MASUtilities.h */, + 96DCAB46CA2931B8140F2639F17404AF /* MASViewAttribute.h */, + 0925CC604B01F156279E8952DDE3EDDB /* MASViewAttribute.m */, + 1F0183E721D7FD6AF70B4A911C1B1B95 /* MASViewConstraint.h */, + 6E4875E63FFAFF84A3CDFE99F28B551E /* MASViewConstraint.m */, + 5A649F9297535214EF97548C9EA9FA33 /* NSArray+MASAdditions.h */, + B1C550CDA10D592ABB6A0383A3509F05 /* NSArray+MASAdditions.m */, + F8187F5CAD09C6C6B2B54C65B4A807C9 /* NSArray+MASShorthandAdditions.h */, + 2F69E835336330FF06E7268D32D667C9 /* NSLayoutConstraint+MASDebugAdditions.h */, + A214B89738295B4A4B00EEB1960E8865 /* NSLayoutConstraint+MASDebugAdditions.m */, + FF217FE4E512E3883BAD867868CB42D9 /* View+MASAdditions.h */, + 7EC0A25DD6F58D072A4ACFC92D9237BF /* View+MASAdditions.m */, + 61881F60AB333EA86CE7881063A4BA60 /* View+MASShorthandAdditions.h */, + C6D5C71A7A4B3156186EC98A377E8543 /* ViewController+MASAdditions.h */, + 3980E01C213ECEDEABAC38C1CFD3946D /* ViewController+MASAdditions.m */, + AB2D74BCA437C31F2B7B0E2905262257 /* Support Files */, ); - name = Products; + name = Masonry; + path = Masonry; sourceTree = ""; }; - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + A67A3E117C6CAAE887E21A7B01848194 /* MFAlert */ = { isa = PBXGroup; children = ( - D35AF013A5F0BAD4F32504907A52519E /* iOS */, + 760A091EDA75161A1E1D34B5D5F183E3 /* MFAlterView.h */, + A703E84A40C54A3C8DE0E0B3820BD0E5 /* MFAlterView.m */, ); - name = Frameworks; + name = MFAlert; + path = MFAlert; sourceTree = ""; }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + AB02C94D765D376FFAFCAF1BEEEEE566 /* iOS */ = { isa = PBXGroup; children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + 848A22C69638D55424736A7E57530671 /* Foundation.framework */, + 0DC31C30AA1B843123575E6EBA38993C /* UIKit.framework */, ); name = iOS; sourceTree = ""; }; - D45641637EF5FCFF0371A284F90874C7 /* MFControlLibrary */ = { + AB2D74BCA437C31F2B7B0E2905262257 /* Support Files */ = { isa = PBXGroup; children = ( - A474682BF961070E5CEA74AA92C83B31 /* MFControlLibrary */, - 03286EC8C2B77B0B520995C0AE7A4A84 /* Support Files */, + 7F44A621BE24B87AEF75DD7193846188 /* Info.plist */, + 3027ECF3675B7D92CFE998E7807ED8BD /* Masonry.modulemap */, + 61C635FA63B207AC12EA2BD25D894A65 /* Masonry.xcconfig */, + FE937DE71A73D4B7779FF934EC2373E2 /* Masonry-dummy.m */, + CD9460636A228DA2C8F5EC4A2AB7EBB6 /* Masonry-prefix.pch */, + 13FC8E35EDBC629D62166DD797E6DE52 /* Masonry-umbrella.h */, ); - name = MFControlLibrary; - path = ../..; + name = "Support Files"; + path = "../Target Support Files/Masonry"; + sourceTree = ""; + }; + AD6356B2DC256FE5AFF6347E9F387B4E /* NSMutableAttributedString */ = { + isa = PBXGroup; + children = ( + D5A6FACA530572E1E70C7CAB1E677D40 /* NSMutableAttributedString+ContentStyle.h */, + D05733E8E6C474A5A76D0073880E6C37 /* NSMutableAttributedString+ContentStyle.m */, + ); + name = NSMutableAttributedString; + path = NSMutableAttributedString; + sourceTree = ""; + }; + BAE9DB24EABF5345F9272155C74CD126 /* Category */ = { + isa = PBXGroup; + children = ( + 0B407F7FDE8849D649F8422D712343DC /* MFCategoryHeader.h */, + 6FDE57039455A8A1DAF91D7409434267 /* NSDate */, + AD6356B2DC256FE5AFF6347E9F387B4E /* NSMutableAttributedString */, + 4B657A93B1E9093C4F21AA3FB2B8BAB2 /* NSObject */, + EA691A21127D88D2B65A8A0DE6A2469D /* UITableView */, + ); + name = Category; + path = Category; + sourceTree = ""; + }; + C43F50710803D8A5DF77C24B1D87FA0C /* CommonTool */ = { + isa = PBXGroup; + children = ( + 9C99E2CEC04B4490334B173011DA195A /* MFCommonToolHeader.h */, + A67A3E117C6CAAE887E21A7B01848194 /* MFAlert */, + 283972B4C114F2605B5F4011A5527663 /* MFButton */, + 10159475E27730D645497006752EDB38 /* MFTextField */, + 6551291CD630F283E88E73B65D92D437 /* UITableViewCell */, + ); + name = CommonTool; + path = CommonTool; sourceTree = ""; }; E2A9E3A4B3212B5CF05A1B365762AE58 /* Pods-MFControlLibrary_Example */ = { @@ -224,86 +500,185 @@ path = "Target Support Files/Pods-MFControlLibrary_Example"; sourceTree = ""; }; + E9B49E9D4F6BC02AA78DCF86BCED2145 /* Pods */ = { + isa = PBXGroup; + children = ( + A2A20986957FCCEF3865AFC2DAE207A8 /* Masonry */, + ); + name = Pods; + sourceTree = ""; + }; + EA691A21127D88D2B65A8A0DE6A2469D /* UITableView */ = { + isa = PBXGroup; + children = ( + 8E383466079AACE5A7FF002102BC567A /* UITableView+Style.h */, + 20D06C292B078AEEDD25C50AE53FE8C5 /* UITableView+Style.m */, + ); + name = UITableView; + path = UITableView; + sourceTree = ""; + }; + EC60526CCF9E9ACF59A237ABECF52DE3 /* Support Files */ = { + isa = PBXGroup; + children = ( + D6D27F94D82C996A26E705473247D504 /* Info.plist */, + C83EDF36116570C5B0B2B1C25F004676 /* MFControlLibrary.modulemap */, + 181D4807DCD2B6EA3F1741FD7049BB3A /* MFControlLibrary.xcconfig */, + 5D2A402204650F675930602E658733A7 /* MFControlLibrary-dummy.m */, + 0089349242332E8CC3E9FCB8F03F4AA1 /* MFControlLibrary-prefix.pch */, + D235BEC776CC2BC6BB8A0DFA327E7D95 /* MFControlLibrary-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/MFControlLibrary"; + sourceTree = ""; + }; + ED1975D0D9EE62470F81E0662E3004A7 /* Products */ = { + isa = PBXGroup; + children = ( + B5554950AF1AF8F2FCE74F5A1065EB0E /* Masonry.framework */, + FA654324DE78FD350D7693E3E50E5ACC /* MFControlLibrary.framework */, + 220D81933AFD3A189375D5E2EB4C4715 /* Pods_MFControlLibrary_Example.framework */, + 3AA1F95E35F41F3CDDF171D24B890707 /* Pods_MFControlLibrary_Tests.framework */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0ADE6E3D25F5A65EEDBB77202FAA71CA /* Headers */ = { + 0FEB909D12272C5B580A5D31D245D66F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8E028B389B9FCFFD3665A127DBB93145 /* Pods-MFControlLibrary_Example-umbrella.h in Headers */, + 9E7AF49686AB2D95E4ABE22113DFD41C /* Pods-MFControlLibrary_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 77804FDB852CBBE9A11CF796608FD27E /* Headers */ = { + 2D497C341002080843AB74334E85B97C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D10B4575C7CA14867535C3A0F5EAF860 /* MFControlLibrary-umbrella.h in Headers */, + 4114B59063E7111494A20273CD7A95A3 /* Pods-MFControlLibrary_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - ADBF11FFEDEA7DEE1E91C9608AAB03B4 /* Headers */ = { + 5BBDF740A07311236BD2771C38BF6CD2 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - BAC4C0D5223BD6338CD513C4D97EDF76 /* Pods-MFControlLibrary_Tests-umbrella.h in Headers */, + 936AB7106EB56F74F95F0F60D839B975 /* MFAlterView.h in Headers */, + 5630DD44261EBDA88D75361A77F2B6CB /* MFButton.h in Headers */, + 003901D4EB2A8D2A7A82B02EE9AC144F /* MFCategoryHeader.h in Headers */, + 4E929781AB2AA973BCB58627C572BC81 /* MFCommonToolHeader.h in Headers */, + 3B9597DC4135E89B6824DDEA19D20208 /* MFControlLibrary-umbrella.h in Headers */, + 14CDEF56161066E9054E26AC6E8726E6 /* MFTextField.h in Headers */, + C4A07D7AF410735F1E03F57173BE8D87 /* NSDate+Conversion.h in Headers */, + 11FDB3C6DF6B0054059F20910C8BFFF2 /* NSMutableAttributedString+ContentStyle.h in Headers */, + B9D2407F8C9E3DAA8E8ED7BA8E3A092A /* NSObject+Handle.h in Headers */, + 2786DC5212BD2A4FF913F89D8E28E98F /* NSObject+MathCalculation.h in Headers */, + 6829BD859CBC870AEF9F85ABE41911CA /* NSObject+SystemSettingJump.h in Headers */, + 10D9C5F77CF15516B2B4E4AB77F31C2E /* PHDView.h in Headers */, + 51F7B8EEEC78F3DFCD87CFFB4C396638 /* UITableView+Style.h in Headers */, + 38F8A0EC51D26F2B8E5EBF27FB97B7F9 /* UITableViewCell+SeparatorLine.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F3E9930C736C01D12F5733EFD1F0A948 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8CD45B754192DE834B642975E85257AB /* MASCompositeConstraint.h in Headers */, + 4D4F2050654580FE1F1D5F4F82CEDDB8 /* MASConstraint+Private.h in Headers */, + C8DF22EAFFC2F81B0426E2165AC93E44 /* MASConstraint.h in Headers */, + 88DE7BAB1F4999A5F4B617F44E5FD1D3 /* MASConstraintMaker.h in Headers */, + 7C17BEA6034027310D1D205DB2008CA5 /* MASLayoutConstraint.h in Headers */, + 457ACF9150DCF9AF445B129CC9678FB6 /* Masonry-umbrella.h in Headers */, + CC8F9B4A1AC4E276EA8AA4C6F2BF3CD4 /* Masonry.h in Headers */, + 04A7D6AADAB213CE7D26F8EAD2F87536 /* MASUtilities.h in Headers */, + 636BBA734C1A17A734761D674FAE8800 /* MASViewAttribute.h in Headers */, + 091D17D5D8F832D28546A72B788CF0AE /* MASViewConstraint.h in Headers */, + C0A16E00B4BC2D88A7833D5DAED62942 /* NSArray+MASAdditions.h in Headers */, + D8B1525CB3DFCBD8E5032680530413D9 /* NSArray+MASShorthandAdditions.h in Headers */, + 0FDB2B4F75591851F0F119EAE70B3F63 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, + 068EF598E554EC57038ACFB89CC2C47A /* View+MASAdditions.h in Headers */, + B44383A3FA435C1E986942C817339302 /* View+MASShorthandAdditions.h in Headers */, + 2854C9B1086758BD2B6681206B6759B4 /* ViewController+MASAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0F02C0E1763CDCA573D8990A414805A4 /* Pods-MFControlLibrary_Example */ = { + 8CF474B1912073526BE51159F44BC155 /* MFControlLibrary */ = { isa = PBXNativeTarget; - buildConfigurationList = 64B0B087E3EB3DC803ADA4BC9E0AFCD6 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Example" */; + buildConfigurationList = F0F073FE5B0906CEB0F2F9B6CB17F147 /* Build configuration list for PBXNativeTarget "MFControlLibrary" */; buildPhases = ( - F171E7F707CC652E1F668BCEFFB59B19 /* Sources */, - B7F8B62C898CFDED17F5FE6BC6D6A59D /* Frameworks */, - 0ADE6E3D25F5A65EEDBB77202FAA71CA /* Headers */, + 3FBCC6E43E851695EB04BCC324F38AFB /* Sources */, + 67604FA1A90D75980365EE6D5EB6DD1D /* Frameworks */, + 5BBDF740A07311236BD2771C38BF6CD2 /* Headers */, ); buildRules = ( ); dependencies = ( - A10DA502E6544598FE8B065C9478491B /* PBXTargetDependency */, + A1B0F3DC0CC3194CA7BB019DF254A92E /* PBXTargetDependency */, ); - name = "Pods-MFControlLibrary_Example"; - productName = "Pods-MFControlLibrary_Example"; - productReference = 482B0A4260E4A67A19750A7411E8FBBD /* Pods_MFControlLibrary_Example.framework */; + name = MFControlLibrary; + productName = MFControlLibrary; + productReference = FA654324DE78FD350D7693E3E50E5ACC /* MFControlLibrary.framework */; productType = "com.apple.product-type.framework"; }; - 8A23A29B7C84EEA35C5AF298F4206127 /* Pods-MFControlLibrary_Tests */ = { + C9E76D6A3FAB4F6E7D0220FF17224FC9 /* Pods-MFControlLibrary_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = B3D7FA033D56CEAF0D529AEBE0C2F4C2 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Tests" */; + buildConfigurationList = 15D936933069070BFE96230A438F734A /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Tests" */; buildPhases = ( - 84A9A133B86CA156D93CC7133B3064D6 /* Sources */, - 4084303B454FA204799D1BE8FE7F5826 /* Frameworks */, - ADBF11FFEDEA7DEE1E91C9608AAB03B4 /* Headers */, + BC0E422B2DE2DE931E0734BF3935FA83 /* Sources */, + 4635C8A8D2D1525BF24A41D7AB280A00 /* Frameworks */, + 0FEB909D12272C5B580A5D31D245D66F /* Headers */, ); buildRules = ( ); dependencies = ( + 6C70077C035F9F9FDF1E9F263565CB24 /* PBXTargetDependency */, ); name = "Pods-MFControlLibrary_Tests"; productName = "Pods-MFControlLibrary_Tests"; - productReference = 641C83876D4147896485D798953D1DD1 /* Pods_MFControlLibrary_Tests.framework */; + productReference = 3AA1F95E35F41F3CDDF171D24B890707 /* Pods_MFControlLibrary_Tests.framework */; productType = "com.apple.product-type.framework"; }; - CCB6BAF496980B378A8480C4C9553D06 /* MFControlLibrary */ = { + D52144DE9D7255DE912490FF5A806573 /* Masonry */ = { isa = PBXNativeTarget; - buildConfigurationList = 135149B1A3F4CE7A8472A12EACDAB904 /* Build configuration list for PBXNativeTarget "MFControlLibrary" */; + buildConfigurationList = 02D024184BD368B565F3B6257DF3C605 /* Build configuration list for PBXNativeTarget "Masonry" */; buildPhases = ( - 4C4FF5F41885E7DE8E056A17D5260CBC /* Sources */, - 1FFF41946B6E72F0F6F941D35B466E38 /* Frameworks */, - 77804FDB852CBBE9A11CF796608FD27E /* Headers */, + 00A62ED60FF8A98AB74C8F2CECD850BA /* Sources */, + F6EC657AC5A7BEE9A3D288B582F4C5E9 /* Frameworks */, + F3E9930C736C01D12F5733EFD1F0A948 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = MFControlLibrary; - productName = MFControlLibrary; - productReference = D7A6A5A12BA2A18B57480FEFAFF48D87 /* MFControlLibrary.framework */; + name = Masonry; + productName = Masonry; + productReference = B5554950AF1AF8F2FCE74F5A1065EB0E /* Masonry.framework */; + productType = "com.apple.product-type.framework"; + }; + D9C87A6BB514A3EAF021C8C1DFD64C07 /* Pods-MFControlLibrary_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 488CF8B00958874AC4E232A81E904495 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Example" */; + buildPhases = ( + 9897DB3311D88A2ACB411611214739A3 /* Sources */, + 2A18C8F11E54D9F7FEF285C028F8C37F /* Frameworks */, + 2D497C341002080843AB74334E85B97C /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 5D2A6928F4790A67C238FEA96AC1EB99 /* PBXTargetDependency */, + 0260B32C8D221EC33E90FF0098496D20 /* PBXTargetDependency */, + ); + name = "Pods-MFControlLibrary_Example"; + productName = "Pods-MFControlLibrary_Example"; + productReference = 220D81933AFD3A189375D5E2EB4C4715 /* Pods_MFControlLibrary_Example.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -323,78 +698,122 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = BAF77C70F7A949D57D7D7BA45E477BBB /* Products */; + productRefGroup = ED1975D0D9EE62470F81E0662E3004A7 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - CCB6BAF496980B378A8480C4C9553D06 /* MFControlLibrary */, - 0F02C0E1763CDCA573D8990A414805A4 /* Pods-MFControlLibrary_Example */, - 8A23A29B7C84EEA35C5AF298F4206127 /* Pods-MFControlLibrary_Tests */, + D52144DE9D7255DE912490FF5A806573 /* Masonry */, + 8CF474B1912073526BE51159F44BC155 /* MFControlLibrary */, + D9C87A6BB514A3EAF021C8C1DFD64C07 /* Pods-MFControlLibrary_Example */, + C9E76D6A3FAB4F6E7D0220FF17224FC9 /* Pods-MFControlLibrary_Tests */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 4C4FF5F41885E7DE8E056A17D5260CBC /* Sources */ = { + 00A62ED60FF8A98AB74C8F2CECD850BA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E1D4424EFA5F7FE2EAC6014542C1ACC2 /* MFControlLibrary-dummy.m in Sources */, - B1F56A3181CC60780C3C8A0BBD7ED8E0 /* ReplaceMe.m in Sources */, + 53BDF81D0A52EA526D597A5C5B139D7F /* MASCompositeConstraint.m in Sources */, + 59F81DE0305CC2AC448D2A3C6B3280A2 /* MASConstraint.m in Sources */, + 73BBDACC22CCA36A6DAAA167AD780BAF /* MASConstraintMaker.m in Sources */, + 6C23BBF56ED4DCC10CA1765A6736D1F8 /* MASLayoutConstraint.m in Sources */, + A08A8AB356264E248D01F1BC0EF08166 /* Masonry-dummy.m in Sources */, + A7370CE9231F9A4927142D79021879EC /* MASViewAttribute.m in Sources */, + 756DF24546C7D91459DCADC8F1C98660 /* MASViewConstraint.m in Sources */, + E72EDE323AC9F92EC8A00A93AC186093 /* NSArray+MASAdditions.m in Sources */, + 0F3DF5C3BEFCC9838B53C37735B414BE /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, + F4B3E44D5D2F6508BC1BB35A9FBDEC70 /* View+MASAdditions.m in Sources */, + 8A6EEF68E7625AB66A3A8DED1594F88F /* ViewController+MASAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 84A9A133B86CA156D93CC7133B3064D6 /* Sources */ = { + 3FBCC6E43E851695EB04BCC324F38AFB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 969B3601696D045DDA009BA1F03DB696 /* Pods-MFControlLibrary_Tests-dummy.m in Sources */, + CFF6E5581E9537240F966353221A3981 /* MFAlterView.m in Sources */, + F0900A1C481F10C23169C7B2B12F62F1 /* MFButton.m in Sources */, + 61719AB3A2630263CD748A9620124DDE /* MFControlLibrary-dummy.m in Sources */, + E649FDD4AE0527DE65EEA41F61D85D93 /* MFTextField.m in Sources */, + 9BBD0C6F02D14A28D8CC8181DCA21D4F /* NSDate+Conversion.m in Sources */, + 4B624B252F44C4B71C38E2F12F21BE3C /* NSMutableAttributedString+ContentStyle.m in Sources */, + BECA95674CBAAB9334C0EC88CBC14325 /* NSObject+Handle.m in Sources */, + EE7005E465DF85FE90AB3D2227A1735E /* NSObject+MathCalculation.m in Sources */, + E80072EA9F2A841C725AB8B0872DEFA8 /* NSObject+SystemSettingJump.m in Sources */, + 403420C1F8C8936E791478B6D702A546 /* PHDView.m in Sources */, + BE157B0FE411C08547AB27A8A7C05A54 /* ReplaceMe.m in Sources */, + 722A8913CC1CD5EC6C904ADBBBDAB81D /* UITableView+Style.m in Sources */, + 9DC95DC043C4E77997325308BA0F481A /* UITableViewCell+SeparatorLine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F171E7F707CC652E1F668BCEFFB59B19 /* Sources */ = { + 9897DB3311D88A2ACB411611214739A3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7EC270161F8CC2FF3DDDF0FF0BFD7EE1 /* Pods-MFControlLibrary_Example-dummy.m in Sources */, + FA743E8ADD56097DCD0F1BF4A41949A5 /* Pods-MFControlLibrary_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BC0E422B2DE2DE931E0734BF3935FA83 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4962081AD81BF033AC851899524D355E /* Pods-MFControlLibrary_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - A10DA502E6544598FE8B065C9478491B /* PBXTargetDependency */ = { + 0260B32C8D221EC33E90FF0098496D20 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Masonry; + target = D52144DE9D7255DE912490FF5A806573 /* Masonry */; + targetProxy = 4CBFE2AEDBD4C91D85EB154B5C995488 /* PBXContainerItemProxy */; + }; + 5D2A6928F4790A67C238FEA96AC1EB99 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = MFControlLibrary; - target = CCB6BAF496980B378A8480C4C9553D06 /* MFControlLibrary */; - targetProxy = 1C17B91B8976E3BBE0F355761AD0288D /* PBXContainerItemProxy */; + target = 8CF474B1912073526BE51159F44BC155 /* MFControlLibrary */; + targetProxy = 988570C3796689E658AF6801E07F9F5F /* PBXContainerItemProxy */; + }; + 6C70077C035F9F9FDF1E9F263565CB24 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Masonry; + target = D52144DE9D7255DE912490FF5A806573 /* Masonry */; + targetProxy = CF4841D07E6CBC856030B15595AAD9B1 /* PBXContainerItemProxy */; + }; + A1B0F3DC0CC3194CA7BB019DF254A92E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Masonry; + target = D52144DE9D7255DE912490FF5A806573 /* Masonry */; + targetProxy = 0529A3E4F704A1EE2A0D00DCD5A485AA /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 05B4F01E42B18DB3E70E505566A53892 /* Release */ = { + 04AB3D6DA353DAB7B664E0F253318F85 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2C69948343F40A6FF55BDC988B70253D /* Pods-MFControlLibrary_Tests.release.xcconfig */; + baseConfigurationReference = 0D90C17FF0F8629A92CBDEE9E9EFAA5C /* Pods-MFControlLibrary_Tests.debug.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -406,165 +825,242 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 2CDEF3ABB0DD4068A62389066C80FD06 /* Release */ = { + 0E856C659AD8E4C09B9EC5557F7D727B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 447237EEF3688B785D2086B390412672 /* MFControlLibrary.xcconfig */; + baseConfigurationReference = 61C635FA63B207AC12EA2BD25D894A65 /* Masonry.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/MFControlLibrary/MFControlLibrary-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MFControlLibrary/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Masonry/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/MFControlLibrary/MFControlLibrary.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = MFControlLibrary; + MODULEMAP_FILE = "Target Support Files/Masonry/Masonry.modulemap"; + PRODUCT_NAME = Masonry; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 345CC476DF4A7516DBD2220CF5035FF3 /* Debug */ = { + 1CDAB5613991E411E5990BAF694995C5 /* 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_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 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; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; 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_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 636997E634995D342D0D9E3BA464D125 /* Debug */ = { + 1F2B05BDAA1F32F9845FBF35781F57DB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 447237EEF3688B785D2086B390412672 /* MFControlLibrary.xcconfig */; + baseConfigurationReference = 61C635FA63B207AC12EA2BD25D894A65 /* Masonry.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Masonry/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Masonry/Masonry.modulemap"; + PRODUCT_NAME = Masonry; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 62FBE130DED49338BE6A9FC20D010692 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 181D4807DCD2B6EA3F1741FD7049BB3A /* MFControlLibrary.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/MFControlLibrary/MFControlLibrary-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MFControlLibrary/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/MFControlLibrary/MFControlLibrary.modulemap"; + PRODUCT_NAME = MFControlLibrary; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 7A74704EF88A370DAA04B235F475B4CC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 181D4807DCD2B6EA3F1741FD7049BB3A /* MFControlLibrary.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/MFControlLibrary/MFControlLibrary-prefix.pch"; INFOPLIST_FILE = "Target Support Files/MFControlLibrary/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/MFControlLibrary/MFControlLibrary.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = MFControlLibrary; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 717E77604BFBB04BEAF56608A1CB2EDE /* Release */ = { + 7B62A85C412D689EF418FA67DA770A41 /* 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_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 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; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 7949A3973D39FDF66239D7DEAFF638C6 /* Debug */ = { + 86CB8AADF8FF059DCBC49A244060C325 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 343F847B82A5B9AF48CC4214BDAB494F /* Pods-MFControlLibrary_Example.debug.xcconfig */; buildSettings = { @@ -573,20 +1069,16 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -600,86 +1092,89 @@ }; name = Debug; }; - A4F8C67CAF85522257D38C19BB8613E8 /* Release */ = { + C616168EA4BF09A0664C4DA284F389E4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B7FAF284A44B2A058CC666A1C567C40F /* Pods-MFControlLibrary_Example.release.xcconfig */; + baseConfigurationReference = 2C69948343F40A6FF55BDC988B70253D /* Pods-MFControlLibrary_Tests.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MFControlLibrary_Example; + PRODUCT_NAME = Pods_MFControlLibrary_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - BCA2B3D416FA9FC0DBDE0A8AF240868D /* Debug */ = { + F8FDD68E3871B3956200A3607C221F1B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0D90C17FF0F8629A92CBDEE9E9EFAA5C /* Pods-MFControlLibrary_Tests.debug.xcconfig */; + baseConfigurationReference = B7FAF284A44B2A058CC666A1C567C40F /* Pods-MFControlLibrary_Example.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MFControlLibrary_Tests; + PRODUCT_NAME = Pods_MFControlLibrary_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 135149B1A3F4CE7A8472A12EACDAB904 /* Build configuration list for PBXNativeTarget "MFControlLibrary" */ = { + 02D024184BD368B565F3B6257DF3C605 /* Build configuration list for PBXNativeTarget "Masonry" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1F2B05BDAA1F32F9845FBF35781F57DB /* Debug */, + 0E856C659AD8E4C09B9EC5557F7D727B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15D936933069070BFE96230A438F734A /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 636997E634995D342D0D9E3BA464D125 /* Debug */, - 2CDEF3ABB0DD4068A62389066C80FD06 /* Release */, + 04AB3D6DA353DAB7B664E0F253318F85 /* Debug */, + C616168EA4BF09A0664C4DA284F389E4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -687,26 +1182,26 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 345CC476DF4A7516DBD2220CF5035FF3 /* Debug */, - 717E77604BFBB04BEAF56608A1CB2EDE /* Release */, + 1CDAB5613991E411E5990BAF694995C5 /* Debug */, + 7B62A85C412D689EF418FA67DA770A41 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 64B0B087E3EB3DC803ADA4BC9E0AFCD6 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Example" */ = { + 488CF8B00958874AC4E232A81E904495 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7949A3973D39FDF66239D7DEAFF638C6 /* Debug */, - A4F8C67CAF85522257D38C19BB8613E8 /* Release */, + 86CB8AADF8FF059DCBC49A244060C325 /* Debug */, + F8FDD68E3871B3956200A3607C221F1B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B3D7FA033D56CEAF0D529AEBE0C2F4C2 /* Build configuration list for PBXNativeTarget "Pods-MFControlLibrary_Tests" */ = { + F0F073FE5B0906CEB0F2F9B6CB17F147 /* Build configuration list for PBXNativeTarget "MFControlLibrary" */ = { isa = XCConfigurationList; buildConfigurations = ( - BCA2B3D416FA9FC0DBDE0A8AF240868D /* Debug */, - 05B4F01E42B18DB3E70E505566A53892 /* Release */, + 7A74704EF88A370DAA04B235F475B4CC /* Debug */, + 62FBE130DED49338BE6A9FC20D010692 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary-umbrella.h b/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary-umbrella.h index 7c405b8..cf0ffe2 100644 --- a/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary-umbrella.h +++ b/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary-umbrella.h @@ -10,6 +10,19 @@ #endif #endif +#import "MFCategoryHeader.h" +#import "NSDate+Conversion.h" +#import "NSMutableAttributedString+ContentStyle.h" +#import "NSObject+Handle.h" +#import "NSObject+MathCalculation.h" +#import "NSObject+SystemSettingJump.h" +#import "UITableView+Style.h" +#import "PHDView.h" +#import "MFAlterView.h" +#import "MFButton.h" +#import "MFCommonToolHeader.h" +#import "MFTextField.h" +#import "UITableViewCell+SeparatorLine.h" FOUNDATION_EXPORT double MFControlLibraryVersionNumber; FOUNDATION_EXPORT const unsigned char MFControlLibraryVersionString[]; diff --git a/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary.xcconfig b/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary.xcconfig index d4d9742..12238a6 100644 --- a/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary.xcconfig +++ b/Example/Pods/Target Support Files/MFControlLibrary/MFControlLibrary.xcconfig @@ -1,6 +1,8 @@ CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +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} diff --git a/Example/Pods/Target Support Files/Masonry/Info.plist b/Example/Pods/Target Support Files/Masonry/Info.plist new file mode 100644 index 0000000..b35ab35 --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Masonry/Masonry-dummy.m b/Example/Pods/Target Support Files/Masonry/Masonry-dummy.m new file mode 100644 index 0000000..04001b1 --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Masonry-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Masonry : NSObject +@end +@implementation PodsDummy_Masonry +@end diff --git a/Example/Pods/Target Support Files/Masonry/Masonry-prefix.pch b/Example/Pods/Target Support Files/Masonry/Masonry-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Masonry-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Masonry/Masonry-umbrella.h b/Example/Pods/Target Support Files/Masonry/Masonry-umbrella.h new file mode 100644 index 0000000..3fe9c4c --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Masonry-umbrella.h @@ -0,0 +1,31 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "MASCompositeConstraint.h" +#import "MASConstraint+Private.h" +#import "MASConstraint.h" +#import "MASConstraintMaker.h" +#import "MASLayoutConstraint.h" +#import "Masonry.h" +#import "MASUtilities.h" +#import "MASViewAttribute.h" +#import "MASViewConstraint.h" +#import "NSArray+MASAdditions.h" +#import "NSArray+MASShorthandAdditions.h" +#import "NSLayoutConstraint+MASDebugAdditions.h" +#import "View+MASAdditions.h" +#import "View+MASShorthandAdditions.h" +#import "ViewController+MASAdditions.h" + +FOUNDATION_EXPORT double MasonryVersionNumber; +FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; + diff --git a/Example/Pods/Target Support Files/Masonry/Masonry.modulemap b/Example/Pods/Target Support Files/Masonry/Masonry.modulemap new file mode 100644 index 0000000..06ec492 --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Masonry.modulemap @@ -0,0 +1,6 @@ +framework module Masonry { + umbrella header "Masonry-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Masonry/Masonry.xcconfig b/Example/Pods/Target Support Files/Masonry/Masonry.xcconfig new file mode 100644 index 0000000..e6329a3 --- /dev/null +++ b/Example/Pods/Target Support Files/Masonry/Masonry.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +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}/Masonry +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.markdown index 306e1e4..9c6ddfa 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.markdown @@ -23,4 +23,26 @@ 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. + +## 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 diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.plist index 32a088a..1e73059 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-acknowledgements.plist @@ -41,6 +41,34 @@ THE SOFTWARE. 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 diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-frameworks.sh index 04d0ee4..d7454d6 100755 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-frameworks.sh @@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +27,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,6 +58,15 @@ install_framework() fi } +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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 @@ -76,7 +89,7 @@ strip_invalid_archs() { archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -89,10 +102,12 @@ strip_invalid_archs() { if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/MFControlLibrary/MFControlLibrary.framework" + install_framework "${BUILT_PRODUCTS_DIR}/MFControlLibrary/MFControlLibrary.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/MFControlLibrary/MFControlLibrary.framework" + install_framework "${BUILT_PRODUCTS_DIR}/MFControlLibrary/MFControlLibrary.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-resources.sh b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-resources.sh index aed060f..a7df440 100755 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -44,29 +48,29 @@ EOM 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}" + 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}" + 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}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$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\"" + 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\"" + 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\"" + 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) @@ -74,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.debug.xcconfig index 44b71ba..444589d 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.debug.xcconfig @@ -1,8 +1,8 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "MFControlLibrary" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "MFControlLibrary" -framework "Masonry" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.release.xcconfig index 44b71ba..444589d 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Example/Pods-MFControlLibrary_Example.release.xcconfig @@ -1,8 +1,8 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "MFControlLibrary" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "MFControlLibrary" -framework "Masonry" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.markdown index 102af75..2a48181 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.markdown @@ -1,3 +1,25 @@ # 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 diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.plist index 7acbad1..ae25b59 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-acknowledgements.plist @@ -12,6 +12,34 @@ 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 diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-frameworks.sh index 0f29f13..88144a7 100755 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-frameworks.sh @@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +27,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,6 +58,15 @@ install_framework() fi } +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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 @@ -76,7 +89,7 @@ strip_invalid_archs() { archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -87,6 +100,13 @@ strip_invalid_archs() { fi } + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" +fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-resources.sh index aed060f..a7df440 100755 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -44,29 +48,29 @@ EOM 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}" + 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}" + 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}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$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\"" + 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\"" + 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\"" + 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) @@ -74,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.debug.xcconfig index ca1dfd3..bb8f55d 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.debug.xcconfig @@ -1,7 +1,8 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Masonry" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.release.xcconfig index ca1dfd3..bb8f55d 100644 --- a/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-MFControlLibrary_Tests/Pods-MFControlLibrary_Tests.release.xcconfig @@ -1,7 +1,8 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MFControlLibrary/MFControlLibrary.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Masonry" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/MFControlLibrary.podspec b/MFControlLibrary.podspec index 5e7e0bd..4b246cd 100644 --- a/MFControlLibrary.podspec +++ b/MFControlLibrary.podspec @@ -9,34 +9,37 @@ Pod::Spec.new do |s| s.name = 'MFControlLibrary' s.version = '0.1.0' - s.summary = 'A short description of MFControlLibrary.' - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! + s.summary = '该控件库为日常所常用工具类集合,使用便捷' s.description = <<-DESC -TODO: Add long description of the pod here. + 库文件主要有一下几类功能: + 1.宏定义类:提供常用的宏定义(如数字比较,判断等) + 2.常用类类目:提供常用的分类方法(如日期转,富文本等) + 3.常用工具类:提供各种常用的小工具(如弹窗等) DESC s.homepage = 'https://github.com/953950782@qq.com/MFControlLibrary' # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { '953950782@qq.com' => 'xmf@xkeshi.com' } + s.author = { 'mf' => 'weekendlittleant@126.com' } s.source = { :git => 'https://github.com/953950782@qq.com/MFControlLibrary.git', :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' s.ios.deployment_target = '8.0' - s.source_files = 'MFControlLibrary/Classes/**/*' + s.frameworks = 'UIKit', 'Foundation' + + s.source_files = 'MFControlLibrary/**/*.{h,m}' # s.resource_bundles = { # 'MFControlLibrary' => ['MFControlLibrary/Assets/*.png'] # } - # s.public_header_files = 'Pod/Classes/**/*.h' + s.public_header_files = 'MFControlLibrary/**/*.h' + + #s.public_header_files = 'Pod/Classes/**/*.h' # s.frameworks = 'UIKit', 'MapKit' # s.dependency 'AFNetworking', '~> 2.3' + s.dependency 'Masonry' + end diff --git a/MFControlLibrary/Category/MFCategoryHeader.h b/MFControlLibrary/Category/MFCategoryHeader.h new file mode 100644 index 0000000..76ef38b --- /dev/null +++ b/MFControlLibrary/Category/MFCategoryHeader.h @@ -0,0 +1,18 @@ +// +// MFCategoryHeader.h +// Pods +// +// Created by XuMengFan on 2017/7/25. +// +// + +#ifndef MFCategoryHeader_h +#define MFCategoryHeader_h + +#import //NSDate和NSString互转 + +#import //富文本样式 + +#import //数学计算 + +#endif /* MFCategoryHeader_h */ diff --git a/MFControlLibrary/Category/NSDate/NSDate+Conversion.h b/MFControlLibrary/Category/NSDate/NSDate+Conversion.h new file mode 100644 index 0000000..8ece522 --- /dev/null +++ b/MFControlLibrary/Category/NSDate/NSDate+Conversion.h @@ -0,0 +1,67 @@ +// +// NSDate+Conversion.h +// Pods +// +// Created by XuMengFan on 2017/7/25. +// +// + +#import + +/** + * 设置日期年月日格式(yyyy-MM-dd) + */ +typedef NS_ENUM(NSInteger, NSDateFormatPrefixType) { + NSDateFormatPrefixTypeUndefine = 1, + + NSDateFormatPrefixTypeYear = 2, + NSDateFormatPrefixTypeMonth = 3, + NSDateFormatPrefixTypeDay = 4, + + NSDateFormatPrefixTypeYearMonth = 5, + NSDateFormatPrefixTypeYearDay = 6, + NSDateFormatPrefixTypeMonthDay = 7, + + NSDateFormatPrefixTypeYearMonthDay = 8, +}; + +/** + * 设置日期时分秒格式(HH:mm:ss) + */ +typedef NS_ENUM(NSInteger, NSDateFormatSuffixType) { + NSDateFormatSuffixTypeUndefine = 1, + + NSDateFormatSuffixTypeHour = 2, + NSDateFormatSuffixTypeMinute = 3, + NSDateFormatSuffixTypeSecond = 4, + + NSDateFormatSuffixTypeHourMinute = 5, + NSDateFormatSuffixTypeHourSecond = 6, + NSDateFormatSuffixTypeMinuteSecond = 7, + + NSDateFormatSuffixTypeHourMinuteSecond = 8, +}; + +@interface NSDate (Conversion) + +/** + * 将NSDate转换为NSString + */ ++ (NSString *)stringFromDate:(NSDate *)date withFormat:(NSString *)dateFromat; + +/** + * 将NSString转换为NSDate + */ ++ (NSDate *)dateFromSting:(NSString *)string withFormat:(NSString *)dateFromat; + +/** + * 获取日期转换格式 + * + * @param dateFormatPrefixType 年月日格式 + * @param dateFormatSuffixType 时分秒格式 + * @return @(NSString) + */ ++ (NSString *)getDateFormatWithPrefixType:(NSDateFormatPrefixType)dateFormatPrefixType + suffixType:(NSDateFormatSuffixType)dateFormatSuffixType; + +@end diff --git a/MFControlLibrary/Category/NSDate/NSDate+Conversion.m b/MFControlLibrary/Category/NSDate/NSDate+Conversion.m new file mode 100644 index 0000000..29276a0 --- /dev/null +++ b/MFControlLibrary/Category/NSDate/NSDate+Conversion.m @@ -0,0 +1,132 @@ +// +// NSDate+Conversion.m +// Pods +// +// Created by XuMengFan on 2017/7/25. +// +// + +#import "NSDate+Conversion.h" + +@implementation NSDate (Conversion) + +#pragma mark - public && NSString and NSDate convert each other + +/** + * 将NSDate转换为NSString + */ ++ (NSString *)stringFromDate:(NSDate *)date withFormat:(NSString *)dateFromat +{ + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + [formatter setDateFormat:dateFromat]; + [formatter setTimeZone:[NSTimeZone localTimeZone]]; + NSString *timeStr = [formatter stringFromDate:date]; + return timeStr; +} + +/** + * 将NSString转换为NSDate + */ ++ (NSDate *)dateFromSting:(NSString *)string withFormat:(NSString *)dateFromat +{ + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + [formatter setDateFormat:dateFromat]; + [formatter setTimeZone:[NSTimeZone localTimeZone]]; + NSDate *timeDate = [formatter dateFromString:string]; + return timeDate; +} + +/** + * 获取日期转换格式 + * + * @param dateFormatPrefixType 年月日格式 + * @param dateFormatSuffixType 时分秒格式 + * @return @(NSString) + */ ++ (NSString *)getDateFormatWithPrefixType:(NSDateFormatPrefixType)dateFormatPrefixType + suffixType:(NSDateFormatSuffixType)dateFormatSuffixType +{ + NSString *prefixStr = [self getFormatWithDateFormatPrefixType:dateFormatPrefixType]; + NSString *suffixStr = [self getFormatWithDateFormatSuffixType:dateFormatSuffixType]; + + NSMutableString *formatStr = [[NSMutableString alloc] initWithString:@""]; + if (prefixStr && prefixStr.length > 0) { + [formatStr appendString:prefixStr]; + } + if (suffixStr && suffixStr.length > 0) { + [formatStr appendString:[NSString stringWithFormat:@" %@", suffixStr]]; + } + return formatStr; +} + +#pragma mark - private && get dateFormat + ++ (NSString *)getFormatWithDateFormatPrefixType:(NSDateFormatPrefixType)dateFormatPrefixType +{ + NSString *prefixStr = nil; + switch (dateFormatPrefixType) { + case NSDateFormatPrefixTypeUndefine: + prefixStr = nil; + break; + case NSDateFormatPrefixTypeYear: + prefixStr = @"yyyy"; + break; + case NSDateFormatPrefixTypeMonth: + prefixStr = @"MM"; + break; + case NSDateFormatPrefixTypeDay: + prefixStr = @"dd"; + break; + case NSDateFormatPrefixTypeYearMonth: + prefixStr = @"yyyy-MM"; + break; + case NSDateFormatPrefixTypeYearDay: + prefixStr = @"yyyy-dd"; + break; + case NSDateFormatPrefixTypeMonthDay: + prefixStr = @"MM-dd"; + break; + case NSDateFormatPrefixTypeYearMonthDay: + prefixStr = @"yyyy-MM-dd"; + break; + default: + break; + } + return prefixStr; +} + ++ (NSString *)getFormatWithDateFormatSuffixType:(NSDateFormatSuffixType)dateFormatSuffixType +{ + NSString *suffixStr = nil; + switch (dateFormatSuffixType) { + case NSDateFormatSuffixTypeUndefine: + suffixStr = nil; + break; + case NSDateFormatSuffixTypeHour: + suffixStr = @"HH"; + break; + case NSDateFormatSuffixTypeMinute: + suffixStr = @"mm"; + break; + case NSDateFormatSuffixTypeSecond: + suffixStr = @"ss"; + break; + case NSDateFormatSuffixTypeHourMinute: + suffixStr = @"HH:mm"; + break; + case NSDateFormatSuffixTypeHourSecond: + suffixStr = @"HH:ss"; + break; + case NSDateFormatSuffixTypeMinuteSecond: + suffixStr = @"mm:ss"; + break; + case NSDateFormatSuffixTypeHourMinuteSecond: + suffixStr = @"HH:mm:ss"; + break; + default: + break; + } + return suffixStr; +} + +@end diff --git a/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.h b/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.h new file mode 100644 index 0000000..22ba386 --- /dev/null +++ b/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.h @@ -0,0 +1,85 @@ +// +// NSMutableAttributedString+ContentStyle.h +// Pods +// +// Created by XuMengFan on 2017/8/29. +// +// + +#import + +@interface NSMutableAttributedString (ContentStyle) + +#pragma mark ========== 字体大小和颜色 ========== + +/** + * 改变指定范围内字符串的字体和颜色 + * + * @param color UIColor类型,可以为nil + * @param font UIFont类型, 可以为nil + * @param range NSRange类型,不可为nil + */ +- (void)addColor:(UIColor *)color font:(UIFont *)font range:(NSRange)range; + +/** + * 改变多处指定范围内字符串的字体和颜色 + * + * @param colorArray 颜色数组,可以为nil + * @param fontArray 字体数组,可以为nil + * @param rangeArray 范围数组,不可以为nil + */ +- (void)addColorArray:(NSArray *)colorArray fontArray:(NSArray *)fontArray rangeArray:(NSArray *)rangeArray; + +#pragma mark ========== 图片转富文本 ========== + +/** + * 将图片转化为富文本 + * + * @param image 图片 + * @return 富文本 + */ ++ (NSAttributedString *)attributedStringFromImage:(UIImage *)image; + +#pragma mark ========== UIView转图片/富文本 ========== + +/** + * 将view转换为富文本(清晰度不够,不建议使用) + * + * @param view UIView + * @return 富文本 + */ ++ (NSAttributedString *)attributedStringFromView:(UIView *)view; + +/** + * 将view转换为图片 + * + * @param view UIView + * @return 图片 + */ ++ (UIImage *)imageFromView:(UIView *)view; + +#pragma mark ========== 删除线 ========== + +/** + * 添加中间删除线 + * + * @param range NSRange + */ +- (void)addStrikethroughInRange:(NSRange)range; + +/** + * 添加中间删除线(删除线的颜色自定义) + * + @param range NSRange + @param color UIColor,可以为nil + */ +- (void)addStrikethroughInRange:(NSRange)range withColor:(UIColor *)color; + +#pragma mark ========== 下滑线 ========== + +/** + * 添加下划线(下划线颜色可自定义,也可传nil) + */ +- (void)addUnderLineInRange:(NSRange)range withColor:(UIColor *)color; + +@end diff --git a/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.m b/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.m new file mode 100644 index 0000000..df6e77a --- /dev/null +++ b/MFControlLibrary/Category/NSMutableAttributedString/NSMutableAttributedString+ContentStyle.m @@ -0,0 +1,165 @@ + +// +// NSMutableAttributedString+ContentStyle.m +// Pods +// +// Created by XuMengFan on 2017/8/29. +// +// + +#import "NSMutableAttributedString+ContentStyle.h" + +@implementation NSMutableAttributedString (ContentStyle) + +#pragma mark ========== 字体大小和颜色 ========== + +/** + * 改变指定范围内字符串的字体和颜色 + * + * @param color UIColor类型,可以为nil + * @param font UIFont类型, 可以为nil + * @param range NSRange类型,不可为nil + */ +- (void)addColor:(UIColor *)color font:(UIFont *)font range:(NSRange)range +{ + if (color && font) { + [self addAttributes:@{NSForegroundColorAttributeName : color, + NSFontAttributeName : font} range:range]; + }else { + if (color) { + [self addAttributes:@{NSForegroundColorAttributeName : color} range:range]; + } + if (font) { + [self addAttributes:@{NSFontAttributeName : font} range:range]; + } + } +} + +/** + * 改变多处指定范围内字符串的字体和颜色 + * + * @param colorArray 颜色数组,可以为nil + * @param fontArray 字体数组,可以为nil + * @param rangeArray 范围数组,不可以为nil + */ +- (void)addColorArray:(NSArray *)colorArray fontArray:(NSArray *)fontArray rangeArray:(NSArray *)rangeArray +{ + for (int i = 0; i < rangeArray.count; i++) { + NSInteger colorNum = 0; + UIColor * color = nil; + if (colorArray) { + if (i < colorArray.count) { + colorNum = i; + }else { + colorNum = colorArray.count - 1; + } + color = colorArray[colorNum]; + } + + NSInteger fontNum = 0; + UIFont * font = nil; + if (fontArray) { + if (i < fontArray.count) { + fontNum = i; + }else { + fontNum = fontArray.count - 1; + } + font = fontArray[fontNum]; + } + + [self addColor:color font:font range:[rangeArray[i] rangeValue]]; + } +} + +#pragma mark ========== 图片转富文本 ========== + +/** + * 将图片转化为富文本 + * + * @param image 图片 + * @return 富文本 + */ ++ (NSAttributedString *)attributedStringFromImage:(UIImage *)image +{ + NSTextAttachment * textAttachment = [[NSTextAttachment alloc] init]; + textAttachment.image = image; + textAttachment.bounds = CGRectMake(0, 0, image.size.width, image.size.height); + NSAttributedString * attributeString = [NSAttributedString attributedStringWithAttachment:textAttachment]; + return attributeString; +} + +#pragma mark ========== UIView转图片/富文本 ========== + +/** + * 将view转换为富文本(清晰度不够,不建议使用) + * + * @param view UIView + * @return 富文本 + */ ++ (NSAttributedString *)attributedStringFromView:(UIView *)view +{ + UIImage *image = [self imageFromView:view]; + return [self attributedStringFromImage:image]; +} + +/** + * 将view转换为图片 + * + * @param view UIView + * @return 图片 + */ ++ (UIImage *)imageFromView:(UIView *)view +{ + UIGraphicsBeginImageContext(view.bounds.size); + CGContextRef ctx = UIGraphicsGetCurrentContext(); + [view.layer renderInContext:ctx]; + UIImage* tImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return tImage; +} + +#pragma mark ========== 删除线 ========== + +/** + * 添加中间删除线 + * + * @param range NSRange + */ +- (void)addStrikethroughInRange:(NSRange)range +{ + if ([[UIDevice currentDevice].systemVersion doubleValue] >= 10.3) { + [self addAttributes:@{NSStrikethroughStyleAttributeName : @(NSUnderlineStyleSingle), NSBaselineOffsetAttributeName : @(0)} range:range]; + }else { + [self addAttributes:@{NSStrikethroughStyleAttributeName : @(NSUnderlineStyleSingle)} range:range]; + } +} + +/** + * 添加中间删除线(删除线的颜色自定义) + * + @param range NSRange + @param color UIColor,可以为nil + */ +- (void)addStrikethroughInRange:(NSRange)range withColor:(UIColor *)color +{ + [self addStrikethroughInRange:range]; + if (color) { + [self addAttributes:@{NSStrikethroughColorAttributeName : color} range:range]; + } +} + +#pragma mark ========== 下滑线 ========== + +/** + * 添加下划线(下划线颜色可自定义,也可传nil) + */ +- (void)addUnderLineInRange:(NSRange)range withColor:(UIColor *)color +{ + [self addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:range]; + + if (color) { + [self addAttributes:@{NSForegroundColorAttributeName : color} range:range]; + } +} + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+Handle.h b/MFControlLibrary/Category/NSObject/NSObject+Handle.h new file mode 100644 index 0000000..a7a7f32 --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+Handle.h @@ -0,0 +1,13 @@ +// +// NSObject+Handle.h +// Pods +// +// Created by XuMengFan on 2017/7/13. +// +// + +#import + +@interface NSObject (Handle) + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+Handle.m b/MFControlLibrary/Category/NSObject/NSObject+Handle.m new file mode 100644 index 0000000..e98522e --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+Handle.m @@ -0,0 +1,19 @@ +// +// NSObject+Handle.m +// Pods +// +// Created by XuMengFan on 2017/7/13. +// +// + +#import "NSObject+Handle.h" + +@implementation NSObject (Handle) + +- (BOOL)isEmpty +{ + return NO; + +} + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.h b/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.h new file mode 100644 index 0000000..f3bee17 --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.h @@ -0,0 +1,25 @@ +// +// NSObject+MathCalculation.h +// Pods +// +// Created by XuMengFan on 2017/8/30. +// +// + +#import + +@interface NSObject (MathCalculation) + +#pragma mark ========== 截取 整数/小数部分数值 ========== + +/** + * 获取数字num的小数部分数值 + */ ++ (double)decimalPartOfDoubleNum:(double)num; + +/** + * 获取数字num的整数部分数值 + */ ++ (double)integerPartOfDoubleNum:(double)num; + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.m b/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.m new file mode 100644 index 0000000..f8b0ace --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+MathCalculation.m @@ -0,0 +1,49 @@ +// +// NSObject+MathCalculation.m +// Pods +// +// Created by XuMengFan on 2017/8/30. +// +// + +#import "NSObject+MathCalculation.h" + +@implementation NSObject (MathCalculation) + +#pragma mark ========== 截取 整数/小数部分数值 ========== + +/** + * 获取数字num的小数部分数值 + */ ++ (double)decimalPartOfDoubleNum:(double)num +{ + double integerPartValue; + double decimalPartValue = modf(num, &integerPartValue); + return decimalPartValue; +} + +/** + * 获取数字num的整数部分数值 + */ ++ (double)integerPartOfDoubleNum:(double)num +{ + double integerPartValue; + modf(num, &integerPartValue); + return integerPartValue; +} + +#pragma mark ========== 向 下/上取整数值 ========== + ++ (double)upIntegerValueOfDoubleNum:(double)num +{ + double upIntegerValue = ceil(num); + return upIntegerValue; +} + ++ (double)douwnIntegerValueOfDoubleNum:(double)num +{ + double upIntegerValue = floor(num); + return upIntegerValue; +} + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.h b/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.h new file mode 100644 index 0000000..0c78f99 --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.h @@ -0,0 +1,41 @@ +// +// NSObject+SystemSettingJump.h +// MFWIFIExample +// +// Created by XuMengFan on 17/6/1. +// Copyright © 2017年 MF. All rights reserved. +// + +#import +#import + +typedef NS_ENUM(NSInteger, SystemSettingType) { + SystemSettingTypeWifi = 1, /**< 无线局域网*/ + SystemSettingTypeBluetooth = 2, /**< 蓝牙*/ + SystemSettingTypeMobileData = 3, /**< 蜂窝移动网络*/ + SystemSettingTypePersonalHotspot = 4, /**< 个人热点*/ + SystemSettingTypeCarrier = 5, /**< 运营商*/ + SystemSettingTypeNotification = 6, /**< 通知*/ + SystemSettingTypeGeneral = 7, /**< 通用*/ + SystemSettingTypeAbout = 8, /**< 通用-关于本机*/ + SystemSettingTypeKeyboard = 9, /**< 通用-键盘*/ + SystemSettingTypeAccessibility = 10,/**< 通用-辅助功能*/ + SystemSettingTypeInternational = 11,/**< 通用-语言与地区*/ + SystemSettingTypeReset = 12,/**< 通用-还原*/ + SystemSettingTypeWallpaper = 13,/**< 墙纸*/ + SystemSettingTypeSiri = 14,/**< Siri*/ + SystemSettingTypePrivacy = 15,/**< 隐私*/ + SystemSettingTypeSafari = 16,/**< Safari*/ + SystemSettingTypeMusic = 17,/**< 音乐*/ + SystemSettingTypeMusicEQ = 18,/**< 音乐-均衡器*/ + SystemSettingTypePhotos = 19,/**< 照片与相机*/ + SystemSettingTypeFaceTime = 20,/**< FaceTime*/ +}; + +@interface NSObject (SystemSettingJump) + ++ (void)systemSettingJump:(SystemSettingType)systemSettingType; + ++ (void)customSystemSettingJump:(NSString *)url; + +@end diff --git a/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.m b/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.m new file mode 100644 index 0000000..ea1e327 --- /dev/null +++ b/MFControlLibrary/Category/NSObject/NSObject+SystemSettingJump.m @@ -0,0 +1,157 @@ +// +// NSObject+SystemSettingJump.m +// MFWIFIExample +// +// Created by XuMengFan on 17/6/1. +// Copyright © 2017年 MF. All rights reserved. +// + +#import "NSObject+SystemSettingJump.h" + +/* +无线局域网 App-Prefs:root=WIFI + +蓝牙 App-Prefs:root=Bluetooth + +蜂窝移动网络 App-Prefs:root=MOBILE_DATA_SETTINGS_ID + +个人热点 App-Prefs:root=INTERNET_TETHERING + +运营商 App-Prefs:root=Carrier + +通知 App-Prefs:root=NOTIFICATIONS_ID + +通用 App-Prefs:root=General + +通用-关于本机 App-Prefs:root=General&path=About + +通用-键盘 App-Prefs:root=General&path=Keyboard + +通用-辅助功能 App-Prefs:root=General&path=ACCESSIBILITY + +通用-语言与地区 App-Prefs:root=General&path=INTERNATIONAL + +通用-还原 App-Prefs:root=Reset + +墙纸 App-Prefs:root=Wallpaper + +Siri App-Prefs:root=SIRI + +隐私 App-Prefs:root=Privacy + +Safari App-Prefs:root=SAFARI + +音乐 App-Prefs:root=MUSIC + +音乐-均衡器 App-Prefs:root=MUSIC&path=com.apple.Music:EQ + +照片与相机 App-Prefs:root=Photos + +FaceTime App-Prefs:root=FACETIME +*/ + +@implementation NSObject (SystemSettingJump) + +#pragma mark - public + ++ (void)customSystemSettingJump:(NSString *)url +{ + [self jumpSystemSettingWithUrl:url]; +} + ++ (void)systemSettingJump:(SystemSettingType)systemSettingType +{ + NSString *url = [self getUrlWithSystemSettingType:systemSettingType]; + [self customSystemSettingJump:url]; +} + +#pragma mark - private + ++ (NSString *)getUrlWithSystemSettingType:(SystemSettingType)systemSettingType +{ + NSString *prefix = @"App-Prefs:root="; + NSString *suffix = @""; + switch (systemSettingType) { + case SystemSettingTypeWifi: + suffix = @"WIFI"; + break; + case SystemSettingTypeBluetooth: + suffix = @"Bluetooth"; + break; + case SystemSettingTypeMobileData: + suffix = @"MOBILE_DATA_SETTINGS_ID"; + break; + case SystemSettingTypePersonalHotspot: + suffix = @"INTERNET_TETHERING"; + break; + case SystemSettingTypeCarrier: + suffix = @"Carrier"; + break; + case SystemSettingTypeNotification: + suffix = @"NOTIFICATIONS_ID"; + break; + case SystemSettingTypeGeneral: + suffix = @"General"; + break; + case SystemSettingTypeAbout: + suffix = @"General&path=About"; + break; + case SystemSettingTypeKeyboard: + suffix = @"General&path=Keyboard"; + break; + case SystemSettingTypeAccessibility: + suffix = @"General&path=ACCESSIBILITY"; + break; + case SystemSettingTypeInternational: + suffix = @"General&path=INTERNATIONAL"; + break; + case SystemSettingTypeReset: + suffix = @"Reset"; + break; + case SystemSettingTypeWallpaper: + suffix = @"Wallpaper"; + break; + case SystemSettingTypeSiri: + suffix = @"SIRI"; + break; + case SystemSettingTypePrivacy: + suffix = @"Privacy"; + break; + case SystemSettingTypeSafari: + suffix = @"SAFARI"; + break; + case SystemSettingTypeMusic: + suffix = @"MUSIC"; + break; + case SystemSettingTypeMusicEQ: + suffix = @"MUSIC&path=com.apple.Music:EQ"; + break; + case SystemSettingTypePhotos: + suffix = @"Photos"; + break; + case SystemSettingTypeFaceTime: + suffix = @"FACETIME"; + break; + default: + break; + } + return [prefix stringByAppendingString:suffix]; +} + ++ (void)jumpSystemSettingWithUrl:(NSString *)urlString +{ + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:urlString]]) { + + if ([[UIDevice currentDevice].systemVersion doubleValue] >= 10.0) { + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:nil]; + + } else { + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; + + } + } +} + +@end diff --git a/MFControlLibrary/Category/UITableView/UITableView+Style.h b/MFControlLibrary/Category/UITableView/UITableView+Style.h new file mode 100644 index 0000000..aa995fd --- /dev/null +++ b/MFControlLibrary/Category/UITableView/UITableView+Style.h @@ -0,0 +1,20 @@ +// +// UITableView+Style.h +// Pods +// +// Created by XuMengFan on 2017/12/25. +// +// + +#import + +@interface UITableView (Style) + +- (void)setZeroTableHeaderView; + +- (void)setZeroTableFooterView; + +@property (nonatomic, strong, readonly) UIView *customTableHeaderView; +@property (nonatomic, strong, readonly) UIView *customTableFooterView; + +@end diff --git a/MFControlLibrary/Category/UITableView/UITableView+Style.m b/MFControlLibrary/Category/UITableView/UITableView+Style.m new file mode 100644 index 0000000..168f598 --- /dev/null +++ b/MFControlLibrary/Category/UITableView/UITableView+Style.m @@ -0,0 +1,60 @@ +// +// UITableView+Style.m +// Pods +// +// Created by XuMengFan on 2017/12/25. +// +// + +#import "UITableView+Style.h" + +#import + +@interface UITableView () + +@property (nonatomic, strong, readwrite) UIView *customTableHeaderView; +@property (nonatomic, strong, readwrite) UIView *customTableFooterView; + +@end + +@implementation UITableView (Style) + +- (void)setZeroTableHeaderView +{ + UIView *tableHeaderView = [[UIView alloc] init]; + tableHeaderView.frame = CGRectZero; + self.tableFooterView = tableHeaderView; +} + +- (void)setZeroTableFooterView +{ + UIView *tableFooterView = [[UIView alloc] init]; + tableFooterView.frame = CGRectZero; + self.tableFooterView = tableFooterView; +} + +#pragma mark - getters + +- (UIView *)customTableHeaderView +{ + UIView *customTableHeaderView = objc_getAssociatedObject(self, _cmd); + if (customTableHeaderView == nil) { + customTableHeaderView = [[UIView alloc] init]; + customTableHeaderView.frame = CGRectZero; + objc_setAssociatedObject(self, _cmd, customTableHeaderView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return customTableHeaderView; +} + +- (UIView *)customTableFooterView +{ + UIView *customTableFooterView = objc_getAssociatedObject(self, _cmd); + if (customTableFooterView == nil) { + customTableFooterView = [[UIView alloc] init]; + customTableFooterView.frame = CGRectZero; + objc_setAssociatedObject(self, _cmd, customTableFooterView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return customTableFooterView; +} + +@end diff --git a/MFControlLibrary/Classes/PHDView.h b/MFControlLibrary/Classes/PHDView.h new file mode 100644 index 0000000..617ff4e --- /dev/null +++ b/MFControlLibrary/Classes/PHDView.h @@ -0,0 +1,18 @@ +// +// PHDView.h +// Pods +// +// Created by XuMengFan on 2017/7/8. +// +// + +// /// + +#import + +/* + 测试用的,知道文件添加到哪里 + */ +@interface PHDView : UIView + +@end diff --git a/MFControlLibrary/Classes/PHDView.m b/MFControlLibrary/Classes/PHDView.m new file mode 100644 index 0000000..0bd51b8 --- /dev/null +++ b/MFControlLibrary/Classes/PHDView.m @@ -0,0 +1,21 @@ +// +// PHDView.m +// Pods +// +// Created by XuMengFan on 2017/7/8. +// +// + +#import "PHDView.h" + +@implementation PHDView + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ + +@end diff --git a/MFControlLibrary/CommonTool/MFAlert/MFAlterView.h b/MFControlLibrary/CommonTool/MFAlert/MFAlterView.h new file mode 100644 index 0000000..14be1e4 --- /dev/null +++ b/MFControlLibrary/CommonTool/MFAlert/MFAlterView.h @@ -0,0 +1,19 @@ +// +// MFAlterView.h +// Pods +// +// Created by XuMengFan on 2017/7/10. +// +// + +#import + +@interface MFAlterView : NSObject + ++ (void)showAlertWithTitle:(NSString * _Nullable)title + message:(NSString * _Nullable)message + buttonTitleArray:(NSArray * _Nullable)buttonTitleArray + handler:(void (^ __nullable)(NSInteger index))handler; + +@end + diff --git a/MFControlLibrary/CommonTool/MFAlert/MFAlterView.m b/MFControlLibrary/CommonTool/MFAlert/MFAlterView.m new file mode 100644 index 0000000..1013e94 --- /dev/null +++ b/MFControlLibrary/CommonTool/MFAlert/MFAlterView.m @@ -0,0 +1,74 @@ +// +// MFAlterView.m +// Pods +// +// Created by XuMengFan on 2017/7/10. +// +// + +#import "MFAlterView.h" + +#import + +@interface UIAlertController () + +@property (nonatomic, strong) UIWindow *window; + +@end + +@implementation UIAlertController (cumstom) + +- (void)setWindow:(UIWindow *)window +{ + objc_setAssociatedObject(self, _cmd, window, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (UIWindow *)window +{ + UIWindow *window = objc_getAssociatedObject(self, _cmd); + if (!window) { + window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + window.windowLevel = CGFLOAT_MAX; + window.rootViewController = [[UIViewController alloc] init]; + window.hidden = YES; + objc_setAssociatedObject(self, _cmd, window, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return window; +} + +- (void)beginShow +{ + self.window.hidden = NO; + [self.window.rootViewController presentViewController:self animated:YES completion:nil]; +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + self.window.hidden = YES; + self.window = nil; +} + +@end + +@implementation MFAlterView + ++ (void)showAlertWithTitle:(NSString * _Nullable)title + message:(NSString * _Nullable)message + buttonTitleArray:(NSArray * _Nullable)buttonTitleArray + handler:(void (^ __nullable)(NSInteger index))handler +{ + UIAlertController *alterVC = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; + for (NSString *buttonTitle in buttonTitleArray) { + UIAlertAction *alterAction = [UIAlertAction actionWithTitle:buttonTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + if (handler) { + NSInteger index = [buttonTitleArray indexOfObject:buttonTitle]; + handler(index); + } + }]; + [alterVC addAction:alterAction]; + } + [alterVC beginShow]; +} + +@end diff --git a/MFControlLibrary/CommonTool/MFButton/MFButton.h b/MFControlLibrary/CommonTool/MFButton/MFButton.h new file mode 100644 index 0000000..4d2b768 --- /dev/null +++ b/MFControlLibrary/CommonTool/MFButton/MFButton.h @@ -0,0 +1,26 @@ +// +// MFButton.h +// MFButtonCustomStyleDemo +// +// Created by XuMengFan on 16/9/20. +// Copyright © 2016年 MF. All rights reserved. +// + +#import + +typedef NS_ENUM(NSInteger, MFButtonStyle){ + MFButtonStyleImageLeftTextRight = 1,/**< 图片在左,文字在右*/ + MFButtonStyleImageRightTextLeft = 2,/**< 图片在右,文字在左*/ + MFButtonStyleImageUpTextUnder = 3,/**< 图片在上,文字在下*/ + MFButtonStyleImageUnderTextUp = 4,/**< 图片在下,文字在上*/ + MFButtonStyleDefault = MFButtonStyleImageLeftTextRight/**< 默认系统样式,图片在左,文字在右*/ +}; + +@interface MFButton : UIButton + +@property (nonatomic, assign) MFButtonStyle buttonStyle;/**< 按钮样式,默认系统样式(图片在左,文字在右)*/ +@property (nonatomic, assign) CGFloat topMarginOffset;/**< 距离顶部边界的偏移量,默认是0*/ +@property (nonatomic, assign) CGFloat verticalSpacing;/**< 竖直方向图片和文字间距,默认是0*/ +@property (nonatomic, assign) CGFloat horizontalSpacing;/**< 水平方向图片和文字间距,默认是0*/ + +@end diff --git a/MFControlLibrary/CommonTool/MFButton/MFButton.m b/MFControlLibrary/CommonTool/MFButton/MFButton.m new file mode 100644 index 0000000..84511f9 --- /dev/null +++ b/MFControlLibrary/CommonTool/MFButton/MFButton.m @@ -0,0 +1,110 @@ +// +// MFButton.m +// MFButtonCustomStyleDemo +// +// Created by XuMengFan on 16/9/20. +// Copyright © 2016年 MF. All rights reserved. +// + +#import "MFButton.h" + +@implementation MFButton + ++ (instancetype)buttonWithType:(UIButtonType)buttonType +{ + MFButton *button = [super buttonWithType:buttonType]; + [button defaultSet]; + return button; +} + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self defaultSet]; + } + return self; +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self defaultSet]; + } + return self; +} + +- (void)defaultSet +{ + self.topMarginOffset = 0; + self.verticalSpacing = 0; + self.horizontalSpacing = 0; + self.buttonStyle = MFButtonStyleDefault; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + switch (self.buttonStyle) { + case MFButtonStyleImageRightTextLeft://图片在右,文字在左 + { + CGRect imageViewFrame = self.imageView.frame; + CGRect titleLabelFrame = self.titleLabel.frame; + CGFloat totalWidth = imageViewFrame.size.width + self.horizontalSpacing + titleLabelFrame.size.width; + + titleLabelFrame.origin.x = (self.frame.size.width - totalWidth) / 2; + imageViewFrame.origin.x = titleLabelFrame.origin.x + titleLabelFrame.size.width + self.horizontalSpacing; + + titleLabelFrame.origin.y += self.topMarginOffset; + imageViewFrame.origin.y += self.topMarginOffset; + + self.titleLabel.frame = titleLabelFrame; + self.imageView.frame = imageViewFrame; + } + break; + case MFButtonStyleImageUnderTextUp://图片在下,文字在上 + { + CGRect imageViewFrame = self.imageView.frame; + CGRect titleLabelFrame = self.titleLabel.frame; + CGFloat totalHeight = imageViewFrame.size.height + self.verticalSpacing + titleLabelFrame.size.height; + + titleLabelFrame.origin.y = (self.frame.size.height - totalHeight) / 2 + self.topMarginOffset; + imageViewFrame.origin.y = titleLabelFrame.origin.y + titleLabelFrame.size.height + self.verticalSpacing; + + titleLabelFrame.origin.x = (self.frame.size.width - titleLabelFrame.size.width) / 2; + imageViewFrame.origin.x = (self.frame .size.width - imageViewFrame.size.width) / 2; + + self.titleLabel.frame = titleLabelFrame; + self.imageView.frame = imageViewFrame; + } + break; + case MFButtonStyleImageUpTextUnder://图片在上,文字在下 + { + CGRect imageViewFrame = self.imageView.frame; + CGRect titleLabelFrame = self.titleLabel.frame; + CGFloat totalHeight = imageViewFrame.size.height + self.verticalSpacing + titleLabelFrame.size.height; + + imageViewFrame.origin.y = (self.frame.size.height - totalHeight) / 2 + self.topMarginOffset; + titleLabelFrame.origin.y = imageViewFrame.origin.y + imageViewFrame.size.height + self.verticalSpacing; + + imageViewFrame.origin.x = (self.frame .size.width - imageViewFrame.size.width) / 2; + titleLabelFrame.origin.x = (self.frame.size.width - titleLabelFrame.size.width) / 2; + + self.titleLabel.frame = titleLabelFrame; + self.imageView.frame = imageViewFrame; + } + break; + case MFButtonStyleImageLeftTextRight://图片在左,文字在右 + { + + } + break; + default: + break; + } + +} + +@end diff --git a/MFControlLibrary/CommonTool/MFCommonToolHeader.h b/MFControlLibrary/CommonTool/MFCommonToolHeader.h new file mode 100644 index 0000000..cbcb369 --- /dev/null +++ b/MFControlLibrary/CommonTool/MFCommonToolHeader.h @@ -0,0 +1,18 @@ +// +// MFCommonToolHeader.h +// Pods +// +// Created by XuMengFan on 2017/7/10. +// +// + +#ifndef MFCommonToolHeader_h +#define MFCommonToolHeader_h + +#import //警告框 + +#import //输入框 + +#import //cell分割线 + +#endif /* MFCommonToolHeader_h */ diff --git a/MFControlLibrary/CommonTool/MFTextField/MFTextField.h b/MFControlLibrary/CommonTool/MFTextField/MFTextField.h new file mode 100644 index 0000000..942942a --- /dev/null +++ b/MFControlLibrary/CommonTool/MFTextField/MFTextField.h @@ -0,0 +1,42 @@ +// +// MFTextField.h +// Pods +// +// Created by XuMengFan on 2017/8/29. +// +// + +#import + +typedef NS_ENUM(NSInteger, MFTextFieldRule) { + MFTextFieldRuleOnlyNum = 1,/**< 纯数字*/ + MFTextFieldRuleOnlyLetter = 2,/**< 纯字母*/ + MFTextFieldRuleNumAndLetter = 3,/**< 纯(数字+字母)*/ + MFTextFieldRuleOnlyChinese = 4,/**< 纯汉字*/ +}; + +@protocol MFTextFieldExtendProtocol + +@optional + +- (BOOL)textFieldShouldClearWhenClickClearButton; + +- (BOOL)textFieldShouldReturnWhenClickReturnButton; + +@end + +@interface MFTextField : UITextField + +@property (nonatomic, assign) BOOL pasteEnabled;/**< 粘贴,默认NO,禁止粘贴*/ +@property (nonatomic, assign) BOOL selectEnabled;/**< 选择,默认NO,禁止选择*/ +@property (nonatomic, assign) BOOL selectAllEnabled;/**< 全选,默认NO,禁止全选*/ + +@property (nonatomic, assign) NSInteger minLength;/**< 最短长度,默认0*/ +@property (nonatomic, assign) NSInteger maxLength;/**< 最大长度,默认NSIntegerMax*/ +@property (nonatomic, copy ) NSString *rule;/**< 过滤规则(比如只能输入字母,数字文字等),默认为nil*/ + +@property (nonatomic, weak) id extendDelegate; + +- (NSString *)ruleFormMFTextFieldRuleType:(MFTextFieldRule)rule; + +@end diff --git a/MFControlLibrary/CommonTool/MFTextField/MFTextField.m b/MFControlLibrary/CommonTool/MFTextField/MFTextField.m new file mode 100644 index 0000000..f7786ce --- /dev/null +++ b/MFControlLibrary/CommonTool/MFTextField/MFTextField.m @@ -0,0 +1,107 @@ +// +// MFTextField.m +// Pods +// +// Created by XuMengFan on 2017/8/29. +// +// + +#import "MFTextField.h" + +@interface MFTextField () + + +@end + +@implementation MFTextField + +- (instancetype)init +{ + self = [super init]; + if (self) { + self.delegate = self; + self.minLength = 0; + self.maxLength = NSIntegerMax; + self.rule = nil; + } + return self; +} +#pragma mark ========== 禁止粘贴/选择/全选 ========== + +- (BOOL)canPerformAction:(SEL)action withSender:(id)sender +{ + if (action == @selector(paste:) && self.pasteEnabled == NO){//禁止粘贴 + return NO; + } + if (action == @selector(select:) && self.selectEnabled == NO){//禁止选择 + return NO; + } + if (action == @selector(selectAll:) && self.selectAllEnabled == NO){//禁止全选 + return NO; + } + return [super canPerformAction:action withSender:sender]; +} + +#pragma mark ========== UITextFieldDelegate ========== + +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string]; + + if (newString.length < self.minLength || newString.length > self.maxLength) { + return NO; + } + + if (newString.length > 0) { + if (self.rule && self.rule.length > 0) { + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:self.rule options:0 error:NULL]; + NSTextCheckingResult *match = [regex firstMatchInString:newString options:0 range:NSMakeRange(0, [newString length])]; + if (!match) { + return NO; + } + } + } + return YES; +} + +- (BOOL)textFieldShouldClear:(UITextField *)textField +{ + if (self.extendDelegate && [self.extendDelegate respondsToSelector:@selector(textFieldShouldClearWhenClickClearButton)]) { + return [self.extendDelegate textFieldShouldClearWhenClickClearButton]; + } + return YES; +} + +- (BOOL)textFieldShouldReturn:(UITextField *)textField +{ + if (self.extendDelegate && [self.extendDelegate respondsToSelector:@selector(textFieldShouldReturnWhenClickReturnButton)]) { + return [self.extendDelegate textFieldShouldReturnWhenClickReturnButton]; + } + return YES; +} + +#pragma mark ========== 过滤规则 ========== + +- (NSString *)ruleFormMFTextFieldRuleType:(MFTextFieldRule)rule +{ + NSString *ruleDes = nil; + switch (rule) { + case MFTextFieldRuleOnlyNum: + ruleDes = nil; + break; + case MFTextFieldRuleOnlyLetter: + ruleDes = nil; + break; + case MFTextFieldRuleNumAndLetter: + ruleDes = nil; + break; + case MFTextFieldRuleOnlyChinese: + ruleDes = nil; + break; + default: + break; + } + return ruleDes; +} + +@end diff --git a/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.h b/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.h new file mode 100644 index 0000000..d946b14 --- /dev/null +++ b/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.h @@ -0,0 +1,49 @@ +// +// UITableViewCell+SeparatorLine.h +// Pods +// +// Created by XuMengFan on 2017/9/11. +// +// + +#import + +typedef NS_ENUM(NSInteger, MFSeparatorLineStyle) {//分割线样式,分割线距离左右两侧的距离 + MFSeparatorLineStyleLeftShort = 1,/**< 左15,右0*/ + MFSeparatorLineStyleRightShort = 2,/**< 左0,右15*/ + MFSeparatorLineStyleDoubleShort = 3,/**< 左15,右15*/ + MFSeparatorLineStyleLong = 4,/**< 左0,右0*/ + MFSeparatorLineStyleDefalut = MFSeparatorLineStyleLeftShort, +}; + +@interface UITableViewCell (SeparatorLine) + +/** + * 设置全局的分割线颜色,默认颜色是RGB(240,240,240,1) + */ ++ (void)setGlobalSeparatorLineColor:(UIColor *)color; + +/** + * 设置全局的分割线高度,默认高度为0.5 + */ ++ (void)setGlobalSeparatorLineHeight:(CGFloat)lineHeight; + +/** + * 设置分割线样式 + */ +- (void)setSeparatorLineWithlLineStyle:(MFSeparatorLineStyle)LineStyle; + +/** + * 设置自定义分割线样式 + * + * @param leftMargin 左边界距离 + * @param rightMargin 右边界距离 + * @param height 分割线线高度 + * @param color 分割线颜色 + */ +- (void)setSeparatorLineWithleftMargin:(CGFloat)leftMargin + rightMargin:(CGFloat)rightMargin + lineHeight:(CGFloat)height + lineColor:(UIColor *)color; + +@end diff --git a/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.m b/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.m new file mode 100644 index 0000000..493e86e --- /dev/null +++ b/MFControlLibrary/CommonTool/UITableViewCell/UITableViewCell+SeparatorLine.m @@ -0,0 +1,108 @@ +// +// UITableViewCell+SeparatorLine.m +// Pods +// +// Created by XuMengFan on 2017/9/11. +// +// + +#import "UITableViewCell+SeparatorLine.h" + +#import "Masonry.h" + +#define CELL_SEPARATOR_LINE_HEIGHT_TAG 30000 + +static CGFloat global_lineHeight = 0.5; +static UIColor *global_lineColor = nil; + +@implementation UITableViewCell (SeparatorLine) + ++ (void)load +{ + global_lineColor = [UIColor colorWithRed:240 green:240 blue:240 alpha:1]; +} + +/** + * 设置全局的分割线颜色,默认颜色是RGB(240,240,240,1) + */ ++ (void)setGlobalSeparatorLineColor:(UIColor *)color +{ + global_lineColor = color; +} + +/** + * 设置全局的分割线高度,默认高度为0.5 + */ ++ (void)setGlobalSeparatorLineHeight:(CGFloat)lineHeight +{ + global_lineHeight = lineHeight; +} + +/** + * 设置分割线样式 + */ +- (void)setSeparatorLineWithlLineStyle:(MFSeparatorLineStyle)LineStyle +{ + CGFloat leftMargin = 0; + CGFloat rightMargin = 0; + switch (LineStyle) { + case MFSeparatorLineStyleLeftShort://左15,右0 + { + leftMargin = 15; + rightMargin = 0; + } + break; + case MFSeparatorLineStyleRightShort://左0,右15 + { + leftMargin = 0; + rightMargin = 15; + } + break; + case MFSeparatorLineStyleDoubleShort://左15,右15 + { + leftMargin = 15; + rightMargin = 15; + } + break; + case MFSeparatorLineStyleLong://左0,右0 + { + leftMargin = 0; + rightMargin = 0; + } + break; + default: + break; + } + [self setSeparatorLineWithleftMargin:leftMargin rightMargin:rightMargin lineHeight:global_lineHeight lineColor:global_lineColor]; +} + +/** + * 设置自定义分割线样式 + * + * @param leftMargin 左边界距离 + * @param rightMargin 右边界距离 + * @param height 分割线线高度 + * @param color 分割线颜色 + */ +- (void)setSeparatorLineWithleftMargin:(CGFloat)leftMargin + rightMargin:(CGFloat)rightMargin + lineHeight:(CGFloat)height + lineColor:(UIColor *)color +{ + UIView *lineView = [self.contentView viewWithTag:CELL_SEPARATOR_LINE_HEIGHT_TAG]; + if (lineView == nil) { + lineView = [[UIView alloc] init]; + lineView.tag = CELL_SEPARATOR_LINE_HEIGHT_TAG; + [self.contentView addSubview:lineView]; + } + lineView.backgroundColor = color; + + [lineView mas_remakeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.contentView.mas_bottom); + make.height.mas_equalTo(height); + make.left.equalTo(self.contentView.mas_left).with.offset(leftMargin); + make.right.equalTo(self.contentView.mas_right).with.offset(-rightMargin); + }]; +} + +@end diff --git a/README.md b/README.md index 907dc85..c055f5a 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,17 @@ pod "MFControlLibrary" ## Author -953950782@qq.com +weekendlittleant@126.com ## License MFControlLibrary is available under the MIT license. See the LICENSE file for more info. +## 开发说明 + +因为是多人协作,各位大神添加自己的控件时请在develop分支上开发,等稳定后在统一合并到master分支上,避免问题.各位添加控件的时候需要注意几点: +(1)各个控件要有使用demo,有单独的vc来展示控件,查看使用效果,方便使用者使用. +(2)控件的命名,方法尽量规范,如有必要添加适当说明. + +