├── .DS_Store
├── picture
├── picture2.png
├── picture3.png
├── picture4.png
├── picture5.png
├── picture6.png
├── picture7.png
└── IBDesignable IBInspectable编程.png
├── designable
├── designable
│ ├── .DS_Store
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── picture1.imageset
│ │ │ ├── xuezhiqian.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Model
│ │ ├── .DS_Store
│ │ ├── MGOLabel.m
│ │ ├── MGOButton.m
│ │ ├── MGOLabel.h
│ │ ├── MGOButton.h
│ │ ├── MGOImageView.m
│ │ ├── MGOTextField.m
│ │ ├── MGOTextField.h
│ │ ├── MGOImageView.h
│ │ ├── IBDesignableImageView.h
│ │ ├── UIImageView+MGO.h
│ │ ├── IBDesignableImageView.m
│ │ ├── UIView+MGO.h
│ │ ├── UIImageView+MGO.m
│ │ └── UIView+MGO.m
│ ├── ViewController.h
│ ├── designable.xcdatamodeld
│ │ ├── .xccurrentversion
│ │ └── designable.xcdatamodel
│ │ │ └── contents
│ ├── main.m
│ ├── AppDelegate.h
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ └── AppDelegate.m
├── designable.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
├── designableTests
│ ├── Info.plist
│ └── designableTests.m
└── designableUITests
│ ├── Info.plist
│ └── designableUITests.m
├── LICENSE
├── .gitignore
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/.DS_Store
--------------------------------------------------------------------------------
/picture/picture2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture2.png
--------------------------------------------------------------------------------
/picture/picture3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture3.png
--------------------------------------------------------------------------------
/picture/picture4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture4.png
--------------------------------------------------------------------------------
/picture/picture5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture5.png
--------------------------------------------------------------------------------
/picture/picture6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture6.png
--------------------------------------------------------------------------------
/picture/picture7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/picture7.png
--------------------------------------------------------------------------------
/designable/designable/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/designable/designable/.DS_Store
--------------------------------------------------------------------------------
/designable/designable/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/designable/designable/Model/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/designable/designable/Model/.DS_Store
--------------------------------------------------------------------------------
/picture/IBDesignable IBInspectable编程.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/picture/IBDesignable IBInspectable编程.png
--------------------------------------------------------------------------------
/designable/designable/Assets.xcassets/picture1.imageset/xuezhiqian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minggo620/iOSDesignable/HEAD/designable/designable/Assets.xcassets/picture1.imageset/xuezhiqian.png
--------------------------------------------------------------------------------
/designable/designable.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGOLabel.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "MGOLabel.h"
10 |
11 | @implementation MGOLabel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGOButton.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "MGOButton.h"
10 |
11 | @implementation MGOButton
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGOLabel.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGOLabel : UILabel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGOButton.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGOButton : UIButton
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOImageView.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGOImageView.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "MGOImageView.h"
10 |
11 | @implementation MGOImageView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOTextField.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGOTextField.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "MGOTextField.h"
10 |
11 | @implementation MGOTextField
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOTextField.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGOTextField.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGOTextField : UITextField
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/designable/designable/designable.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | designable.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/designable/designable/Model/MGOImageView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGOImageView.h
3 | // designable
4 | // 这个类是为了能展示category中申明IB_DESIGNABLE能显示效果创建的空白类,在Customer Class中设置这个类。
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGOImageView : UIImageView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/Model/IBDesignableImageView.h:
--------------------------------------------------------------------------------
1 | //
2 | // IBDesignableImageView.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 | IB_DESIGNABLE
11 | @interface IBDesignableImageView : UIImageView
12 | @property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
13 | @end
14 |
--------------------------------------------------------------------------------
/designable/designable/designable.xcdatamodeld/designable.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/designable/designable/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/designable/designable/Model/UIImageView+MGO.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageView+MGO.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 | //IB_DESIGNABLE
11 | @interface UIImageView (MGO)
12 |
13 | //@property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
14 | @property(nonatomic,assign) CGFloat cornerRadius;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/designable/designable/Assets.xcassets/picture1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "xuezhiqian.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/designable/designable/Model/IBDesignableImageView.m:
--------------------------------------------------------------------------------
1 | //
2 | // IBDesignableImageView.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "IBDesignableImageView.h"
10 |
11 | @implementation IBDesignableImageView
12 |
13 | -(void)setCornerRadius:(CGFloat)cornerRadius{
14 |
15 | _cornerRadius = cornerRadius;//不要使用self.cornerRadius = cornerRadius;这样会死循环
16 |
17 | self.layer.masksToBounds = YES;
18 | self.layer.cornerRadius = cornerRadius;
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/designable/designable/Model/UIView+MGO.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MGO.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | IB_DESIGNABLE
12 | @interface UIView (MGO)
13 |
14 | @property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
15 | @property(nonatomic,assign) IBInspectable CGFloat borderWidth;
16 | @property(nonatomic,assign) IBInspectable UIColor *borderColor;
17 | @property(nonatomic,assign) IBInspectable CGFloat defineValue;
18 | //@property(nonatomic,assign) IBInspectable CGFloat linesWidth;
19 | @end
20 |
--------------------------------------------------------------------------------
/designable/designable/Model/UIImageView+MGO.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageView+MGO.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/13.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "UIImageView+MGO.h"
10 | #import
11 |
12 | @implementation UIImageView (MGO)
13 |
14 | -(void)setCornerRadius:(CGFloat)cornerRadius{
15 | self.layer.masksToBounds = YES;
16 | self.layer.cornerRadius = cornerRadius;
17 | objc_setAssociatedObject(self, @selector(cornerRadius), @(cornerRadius),OBJC_ASSOCIATION_ASSIGN);
18 | }
19 |
20 | -(CGFloat)cornerRadius{
21 | return [objc_getAssociatedObject(self, @selector(cornerRadius)) floatValue];
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/designable/designable/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (strong, nonatomic) UIWindow *window;
15 |
16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
19 |
20 | - (void)saveContext;
21 | - (NSURL *)applicationDocumentsDirectory;
22 |
23 |
24 | @end
25 |
26 |
--------------------------------------------------------------------------------
/designable/designableTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/designable/designableUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/designable/designable/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "MGOImageView.h"
11 | #import "UIView+MGO.h"
12 |
13 | @interface ViewController ()
14 | @property (weak, nonatomic) IBOutlet MGOImageView *avatarIv;
15 | @property (weak, nonatomic) IBOutlet UILabel *statusLb;
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 |
24 | NSLog(@"avatarIv.cornerRadius:%f",self.avatarIv.cornerRadius);
25 | NSLog(@"avatarIv.defineValue:%f",self.avatarIv.defineValue);
26 |
27 | self.statusLb.text = @"运行现实状态";
28 | }
29 |
30 | - (void)didReceiveMemoryWarning {
31 | [super didReceiveMemoryWarning];
32 |
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/designable/designableTests/designableTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // designableTests.m
3 | // designableTests
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface designableTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation designableTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 minggo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/designable/designableUITests/designableUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // designableUITests.m
3 | // designableUITests
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface designableUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation designableUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/designable/designable/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "83.5x83.5",
66 | "scale" : "2x"
67 | }
68 | ],
69 | "info" : {
70 | "version" : 1,
71 | "author" : "xcode"
72 | }
73 | }
--------------------------------------------------------------------------------
/designable/designable/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/designable/designable/Model/UIView+MGO.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MGO.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "UIView+MGO.h"
10 | #import
11 |
12 | @implementation UIView (MGO)
13 |
14 |
15 | -(void)setCornerRadius:(CGFloat)cornerRadius{
16 |
17 | self.layer.masksToBounds = YES;
18 | self.layer.cornerRadius = cornerRadius;
19 | }
20 |
21 | -(void)setBorderColor:(UIColor *)borderColor{
22 | self.layer.borderColor = borderColor.CGColor;
23 | }
24 |
25 | -(void)setBorderWidth:(CGFloat)borderWidth{
26 |
27 | self.layer.borderWidth = borderWidth;
28 | }
29 |
30 | -(void)setDefineValue:(CGFloat)defineValue{
31 | objc_setAssociatedObject(self, @selector(defineValue), @(defineValue), OBJC_ASSOCIATION_ASSIGN);
32 | }
33 |
34 |
35 | -(CGFloat)cornerRadius{
36 |
37 | return self.layer.cornerRadius;
38 | }
39 | -(CGFloat)borderWidth{
40 | return self.layer.borderWidth;
41 | }
42 | -(UIColor *)borderColor{
43 | return [UIColor colorWithCGColor:self.layer.borderColor];
44 | }
45 |
46 | -(CGFloat)defineValue{
47 | return [objc_getAssociatedObject(self, @selector(defineValue)) floatValue];
48 | }
49 |
50 |
51 | //-(void)setLinesWidth:(CGFloat)linesWidth{
52 | // objc_setAssociatedObject(self, @selector(linesWidth), @(linesWidth), OBJC_ASSOCIATION_ASSIGN);
53 | //}
54 | //-(CGFloat)linesWidth{
55 | // return [objc_getAssociatedObject(self, @selector(linesWidth)) floatValue];
56 | //}
57 |
58 | //-(void)drawRect:(CGRect)rect{
59 | // CGContextRef context = UIGraphicsGetCurrentContext();
60 | // CGRect myframe = self.bounds;
61 | // CGContextSetLineWidth(context,self.linesWidth);
62 | // CGRectInset(myframe, 1, 1);
63 | // [self.borderColor set];
64 | // UIRectFrame(myframe);
65 | //}
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/designable/designable/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
30 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/designable/designable/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // designable
4 | //
5 | // Created by minggo on 16/5/12.
6 | // Copyright © 2016年 minggo. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | // Saves changes in the application's managed object context before the application terminates.
44 | [self saveContext];
45 | }
46 |
47 | #pragma mark - Core Data stack
48 |
49 | @synthesize managedObjectContext = _managedObjectContext;
50 | @synthesize managedObjectModel = _managedObjectModel;
51 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
52 |
53 | - (NSURL *)applicationDocumentsDirectory {
54 | // The directory the application uses to store the Core Data store file. This code uses a directory named "com.minggo.designable" in the application's documents directory.
55 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
56 | }
57 |
58 | - (NSManagedObjectModel *)managedObjectModel {
59 | // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model.
60 | if (_managedObjectModel != nil) {
61 | return _managedObjectModel;
62 | }
63 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"designable" withExtension:@"momd"];
64 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
65 | return _managedObjectModel;
66 | }
67 |
68 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
69 | // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it.
70 | if (_persistentStoreCoordinator != nil) {
71 | return _persistentStoreCoordinator;
72 | }
73 |
74 | // Create the coordinator and store
75 |
76 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
77 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"designable.sqlite"];
78 | NSError *error = nil;
79 | NSString *failureReason = @"There was an error creating or loading the application's saved data.";
80 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
81 | // Report any error we got.
82 | NSMutableDictionary *dict = [NSMutableDictionary dictionary];
83 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data";
84 | dict[NSLocalizedFailureReasonErrorKey] = failureReason;
85 | dict[NSUnderlyingErrorKey] = error;
86 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict];
87 | // Replace this with code to handle the error appropriately.
88 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
89 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
90 | abort();
91 | }
92 |
93 | return _persistentStoreCoordinator;
94 | }
95 |
96 |
97 | - (NSManagedObjectContext *)managedObjectContext {
98 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.)
99 | if (_managedObjectContext != nil) {
100 | return _managedObjectContext;
101 | }
102 |
103 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
104 | if (!coordinator) {
105 | return nil;
106 | }
107 | _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
108 | [_managedObjectContext setPersistentStoreCoordinator:coordinator];
109 | return _managedObjectContext;
110 | }
111 |
112 | #pragma mark - Core Data Saving support
113 |
114 | - (void)saveContext {
115 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
116 | if (managedObjectContext != nil) {
117 | NSError *error = nil;
118 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
119 | // Replace this implementation with code to handle the error appropriately.
120 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
121 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
122 | abort();
123 | }
124 | }
125 | }
126 |
127 | @end
128 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ##微信公众号:
2 |
3 | 
4 | #谈不完美的IBDesignable/IBInspectable可视化效果编程
5 | [](https://www.apple.com/nl/ios/)
6 | []()
7 | []()
8 | [](https://github.com/minggo620/iOSDesignable/archive/master.zip)
9 | 我们好像慢慢地习惯了“理想很丰满,现实很骨感”这样顺序这样的转折这样常态,那么如果是“现实很丰满,理想很骨感”,我们能接受吗?现实丰满可以,但是理想很骨感那就不要将就了。就像薛之谦希望是能通过“丑八怪 呀啊呀啊呀哎呀”来唱红的自己,而不是上综艺做直男直到没朋友的谐星来笑红自己却跟他的歌关系不大。
10 |
11 | 苹果开发中使用的XCode也有这样的“现实丰满,理想骨感”例子,苹果公司在2011年就推出了UIStoryboard技术,到现在已经6年了。苹果还不在xcode的Interface Builder上直接提供修改控件的圆角,边框设置,而是提供IBDesignable/IBInspectable这样的技术让这些重复简单的工作由开发者来实现圆角外框,最后category上使用IBDesignable/IBInspectable却不能直接现实想要的结果。
12 |
13 | 那边我们来体验一下薛之谦的“人红歌不红”的“现实很丰满,理想很骨感”感觉。
14 | 
15 | ###一.我们想要很简单
16 | 在Storyboard中的**所有控件**能通过Interface builder直接设置最基本圆角,边框和边框颜色属性,表达理想的**Storyboard能显示**出我要的渲染效果,而不是编写代码后只能在运行在手机或模拟器时才出现我们想要的效果。就像薛之谦想通唱歌红了自己,简单明了。
17 | ###二.基本概念
18 | >1. IB_DESIGNABLE的宏的功能就是让XCode动态渲染出该类图形化界面。UIView 或 NSView使用IB_DESIGNABLE宏声明时候,就是让Interface Builder知道它应该在UIStoryboard或者Xib中画布上直接渲染视图,不需要等到编译运行后就能预先展示出来效果 。
19 | 2. IBInspectable修饰属性,可以是用户自定义的运行时属性,让支持KVC的属性能够在Attribute Inspector中配置。
20 |
21 | ###三.使用方式
22 | ######1.IB_DESIGNABLE放在@interface或者@implement都可以,申明这个类在XCode直接看到渲染的效果。
23 |
24 | IB_DESIGNABLE
25 | @interface IBDesignableImageView : UIImageView
26 |
27 | ######2.IBInspectable 修饰属性,使属性能在XCode中直接设置。**
28 |
29 | @property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
30 |
31 | ###四 .普通类继承关系实现渲染效果
32 | 根据第三所列出的2个关键点,详细具体实现:
33 | ######1.自定义IBDesignableImageView 继承UIImageView。
34 |
35 | #import
36 | IB_DESIGNABLE
37 | @interface IBDesignableImageView : UIImageView
38 | @property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
39 | @end
40 | ######2.接着在IBDesignableImageView.m文件实现下set方法
41 |
42 | #import "IBDesignableImageView.h"
43 | @implementation IBDesignableImageView
44 | -(void)setCornerRadius:(CGFloat)cornerRadius{
45 | _cornerRadius = cornerRadius;//不要使用self.cornerRadius = cornerRadius;这样会死循环
46 | self.layer.masksToBounds = YES;
47 | self.layer.cornerRadius = cornerRadius;
48 | }
49 | @end
50 | ######3.接着,XCode中Customer Class选择IBDesignableImageView。
51 | ######4.最后,interface builder属性栏中设置你刚刚属性。
52 | 
53 | 主要就是以上四步基本满足一下下storyboard成功展示一种View实时渲染效果的快感,犹如薛之谦尝试到一首《丑八怪》火一阵子,爽一阵子的快感,并且不会让人误认为这是赵全的《我很丑可是我很温柔》的续本。
54 | ###五.UIView的Category实现渲染效果
55 | 尝到了好处,自然想到实现通用的方式给需要控件都加上interface builder可设置相关属性。所以,我们自认为UIView其他子View父类,那么如果UIView可是直接在XCode上设置属性实现渲染,那么其他子View随之得到渲染效果。
56 | ######1.我们最想看到的结果是
57 | 我们最想看到结果是,UIImageView、UITextField、UIButton等等都能如愿的被interface builder直接修改相关圆角,边框等等属性。噔噔,我们脑海浮现以下画面:
58 | 
59 | ######2.编写UIView的Category类UIView+MGO.h
60 | #import
61 | IB_DESIGNABLE
62 | @interface UIView (MGO)
63 | @property(nonatomic,assign) IBInspectable CGFloat cornerRadius;
64 | @property(nonatomic,assign) IBInspectable CGFloat borderWidth;
65 | @property(nonatomic,assign) IBInspectable UIColor *borderColor;
66 | @property(nonatomic,assign) IBInspectable CGFloat defineValue;
67 | @end
68 | ######3.编写UIView+MGO.m中的实现
69 | #import "UIView+MGO.h"
70 | #import
71 | @implementation UIView (MGO)
72 | -(void)setCornerRadius:(CGFloat)cornerRadius{
73 | self.layer.masksToBounds = YES;
74 | self.layer.cornerRadius = cornerRadius;
75 | }
76 | -(void)setBorderColor:(UIColor *)borderColor{
77 | self.layer.borderColor = borderColor.CGColor;
78 | }
79 | -(void)setBorderWidth:(CGFloat)borderWidth{
80 | self.layer.borderWidth = borderWidth;
81 | }
82 | -(void)setDefineValue:(CGFloat)defineValue{
83 | objc_setAssociatedObject(self, @selector(defineValue), @(defineValue),OBJC_ASSOCIATION_ASSIGN);
84 | }
85 | -(CGFloat)cornerRadius{
86 | return self.layer.cornerRadius;
87 | }
88 | -(CGFloat)borderWidth{
89 | return self.layer.borderWidth;
90 | }
91 | -(UIColor *)borderColor{
92 | return [UIColor colorWithCGColor:self.layer.borderColor];
93 | }
94 | -(CGFloat)defineValue{
95 | return [objc_getAssociatedObject(self, @selector(defineValue)) floatValue];
96 | }
97 | @end
98 | 这个.m的实现类,有几个知识点要注意:
99 | 1).category中添加IBInspectable修饰属性,必须带有set和get的方法,不然编译都通过。
100 | 2).KVC观察属性值变化,从而得到即时刷新效果。
101 | 3).category中自定义属性如上边defineValue属性,使用runtime方式赋值。所以会有objc_setAssociatedObject(self, @selector(defineValue), @(defineValue),OBJC_ASSOCIATION_ASSIGN);这样的代码。_defineValue = defineValue;这样也是行,这样是有语法问题的。
102 | 详细的runtime和KVC知识点可以查看[《谈Runtime机制和使用的整体化梳理》](http://www.jianshu.com/p/8916ad5662a2)和[《谈KVC、KVO(重点观察者模式)机制编程》](http://www.jianshu.com/p/b24d3829b978)
103 | ######4.在interface builder设置相关属性
104 | 1).属性栏可以看可设置圆角,边框宽度等
105 | 
106 | 2).Runtime Attribute栏中也能自动生成刚刚设置的属性值
107 | 
108 |
109 | ######5.查看storyboard上的头像有没有显示设置的属性值
110 | 
111 | Oh。。。my god!storyboard上一点效果也没显示出来,反而模拟器运行效果确实理想的状态。活生生的“现实很丰满,理想很骨感”表现得淋漓尽致。难道要硬着头皮瞬间退回到解放前,重复不断的写继承代码。。。打死也不,,,告诉你淘宝发过来的验证码!
112 | ###六.曲线救国处理Category不显示效果问题
113 | 曲线救国生活中可以,国就是救那么一两次,没国了也没办法。程序中,每时每刻都在救国,明摆着这欺负人嘛!不过,国我们还是得救的,歌薛之谦还是要唱的,先找到两者的微妙关系,串成曲线才行。于是乎,薛之谦将段子手的头衔发挥到极致,参加各大综艺,《火星情报站》《极限挑战》《大学生来了》等等,趁机唱唱“丑八怪 呀啊呀啊哎呀”,道理就明了了,就是死活出现在人面前晃来晃去。
114 | 哟,那会不会interface builder死活要看到UIView的自定义子类的继承类,设置在Customer Class中才行啊。试试?
115 | ######1.编写一个 空白MGOImageView继承UIImageView。
116 | #import
117 | @interface MGOImageView : UIImageView
118 | @end
119 | #####2.MGOImageView.m文件什么也不干,就是等机会对接UIView(MGO)自定义属性。
120 | #import "MGOImageView.h"
121 | @implementation MGOImageView
122 | @end
123 | #####3.选中storyboard中的UIImageView在Customer Class选择 MGOImageView。
124 | 
125 | 噢,,,了个天啊!storyboard上一点效果都没有少显示出来,反而吓到了现实中的我。那就趁热吃豆腐了,把其他控件都写一个对应空白的子类,设置在customer class上。
126 | 
127 |
128 | 好像幸福就是来得那么突然,伤心的小船说翻就翻了。会不会有更大幸福,于是乎,小明在google上搜索“IBDesignable/IBInspectable在Category中没有效果”。看了两三页搜索结果,最后比较接近的是Cocachina中也有一个没有人回复的相关帖子,和另外一篇跟我的发现一样要写一个空白的子类设置在Customer Class 中才行。
129 | ###七.对比总结
130 | 经过以上一系列折腾,最后的结果确认令我觉得“不完美的IBDesignable/IBInspectable”。有些对XCode,Storyboard项目者有些一丁点的期待外,同时也是希望有开发者提供更好的处理方式。对比其他IDE,,就算了。追求完美我们是天生的,尽情开发我们也是认真的。
131 | ###八.源码下载
132 | #####*[https://github.com/minggo620/iOSDesignable.git](https://github.com/minggo620/iOSDesignable.git)*
133 | ######好想要到薛之谦的微信,向他发1毛钱的红包,然后他会一如既往地回“不好意思,我不收别人的微信红包”,接着我收到了200块红包。
134 |
--------------------------------------------------------------------------------
/designable/designable.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 46EF0C2B1CE5833400701F8B /* MGOImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C281CE5833400701F8B /* MGOImageView.m */; };
11 | 46EF0C2C1CE5833400701F8B /* UIView+MGO.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C2A1CE5833400701F8B /* UIView+MGO.m */; };
12 | 46EF0C2F1CE583AD00701F8B /* UIImageView+MGO.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C2E1CE583AD00701F8B /* UIImageView+MGO.m */; };
13 | 46EF0C321CE5857400701F8B /* IBDesignableImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C311CE5857400701F8B /* IBDesignableImageView.m */; };
14 | 46EF0C351CE5883C00701F8B /* MGOButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C341CE5883C00701F8B /* MGOButton.m */; };
15 | 46EF0C381CE5887000701F8B /* MGOLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C371CE5887000701F8B /* MGOLabel.m */; };
16 | 46EF0C3B1CE588B900701F8B /* MGOTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EF0C3A1CE588B900701F8B /* MGOTextField.m */; };
17 | 46F021B71CE45A67005663AF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 46F021B61CE45A67005663AF /* main.m */; };
18 | 46F021BA1CE45A67005663AF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 46F021B91CE45A67005663AF /* AppDelegate.m */; };
19 | 46F021BD1CE45A67005663AF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 46F021BC1CE45A67005663AF /* ViewController.m */; };
20 | 46F021C01CE45A67005663AF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46F021BE1CE45A67005663AF /* Main.storyboard */; };
21 | 46F021C31CE45A67005663AF /* designable.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 46F021C11CE45A67005663AF /* designable.xcdatamodeld */; };
22 | 46F021C51CE45A67005663AF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 46F021C41CE45A67005663AF /* Assets.xcassets */; };
23 | 46F021C81CE45A67005663AF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46F021C61CE45A67005663AF /* LaunchScreen.storyboard */; };
24 | 46F021D31CE45A67005663AF /* designableTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 46F021D21CE45A67005663AF /* designableTests.m */; };
25 | 46F021DE1CE45A67005663AF /* designableUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 46F021DD1CE45A67005663AF /* designableUITests.m */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXContainerItemProxy section */
29 | 46F021CF1CE45A67005663AF /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = 46F021AA1CE45A67005663AF /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 46F021B11CE45A67005663AF;
34 | remoteInfo = designable;
35 | };
36 | 46F021DA1CE45A67005663AF /* PBXContainerItemProxy */ = {
37 | isa = PBXContainerItemProxy;
38 | containerPortal = 46F021AA1CE45A67005663AF /* Project object */;
39 | proxyType = 1;
40 | remoteGlobalIDString = 46F021B11CE45A67005663AF;
41 | remoteInfo = designable;
42 | };
43 | /* End PBXContainerItemProxy section */
44 |
45 | /* Begin PBXFileReference section */
46 | 46EF0C271CE5833400701F8B /* MGOImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGOImageView.h; sourceTree = ""; };
47 | 46EF0C281CE5833400701F8B /* MGOImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGOImageView.m; sourceTree = ""; };
48 | 46EF0C291CE5833400701F8B /* UIView+MGO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MGO.h"; sourceTree = ""; };
49 | 46EF0C2A1CE5833400701F8B /* UIView+MGO.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MGO.m"; sourceTree = ""; };
50 | 46EF0C2D1CE583AD00701F8B /* UIImageView+MGO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+MGO.h"; sourceTree = ""; };
51 | 46EF0C2E1CE583AD00701F8B /* UIImageView+MGO.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+MGO.m"; sourceTree = ""; };
52 | 46EF0C301CE5857400701F8B /* IBDesignableImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBDesignableImageView.h; sourceTree = ""; };
53 | 46EF0C311CE5857400701F8B /* IBDesignableImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IBDesignableImageView.m; sourceTree = ""; };
54 | 46EF0C331CE5883C00701F8B /* MGOButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGOButton.h; sourceTree = ""; };
55 | 46EF0C341CE5883C00701F8B /* MGOButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGOButton.m; sourceTree = ""; };
56 | 46EF0C361CE5887000701F8B /* MGOLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGOLabel.h; sourceTree = ""; };
57 | 46EF0C371CE5887000701F8B /* MGOLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGOLabel.m; sourceTree = ""; };
58 | 46EF0C391CE588B900701F8B /* MGOTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGOTextField.h; sourceTree = ""; };
59 | 46EF0C3A1CE588B900701F8B /* MGOTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGOTextField.m; sourceTree = ""; };
60 | 46F021B21CE45A67005663AF /* designable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = designable.app; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 46F021B61CE45A67005663AF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
62 | 46F021B81CE45A67005663AF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
63 | 46F021B91CE45A67005663AF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
64 | 46F021BB1CE45A67005663AF /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
65 | 46F021BC1CE45A67005663AF /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
66 | 46F021BF1CE45A67005663AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
67 | 46F021C21CE45A67005663AF /* designable.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = designable.xcdatamodel; sourceTree = ""; };
68 | 46F021C41CE45A67005663AF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
69 | 46F021C71CE45A67005663AF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
70 | 46F021C91CE45A67005663AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
71 | 46F021CE1CE45A67005663AF /* designableTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = designableTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
72 | 46F021D21CE45A67005663AF /* designableTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = designableTests.m; sourceTree = ""; };
73 | 46F021D41CE45A67005663AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
74 | 46F021D91CE45A67005663AF /* designableUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = designableUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
75 | 46F021DD1CE45A67005663AF /* designableUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = designableUITests.m; sourceTree = ""; };
76 | 46F021DF1CE45A67005663AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
77 | /* End PBXFileReference section */
78 |
79 | /* Begin PBXFrameworksBuildPhase section */
80 | 46F021AF1CE45A67005663AF /* Frameworks */ = {
81 | isa = PBXFrameworksBuildPhase;
82 | buildActionMask = 2147483647;
83 | files = (
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | 46F021CB1CE45A67005663AF /* Frameworks */ = {
88 | isa = PBXFrameworksBuildPhase;
89 | buildActionMask = 2147483647;
90 | files = (
91 | );
92 | runOnlyForDeploymentPostprocessing = 0;
93 | };
94 | 46F021D61CE45A67005663AF /* Frameworks */ = {
95 | isa = PBXFrameworksBuildPhase;
96 | buildActionMask = 2147483647;
97 | files = (
98 | );
99 | runOnlyForDeploymentPostprocessing = 0;
100 | };
101 | /* End PBXFrameworksBuildPhase section */
102 |
103 | /* Begin PBXGroup section */
104 | 46EF0C261CE5833400701F8B /* Model */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 46EF0C271CE5833400701F8B /* MGOImageView.h */,
108 | 46EF0C281CE5833400701F8B /* MGOImageView.m */,
109 | 46EF0C331CE5883C00701F8B /* MGOButton.h */,
110 | 46EF0C341CE5883C00701F8B /* MGOButton.m */,
111 | 46EF0C361CE5887000701F8B /* MGOLabel.h */,
112 | 46EF0C371CE5887000701F8B /* MGOLabel.m */,
113 | 46EF0C391CE588B900701F8B /* MGOTextField.h */,
114 | 46EF0C3A1CE588B900701F8B /* MGOTextField.m */,
115 | 46EF0C291CE5833400701F8B /* UIView+MGO.h */,
116 | 46EF0C2A1CE5833400701F8B /* UIView+MGO.m */,
117 | 46EF0C2D1CE583AD00701F8B /* UIImageView+MGO.h */,
118 | 46EF0C2E1CE583AD00701F8B /* UIImageView+MGO.m */,
119 | 46EF0C301CE5857400701F8B /* IBDesignableImageView.h */,
120 | 46EF0C311CE5857400701F8B /* IBDesignableImageView.m */,
121 | );
122 | path = Model;
123 | sourceTree = "";
124 | };
125 | 46F021A91CE45A67005663AF = {
126 | isa = PBXGroup;
127 | children = (
128 | 46F021B41CE45A67005663AF /* designable */,
129 | 46F021D11CE45A67005663AF /* designableTests */,
130 | 46F021DC1CE45A67005663AF /* designableUITests */,
131 | 46F021B31CE45A67005663AF /* Products */,
132 | );
133 | sourceTree = "";
134 | };
135 | 46F021B31CE45A67005663AF /* Products */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 46F021B21CE45A67005663AF /* designable.app */,
139 | 46F021CE1CE45A67005663AF /* designableTests.xctest */,
140 | 46F021D91CE45A67005663AF /* designableUITests.xctest */,
141 | );
142 | name = Products;
143 | sourceTree = "";
144 | };
145 | 46F021B41CE45A67005663AF /* designable */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 46EF0C261CE5833400701F8B /* Model */,
149 | 46F021B81CE45A67005663AF /* AppDelegate.h */,
150 | 46F021B91CE45A67005663AF /* AppDelegate.m */,
151 | 46F021BB1CE45A67005663AF /* ViewController.h */,
152 | 46F021BC1CE45A67005663AF /* ViewController.m */,
153 | 46F021BE1CE45A67005663AF /* Main.storyboard */,
154 | 46F021C41CE45A67005663AF /* Assets.xcassets */,
155 | 46F021C61CE45A67005663AF /* LaunchScreen.storyboard */,
156 | 46F021C91CE45A67005663AF /* Info.plist */,
157 | 46F021C11CE45A67005663AF /* designable.xcdatamodeld */,
158 | 46F021B51CE45A67005663AF /* Supporting Files */,
159 | );
160 | path = designable;
161 | sourceTree = "";
162 | };
163 | 46F021B51CE45A67005663AF /* Supporting Files */ = {
164 | isa = PBXGroup;
165 | children = (
166 | 46F021B61CE45A67005663AF /* main.m */,
167 | );
168 | name = "Supporting Files";
169 | sourceTree = "";
170 | };
171 | 46F021D11CE45A67005663AF /* designableTests */ = {
172 | isa = PBXGroup;
173 | children = (
174 | 46F021D21CE45A67005663AF /* designableTests.m */,
175 | 46F021D41CE45A67005663AF /* Info.plist */,
176 | );
177 | path = designableTests;
178 | sourceTree = "";
179 | };
180 | 46F021DC1CE45A67005663AF /* designableUITests */ = {
181 | isa = PBXGroup;
182 | children = (
183 | 46F021DD1CE45A67005663AF /* designableUITests.m */,
184 | 46F021DF1CE45A67005663AF /* Info.plist */,
185 | );
186 | path = designableUITests;
187 | sourceTree = "";
188 | };
189 | /* End PBXGroup section */
190 |
191 | /* Begin PBXNativeTarget section */
192 | 46F021B11CE45A67005663AF /* designable */ = {
193 | isa = PBXNativeTarget;
194 | buildConfigurationList = 46F021E21CE45A67005663AF /* Build configuration list for PBXNativeTarget "designable" */;
195 | buildPhases = (
196 | 46F021AE1CE45A67005663AF /* Sources */,
197 | 46F021AF1CE45A67005663AF /* Frameworks */,
198 | 46F021B01CE45A67005663AF /* Resources */,
199 | );
200 | buildRules = (
201 | );
202 | dependencies = (
203 | );
204 | name = designable;
205 | productName = designable;
206 | productReference = 46F021B21CE45A67005663AF /* designable.app */;
207 | productType = "com.apple.product-type.application";
208 | };
209 | 46F021CD1CE45A67005663AF /* designableTests */ = {
210 | isa = PBXNativeTarget;
211 | buildConfigurationList = 46F021E51CE45A67005663AF /* Build configuration list for PBXNativeTarget "designableTests" */;
212 | buildPhases = (
213 | 46F021CA1CE45A67005663AF /* Sources */,
214 | 46F021CB1CE45A67005663AF /* Frameworks */,
215 | 46F021CC1CE45A67005663AF /* Resources */,
216 | );
217 | buildRules = (
218 | );
219 | dependencies = (
220 | 46F021D01CE45A67005663AF /* PBXTargetDependency */,
221 | );
222 | name = designableTests;
223 | productName = designableTests;
224 | productReference = 46F021CE1CE45A67005663AF /* designableTests.xctest */;
225 | productType = "com.apple.product-type.bundle.unit-test";
226 | };
227 | 46F021D81CE45A67005663AF /* designableUITests */ = {
228 | isa = PBXNativeTarget;
229 | buildConfigurationList = 46F021E81CE45A67005663AF /* Build configuration list for PBXNativeTarget "designableUITests" */;
230 | buildPhases = (
231 | 46F021D51CE45A67005663AF /* Sources */,
232 | 46F021D61CE45A67005663AF /* Frameworks */,
233 | 46F021D71CE45A67005663AF /* Resources */,
234 | );
235 | buildRules = (
236 | );
237 | dependencies = (
238 | 46F021DB1CE45A67005663AF /* PBXTargetDependency */,
239 | );
240 | name = designableUITests;
241 | productName = designableUITests;
242 | productReference = 46F021D91CE45A67005663AF /* designableUITests.xctest */;
243 | productType = "com.apple.product-type.bundle.ui-testing";
244 | };
245 | /* End PBXNativeTarget section */
246 |
247 | /* Begin PBXProject section */
248 | 46F021AA1CE45A67005663AF /* Project object */ = {
249 | isa = PBXProject;
250 | attributes = {
251 | LastUpgradeCheck = 0720;
252 | ORGANIZATIONNAME = minggo;
253 | TargetAttributes = {
254 | 46F021B11CE45A67005663AF = {
255 | CreatedOnToolsVersion = 7.2.1;
256 | };
257 | 46F021CD1CE45A67005663AF = {
258 | CreatedOnToolsVersion = 7.2.1;
259 | TestTargetID = 46F021B11CE45A67005663AF;
260 | };
261 | 46F021D81CE45A67005663AF = {
262 | CreatedOnToolsVersion = 7.2.1;
263 | TestTargetID = 46F021B11CE45A67005663AF;
264 | };
265 | };
266 | };
267 | buildConfigurationList = 46F021AD1CE45A67005663AF /* Build configuration list for PBXProject "designable" */;
268 | compatibilityVersion = "Xcode 3.2";
269 | developmentRegion = English;
270 | hasScannedForEncodings = 0;
271 | knownRegions = (
272 | en,
273 | Base,
274 | );
275 | mainGroup = 46F021A91CE45A67005663AF;
276 | productRefGroup = 46F021B31CE45A67005663AF /* Products */;
277 | projectDirPath = "";
278 | projectRoot = "";
279 | targets = (
280 | 46F021B11CE45A67005663AF /* designable */,
281 | 46F021CD1CE45A67005663AF /* designableTests */,
282 | 46F021D81CE45A67005663AF /* designableUITests */,
283 | );
284 | };
285 | /* End PBXProject section */
286 |
287 | /* Begin PBXResourcesBuildPhase section */
288 | 46F021B01CE45A67005663AF /* Resources */ = {
289 | isa = PBXResourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | 46F021C81CE45A67005663AF /* LaunchScreen.storyboard in Resources */,
293 | 46F021C51CE45A67005663AF /* Assets.xcassets in Resources */,
294 | 46F021C01CE45A67005663AF /* Main.storyboard in Resources */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | 46F021CC1CE45A67005663AF /* Resources */ = {
299 | isa = PBXResourcesBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | );
303 | runOnlyForDeploymentPostprocessing = 0;
304 | };
305 | 46F021D71CE45A67005663AF /* Resources */ = {
306 | isa = PBXResourcesBuildPhase;
307 | buildActionMask = 2147483647;
308 | files = (
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | /* End PBXResourcesBuildPhase section */
313 |
314 | /* Begin PBXSourcesBuildPhase section */
315 | 46F021AE1CE45A67005663AF /* Sources */ = {
316 | isa = PBXSourcesBuildPhase;
317 | buildActionMask = 2147483647;
318 | files = (
319 | 46F021BD1CE45A67005663AF /* ViewController.m in Sources */,
320 | 46EF0C321CE5857400701F8B /* IBDesignableImageView.m in Sources */,
321 | 46EF0C381CE5887000701F8B /* MGOLabel.m in Sources */,
322 | 46F021C31CE45A67005663AF /* designable.xcdatamodeld in Sources */,
323 | 46EF0C3B1CE588B900701F8B /* MGOTextField.m in Sources */,
324 | 46F021BA1CE45A67005663AF /* AppDelegate.m in Sources */,
325 | 46EF0C2F1CE583AD00701F8B /* UIImageView+MGO.m in Sources */,
326 | 46F021B71CE45A67005663AF /* main.m in Sources */,
327 | 46EF0C2C1CE5833400701F8B /* UIView+MGO.m in Sources */,
328 | 46EF0C351CE5883C00701F8B /* MGOButton.m in Sources */,
329 | 46EF0C2B1CE5833400701F8B /* MGOImageView.m in Sources */,
330 | );
331 | runOnlyForDeploymentPostprocessing = 0;
332 | };
333 | 46F021CA1CE45A67005663AF /* Sources */ = {
334 | isa = PBXSourcesBuildPhase;
335 | buildActionMask = 2147483647;
336 | files = (
337 | 46F021D31CE45A67005663AF /* designableTests.m in Sources */,
338 | );
339 | runOnlyForDeploymentPostprocessing = 0;
340 | };
341 | 46F021D51CE45A67005663AF /* Sources */ = {
342 | isa = PBXSourcesBuildPhase;
343 | buildActionMask = 2147483647;
344 | files = (
345 | 46F021DE1CE45A67005663AF /* designableUITests.m in Sources */,
346 | );
347 | runOnlyForDeploymentPostprocessing = 0;
348 | };
349 | /* End PBXSourcesBuildPhase section */
350 |
351 | /* Begin PBXTargetDependency section */
352 | 46F021D01CE45A67005663AF /* PBXTargetDependency */ = {
353 | isa = PBXTargetDependency;
354 | target = 46F021B11CE45A67005663AF /* designable */;
355 | targetProxy = 46F021CF1CE45A67005663AF /* PBXContainerItemProxy */;
356 | };
357 | 46F021DB1CE45A67005663AF /* PBXTargetDependency */ = {
358 | isa = PBXTargetDependency;
359 | target = 46F021B11CE45A67005663AF /* designable */;
360 | targetProxy = 46F021DA1CE45A67005663AF /* PBXContainerItemProxy */;
361 | };
362 | /* End PBXTargetDependency section */
363 |
364 | /* Begin PBXVariantGroup section */
365 | 46F021BE1CE45A67005663AF /* Main.storyboard */ = {
366 | isa = PBXVariantGroup;
367 | children = (
368 | 46F021BF1CE45A67005663AF /* Base */,
369 | );
370 | name = Main.storyboard;
371 | sourceTree = "";
372 | };
373 | 46F021C61CE45A67005663AF /* LaunchScreen.storyboard */ = {
374 | isa = PBXVariantGroup;
375 | children = (
376 | 46F021C71CE45A67005663AF /* Base */,
377 | );
378 | name = LaunchScreen.storyboard;
379 | sourceTree = "";
380 | };
381 | /* End PBXVariantGroup section */
382 |
383 | /* Begin XCBuildConfiguration section */
384 | 46F021E01CE45A67005663AF /* Debug */ = {
385 | isa = XCBuildConfiguration;
386 | buildSettings = {
387 | ALWAYS_SEARCH_USER_PATHS = NO;
388 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
389 | CLANG_CXX_LIBRARY = "libc++";
390 | CLANG_ENABLE_MODULES = YES;
391 | CLANG_ENABLE_OBJC_ARC = YES;
392 | CLANG_WARN_BOOL_CONVERSION = YES;
393 | CLANG_WARN_CONSTANT_CONVERSION = YES;
394 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
395 | CLANG_WARN_EMPTY_BODY = YES;
396 | CLANG_WARN_ENUM_CONVERSION = YES;
397 | CLANG_WARN_INT_CONVERSION = YES;
398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
399 | CLANG_WARN_UNREACHABLE_CODE = YES;
400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
402 | COPY_PHASE_STRIP = NO;
403 | DEBUG_INFORMATION_FORMAT = dwarf;
404 | ENABLE_BITCODE = NO;
405 | ENABLE_STRICT_OBJC_MSGSEND = YES;
406 | ENABLE_TESTABILITY = YES;
407 | GCC_C_LANGUAGE_STANDARD = gnu99;
408 | GCC_DYNAMIC_NO_PIC = NO;
409 | GCC_NO_COMMON_BLOCKS = YES;
410 | GCC_OPTIMIZATION_LEVEL = 0;
411 | GCC_PREPROCESSOR_DEFINITIONS = (
412 | "DEBUG=1",
413 | "$(inherited)",
414 | );
415 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
417 | GCC_WARN_UNDECLARED_SELECTOR = YES;
418 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
419 | GCC_WARN_UNUSED_FUNCTION = YES;
420 | GCC_WARN_UNUSED_VARIABLE = YES;
421 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
422 | MTL_ENABLE_DEBUG_INFO = YES;
423 | ONLY_ACTIVE_ARCH = YES;
424 | SDKROOT = iphoneos;
425 | TARGETED_DEVICE_FAMILY = "1,2";
426 | };
427 | name = Debug;
428 | };
429 | 46F021E11CE45A67005663AF /* Release */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | ALWAYS_SEARCH_USER_PATHS = NO;
433 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
434 | CLANG_CXX_LIBRARY = "libc++";
435 | CLANG_ENABLE_MODULES = YES;
436 | CLANG_ENABLE_OBJC_ARC = YES;
437 | CLANG_WARN_BOOL_CONVERSION = YES;
438 | CLANG_WARN_CONSTANT_CONVERSION = YES;
439 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
440 | CLANG_WARN_EMPTY_BODY = YES;
441 | CLANG_WARN_ENUM_CONVERSION = YES;
442 | CLANG_WARN_INT_CONVERSION = YES;
443 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
444 | CLANG_WARN_UNREACHABLE_CODE = YES;
445 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
446 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
447 | COPY_PHASE_STRIP = NO;
448 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
449 | ENABLE_BITCODE = NO;
450 | ENABLE_NS_ASSERTIONS = NO;
451 | ENABLE_STRICT_OBJC_MSGSEND = YES;
452 | GCC_C_LANGUAGE_STANDARD = gnu99;
453 | GCC_NO_COMMON_BLOCKS = YES;
454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
456 | GCC_WARN_UNDECLARED_SELECTOR = YES;
457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
458 | GCC_WARN_UNUSED_FUNCTION = YES;
459 | GCC_WARN_UNUSED_VARIABLE = YES;
460 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
461 | MTL_ENABLE_DEBUG_INFO = NO;
462 | SDKROOT = iphoneos;
463 | TARGETED_DEVICE_FAMILY = "1,2";
464 | VALIDATE_PRODUCT = YES;
465 | };
466 | name = Release;
467 | };
468 | 46F021E31CE45A67005663AF /* Debug */ = {
469 | isa = XCBuildConfiguration;
470 | buildSettings = {
471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472 | INFOPLIST_FILE = designable/Info.plist;
473 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
475 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designable;
476 | PRODUCT_NAME = "$(TARGET_NAME)";
477 | };
478 | name = Debug;
479 | };
480 | 46F021E41CE45A67005663AF /* Release */ = {
481 | isa = XCBuildConfiguration;
482 | buildSettings = {
483 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
484 | INFOPLIST_FILE = designable/Info.plist;
485 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
487 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designable;
488 | PRODUCT_NAME = "$(TARGET_NAME)";
489 | };
490 | name = Release;
491 | };
492 | 46F021E61CE45A67005663AF /* Debug */ = {
493 | isa = XCBuildConfiguration;
494 | buildSettings = {
495 | BUNDLE_LOADER = "$(TEST_HOST)";
496 | INFOPLIST_FILE = designableTests/Info.plist;
497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
498 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designableTests;
499 | PRODUCT_NAME = "$(TARGET_NAME)";
500 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/designable.app/designable";
501 | };
502 | name = Debug;
503 | };
504 | 46F021E71CE45A67005663AF /* Release */ = {
505 | isa = XCBuildConfiguration;
506 | buildSettings = {
507 | BUNDLE_LOADER = "$(TEST_HOST)";
508 | INFOPLIST_FILE = designableTests/Info.plist;
509 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
510 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designableTests;
511 | PRODUCT_NAME = "$(TARGET_NAME)";
512 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/designable.app/designable";
513 | };
514 | name = Release;
515 | };
516 | 46F021E91CE45A67005663AF /* Debug */ = {
517 | isa = XCBuildConfiguration;
518 | buildSettings = {
519 | INFOPLIST_FILE = designableUITests/Info.plist;
520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
521 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designableUITests;
522 | PRODUCT_NAME = "$(TARGET_NAME)";
523 | TEST_TARGET_NAME = designable;
524 | USES_XCTRUNNER = YES;
525 | };
526 | name = Debug;
527 | };
528 | 46F021EA1CE45A67005663AF /* Release */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | INFOPLIST_FILE = designableUITests/Info.plist;
532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
533 | PRODUCT_BUNDLE_IDENTIFIER = com.minggo.designableUITests;
534 | PRODUCT_NAME = "$(TARGET_NAME)";
535 | TEST_TARGET_NAME = designable;
536 | USES_XCTRUNNER = YES;
537 | };
538 | name = Release;
539 | };
540 | /* End XCBuildConfiguration section */
541 |
542 | /* Begin XCConfigurationList section */
543 | 46F021AD1CE45A67005663AF /* Build configuration list for PBXProject "designable" */ = {
544 | isa = XCConfigurationList;
545 | buildConfigurations = (
546 | 46F021E01CE45A67005663AF /* Debug */,
547 | 46F021E11CE45A67005663AF /* Release */,
548 | );
549 | defaultConfigurationIsVisible = 0;
550 | defaultConfigurationName = Release;
551 | };
552 | 46F021E21CE45A67005663AF /* Build configuration list for PBXNativeTarget "designable" */ = {
553 | isa = XCConfigurationList;
554 | buildConfigurations = (
555 | 46F021E31CE45A67005663AF /* Debug */,
556 | 46F021E41CE45A67005663AF /* Release */,
557 | );
558 | defaultConfigurationIsVisible = 0;
559 | defaultConfigurationName = Release;
560 | };
561 | 46F021E51CE45A67005663AF /* Build configuration list for PBXNativeTarget "designableTests" */ = {
562 | isa = XCConfigurationList;
563 | buildConfigurations = (
564 | 46F021E61CE45A67005663AF /* Debug */,
565 | 46F021E71CE45A67005663AF /* Release */,
566 | );
567 | defaultConfigurationIsVisible = 0;
568 | defaultConfigurationName = Release;
569 | };
570 | 46F021E81CE45A67005663AF /* Build configuration list for PBXNativeTarget "designableUITests" */ = {
571 | isa = XCConfigurationList;
572 | buildConfigurations = (
573 | 46F021E91CE45A67005663AF /* Debug */,
574 | 46F021EA1CE45A67005663AF /* Release */,
575 | );
576 | defaultConfigurationIsVisible = 0;
577 | defaultConfigurationName = Release;
578 | };
579 | /* End XCConfigurationList section */
580 |
581 | /* Begin XCVersionGroup section */
582 | 46F021C11CE45A67005663AF /* designable.xcdatamodeld */ = {
583 | isa = XCVersionGroup;
584 | children = (
585 | 46F021C21CE45A67005663AF /* designable.xcdatamodel */,
586 | );
587 | currentVersion = 46F021C21CE45A67005663AF /* designable.xcdatamodel */;
588 | path = designable.xcdatamodeld;
589 | sourceTree = "";
590 | versionGroupType = wrapper.xcdatamodel;
591 | };
592 | /* End XCVersionGroup section */
593 | };
594 | rootObject = 46F021AA1CE45A67005663AF /* Project object */;
595 | }
596 |
--------------------------------------------------------------------------------
/designable/designable/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
99 |
109 |
119 |
129 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
299 |
309 |
319 |
329 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
--------------------------------------------------------------------------------