├── VMButtonCircleFun
├── Layer 14.png
├── Layer 15.png
├── Layer 16.png
├── Layer 14@2x.png
├── Layer 14@3x.png
├── Layer 15@2x.png
├── Layer 15@3x.png
├── Layer 16@2x.png
├── Layer 16@3x.png
├── ViewController.h
├── AppDelegate.h
├── main.m
├── VMButtonCircleFun.h
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
├── AppDelegate.m
├── ViewController.m
└── VMButtonCircleFun.m
├── VMButtonCircleFun.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── VMButtonCircleFun.xccheckout
├── xcuserdata
│ └── vumai.xcuserdatad
│ │ ├── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── VMButtonCircleFun.xcscheme
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── VMButtonCircleFunTests
├── Info.plist
└── VMButtonCircleFunTests.m
└── README.md
/VMButtonCircleFun/Layer 14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 14.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 15.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 16.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 14@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 14@2x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 14@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 14@3x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 15@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 15@2x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 15@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 15@3x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 16@2x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun/Layer 16@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VuMai/VMButtonCircleFun/HEAD/VMButtonCircleFun/Layer 16@3x.png
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. 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 |
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/xcuserdata/vumai.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | VMButtonCircleFun.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 270E24E01B1D95A800D2FE0D
16 |
17 | primary
18 |
19 |
20 | 270E24F91B1D95A800D2FE0D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/VMButtonCircleFun.h:
--------------------------------------------------------------------------------
1 | //
2 | // VMButtonCircleFun.h
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import
10 | typedef NS_ENUM(NSInteger, VMMakeLocation) {
11 | VMMakeLocationTop = 1,
12 | VMMakeLocationBottom
13 | };
14 |
15 | @interface VMButtonCircleFun : UIView
16 | @property(nonatomic) UIColor *strokeColor;
17 | - (void)addCircleLayerWithType:(NSInteger)type;
18 | - (void)setStrokeEnd:(CGFloat)strokeEnd animated:(BOOL)animated;
19 | -(void)buildButton;
20 | -(void)setIconButton:(UIImage *)icon withType:(NSInteger)type withColor:(UIColor*)color;
21 | -(void)setLineWidthValue:(float)lineWidthTemp;
22 | -(void)addAction:(SEL)selector;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/VMButtonCircleFunTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Vumai.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/VMButtonCircleFunTests/VMButtonCircleFunTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // VMButtonCircleFunTests.m
3 | // VMButtonCircleFunTests
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface VMButtonCircleFunTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation VMButtonCircleFunTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/Images.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 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/VMButtonCircleFun/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | Vumai.$(PRODUCT_NAME:rfc1034identifier)
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 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/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 |
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/project.xcworkspace/xcshareddata/VMButtonCircleFun.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | D0D7EDA3-06C8-43A8-A113-AE8DB4C59FA2
9 | IDESourceControlProjectName
10 | VMButtonCircleFun
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | BAA9068615106E0D1E5CBFD9DA684AAC799CCA14
14 | https://github.com/VuMai/VMButtonCircleFun.git
15 |
16 | IDESourceControlProjectPath
17 | VMButtonCircleFun.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | BAA9068615106E0D1E5CBFD9DA684AAC799CCA14
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/VuMai/VMButtonCircleFun.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | BAA9068615106E0D1E5CBFD9DA684AAC799CCA14
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | BAA9068615106E0D1E5CBFD9DA684AAC799CCA14
36 | IDESourceControlWCCName
37 | VMButtonCircleFun
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. 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 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/xcuserdata/vumai.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
24 |
36 |
37 |
38 |
40 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "VMButtonCircleFun.h"
11 |
12 | #define rgb(r, g, b) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:1]
13 |
14 | @interface ViewController ()
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 |
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | [self addCircleView];
25 | // Do any additional setup after loading the view, typically from a nib.
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | - (void)addCircleView
34 | {
35 | VMButtonCircleFun *circleView1 = [[VMButtonCircleFun alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
36 | [circleView1 addCircleLayerWithType:VMMakeLocationTop];
37 | circleView1.strokeColor = rgb(243, 106, 106);
38 | circleView1.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2 - 100, CGRectGetHeight(self.view.bounds)/2);
39 | [circleView1 setIconButton:[UIImage imageNamed:@"Layer 14.png"] withType:VMMakeLocationTop withColor:rgb(127, 140, 141)];
40 | [circleView1 setLineWidthValue:1];
41 | [self.view addSubview:circleView1];
42 | [circleView1 buildButton];
43 |
44 | VMButtonCircleFun *circleView2 = [[VMButtonCircleFun alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
45 | [circleView2 addCircleLayerWithType:VMMakeLocationBottom];
46 | circleView2.strokeColor = rgb(255, 195, 45);
47 | circleView2.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2, CGRectGetHeight(self.view.bounds)/2);
48 | [circleView2 setIconButton:[UIImage imageNamed:@"Layer 15.png"] withType:VMMakeLocationBottom withColor:rgb(127, 140, 141)];
49 | [circleView2 setLineWidthValue:1];
50 | [self.view addSubview:circleView2];
51 | [circleView2 buildButton];
52 |
53 | VMButtonCircleFun *circleView3 = [[VMButtonCircleFun alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
54 | [circleView3 addCircleLayerWithType:VMMakeLocationTop];
55 | circleView3.strokeColor = rgb(74, 220, 239);
56 | circleView3.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2 + 100, CGRectGetHeight(self.view.bounds)/2);
57 | [circleView3 setIconButton:[UIImage imageNamed:@"Layer 16.png"] withType:VMMakeLocationTop withColor:rgb(127, 140, 141)];
58 | [circleView3 setLineWidthValue:1];
59 | [self.view addSubview:circleView3];
60 | [circleView3 buildButton];
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # VMButtonCircleFun
2 | https://youtu.be/oAhPnSlvG3s
3 |
4 | #Author
5 | VuMai
6 |
7 | https://vumai.me
8 |
9 | ## Overview ##
10 |
11 | VMButtonCircleFun is an button iOS control.It is generated on the screen with cute effects.You can change it any way if you like this.
12 |
13 | ## How to use ##
14 |
15 | First, you need to copy 2 files VMButtonCircleFun.h/.m and Images icon to your project. Then, import them to your class
16 |
17 | ```objc
18 | #import "VMButtonCircleFun.h"
19 | ```
20 |
21 | Now you can add this funtions to show VMGearsLoading:
22 |
23 | ```objc
24 | VMButtonCircleFun *circleView = [[VMButtonCircleFun alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
25 | [circleView addCircleLayerWithType:VMMakeLocationTop]; ( * )
26 | [circleView setStrokeColor:rgb(243, 106, 106)]; ( 1 )
27 | [circleView setCenter:CGPointMake(CGRectGetWidth(self.view.bounds)/2 - 100, CGRectGetHeight(self.view.bounds)/2)];
28 | [circleView setIconButton:[UIImage imageNamed:@"Layer 14.png"] withType:VMMakeLocationTop withColor:rgb(127, 140, 141)]; ( 2 )
29 | [circleView setLineWidthValue:1]; ( 3 )
30 | [self.view addSubview:circleView1];
31 | [circleView buildButton]; ( 4 )
32 | ```
33 | Let’s run through this method step by step:
34 |
35 | *: 2 type of VMButtonCircleFun:
36 |
37 | - VMMakeLocationTop: button started from top
38 |
39 | - VMMakeLocationBottom: button started from bottom
40 |
41 | 1: set line color
42 |
43 | 2: set icon of button with color
44 |
45 | 3: set line width
46 |
47 | 4: importan! if you don't use this function button will not appear.
48 |
49 |
50 | ## Release notes
51 |
52 | Version 1.0
53 |
54 | ## MIT License
55 | Copyright (c) 2015 VuMai
56 |
57 | 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:
58 |
59 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
60 |
61 | 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.
62 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/xcuserdata/vumai.xcuserdatad/xcschemes/VMButtonCircleFun.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/VMButtonCircleFun/VMButtonCircleFun.m:
--------------------------------------------------------------------------------
1 | //
2 | // VMButtonCircleFun.m
3 | // VMButtonCircleFun
4 | //
5 | // Created by Vu Mai on 6/2/15.
6 | // Copyright (c) 2015 VuMai. All rights reserved.
7 | //
8 |
9 | #import "VMButtonCircleFun.h"
10 |
11 | @interface VMButtonCircleFun()
12 |
13 | @property(nonatomic) CAShapeLayer *circleLayer;
14 | @property (nonatomic) CAShapeLayer *lineLayerTopToBottom;
15 | @property (nonatomic) CAShapeLayer *lineLayerBottomToHide;
16 |
17 | @property (nonatomic, strong) UIImageView *imgIcon;
18 | @property (nonatomic) float lineWidth;
19 | @end
20 |
21 | @implementation VMButtonCircleFun
22 |
23 | - (id)initWithFrame:(CGRect)frame
24 | {
25 | self = [super initWithFrame:frame];
26 | if (self) {
27 | self.lineWidth = 2.0f;
28 | }
29 | return self;
30 | }
31 |
32 | #pragma mark - Instance Methods
33 |
34 | - (void)setStrokeEnd:(CGFloat)strokeEnd animated:(BOOL)animated
35 | {
36 | self.circleLayer.strokeEnd = strokeEnd;
37 | }
38 |
39 | #pragma mark - Property Setters
40 |
41 | - (void)setStrokeColor:(UIColor *)strokeColor
42 | {
43 | self.circleLayer.strokeColor = strokeColor.CGColor;
44 | self.lineLayerBottomToHide.strokeColor = strokeColor.CGColor;
45 | self.lineLayerTopToBottom.strokeColor = strokeColor.CGColor;
46 | _strokeColor = strokeColor;
47 | }
48 |
49 | -(void)setLineWidthValue:(float)lineWidthTemp
50 | {
51 | self.lineWidth = lineWidthTemp;
52 | }
53 |
54 | #pragma mark - Private Instance methods
55 |
56 | - (void)addCircleLayerWithType:(NSInteger)type
57 | {
58 | CGFloat radius;
59 | CGFloat lineWidth = self.lineWidth;
60 | CGRect screenRect = [[UIScreen mainScreen] bounds];
61 | // CGFloat screenWidth = screenRect.size.width;
62 | CGFloat screenHeight = screenRect.size.height;
63 | CGRect rect;
64 | UIBezierPath *path1 = [UIBezierPath bezierPath];
65 | UIBezierPath *path2 = [UIBezierPath bezierPath];
66 | switch (type) {
67 | case VMMakeLocationTop:
68 | radius = CGRectGetWidth(self.bounds)/2 - lineWidth/2;
69 | rect = CGRectMake(lineWidth/2, lineWidth/2, radius * 2, radius * 2);
70 | [path1 moveToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, -screenHeight)];
71 | [path1 addLineToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, 1)];
72 |
73 | [path2 moveToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, 1)];
74 | [path2 addLineToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, -screenHeight)];
75 | break;
76 |
77 | case VMMakeLocationBottom:
78 | radius = CGRectGetWidth(self.bounds)/2 - lineWidth/2;
79 | rect = CGRectMake(CGRectGetWidth(self.bounds)-lineWidth/2,CGRectGetHeight(self.bounds)-lineWidth/2, radius * -2, radius * -2);
80 |
81 |
82 | [path1 moveToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, +screenHeight)];
83 | [path1 addLineToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)-1)];
84 |
85 | [path2 moveToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)-1)];
86 | [path2 addLineToPoint:CGPointMake(CGRectGetWidth(self.bounds)/2, +screenHeight)];
87 | break;
88 |
89 | default:
90 | break;
91 | }
92 |
93 | self.circleLayer = [CAShapeLayer layer];
94 | self.circleLayer.path = [UIBezierPath bezierPathWithRoundedRect:rect
95 | cornerRadius:radius].CGPath;
96 | self.circleLayer.strokeColor = self.tintColor.CGColor;
97 | self.circleLayer.fillColor = nil;
98 | self.circleLayer.lineWidth = lineWidth;
99 | self.circleLayer.lineCap = kCALineCapRound;
100 | self.circleLayer.lineJoin = kCALineJoinRound;
101 | [self.circleLayer setStrokeEnd:0.0f];
102 | [self.layer addSublayer:self.circleLayer];
103 |
104 | self.lineLayerTopToBottom = [CAShapeLayer layer];
105 |
106 | self.lineLayerTopToBottom.path = path1.CGPath;
107 | self.lineLayerTopToBottom.lineWidth = self.lineWidth;
108 | [self.lineLayerTopToBottom setStrokeEnd:1.0f];
109 | self.lineLayerTopToBottom.strokeColor = [UIColor darkGrayColor].CGColor;
110 | [self.layer addSublayer:self.lineLayerTopToBottom];\
111 |
112 | self.lineLayerBottomToHide = [CAShapeLayer layer];
113 | self.lineLayerBottomToHide.path = path2.CGPath;
114 | self.lineLayerBottomToHide.lineWidth = self.lineWidth;
115 | [self.lineLayerBottomToHide setStrokeEnd:1.0f];
116 | self.lineLayerBottomToHide.strokeColor = [UIColor darkGrayColor].CGColor;
117 | [self.lineLayerBottomToHide setOpacity:0];
118 | [self.layer addSublayer:self.lineLayerBottomToHide];
119 |
120 | [UIView setAnimationDelegate:self];
121 | }
122 |
123 | -(void)setIconButton:(UIImage *)icon withType:(NSInteger)type withColor:(UIColor*)color
124 | {
125 | self.imgIcon = [[UIImageView alloc] initWithImage:icon];
126 | [self.imgIcon setFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds)-CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)-CGRectGetHeight(self.bounds)/2)];
127 |
128 | self.imgIcon.image = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
129 | [self.imgIcon setContentMode:UIViewContentModeScaleAspectFit];
130 | [self.imgIcon setTintColor:color];
131 | switch (type) {
132 | case VMMakeLocationTop:
133 | [self.imgIcon setCenter:CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)/2 -5 )];
134 | break;
135 | case VMMakeLocationBottom:
136 | [self.imgIcon setCenter:CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)/2 +5 )];
137 | break;
138 |
139 | default:
140 | break;
141 | }
142 |
143 | [self.imgIcon setAlpha:0];
144 | [self addSubview:self.imgIcon];
145 | }
146 |
147 | -(void)addAction:(SEL)selector
148 | {
149 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:selector];
150 | [self addGestureRecognizer:tap];
151 | }
152 |
153 | -(void)buildButton
154 | {
155 | CABasicAnimation * swipeLine = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
156 | [swipeLine setValue:@"topToBottom" forKey:@"id"];
157 | swipeLine.delegate = self;
158 | swipeLine.duration=1;
159 | swipeLine.fromValue=[NSNumber numberWithDouble:0.0f];
160 | swipeLine.toValue= [NSNumber numberWithDouble:1.0f];
161 | swipeLine.fillMode = kCAFillModeForwards;
162 | swipeLine.timingFunction= [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
163 | swipeLine.removedOnCompletion=NO;
164 | self.lineLayerTopToBottom.strokeEnd = 1.0f;
165 | [self.lineLayerTopToBottom addAnimation:swipeLine forKey:@"topToBottom"];
166 |
167 | }
168 |
169 | -(void)animationLineBottomToHide
170 | {
171 |
172 | CABasicAnimation * swipeLine1 = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
173 | [swipeLine1 setValue:@"bottomToHide" forKey:@"id"];
174 | swipeLine1.duration=1;
175 | swipeLine1.fromValue=[NSNumber numberWithDouble:1.0f];
176 | swipeLine1.toValue= [NSNumber numberWithDouble:0.0f];
177 | swipeLine1.fillMode = kCAFillModeForwards;
178 | swipeLine1.timingFunction= [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
179 | swipeLine1.removedOnCompletion=YES;
180 | self.lineLayerBottomToHide.strokeEnd = 0.0f;
181 | [self.lineLayerBottomToHide addAnimation:swipeLine1 forKey:@"bottomToHide"];
182 | }
183 |
184 | -(void)animationLineCircle
185 | {
186 | CABasicAnimation * swipe = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
187 | [swipe setValue:@"drawCircle" forKey:@"id"];
188 | swipe.duration=1;
189 | swipe.fromValue=[NSNumber numberWithDouble:0.0f];
190 | swipe.toValue= [NSNumber numberWithDouble:1.0f];
191 | swipe.fillMode = kCAFillModeForwards;
192 | swipe.timingFunction= [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
193 | swipe.removedOnCompletion=NO;
194 | self.circleLayer.strokeEnd = 1;
195 | [self.circleLayer addAnimation:swipe forKey:@"drawCircle"];
196 |
197 | [UIView animateWithDuration:0.5 delay:0.5 options:UIViewAnimationOptionCurveEaseIn animations:^{
198 | [self.imgIcon setAlpha:1];
199 | [self.imgIcon setCenter:CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)/2)];
200 | } completion:^(BOOL finished) {
201 |
202 | }];
203 | }
204 |
205 | -(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
206 | {
207 | if([[anim valueForKey:@"id"] isEqual:@"topToBottom"]) {
208 | [self.lineLayerBottomToHide setOpacity:1];
209 | [self.lineLayerTopToBottom setOpacity:0];
210 | [self animationLineBottomToHide];
211 | [self animationLineCircle];
212 | }
213 | }
214 |
215 | @end
216 |
--------------------------------------------------------------------------------
/VMButtonCircleFun.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 270E24E71B1D95A800D2FE0D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E24E61B1D95A800D2FE0D /* main.m */; };
11 | 270E24EA1B1D95A800D2FE0D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E24E91B1D95A800D2FE0D /* AppDelegate.m */; };
12 | 270E24ED1B1D95A800D2FE0D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E24EC1B1D95A800D2FE0D /* ViewController.m */; };
13 | 270E24F01B1D95A800D2FE0D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 270E24EE1B1D95A800D2FE0D /* Main.storyboard */; };
14 | 270E24F21B1D95A800D2FE0D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 270E24F11B1D95A800D2FE0D /* Images.xcassets */; };
15 | 270E24F51B1D95A800D2FE0D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 270E24F31B1D95A800D2FE0D /* LaunchScreen.xib */; };
16 | 270E25011B1D95A800D2FE0D /* VMButtonCircleFunTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E25001B1D95A800D2FE0D /* VMButtonCircleFunTests.m */; };
17 | 270E25101B1DB00400D2FE0D /* VMButtonCircleFun.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E250F1B1DB00400D2FE0D /* VMButtonCircleFun.m */; };
18 | 270E25151B1DB9E200D2FE0D /* Layer 14.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E25121B1DB9E200D2FE0D /* Layer 14.png */; };
19 | 270E25161B1DB9E200D2FE0D /* Layer 14@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E25131B1DB9E200D2FE0D /* Layer 14@2x.png */; };
20 | 270E25171B1DB9E200D2FE0D /* Layer 14@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E25141B1DB9E200D2FE0D /* Layer 14@3x.png */; };
21 | 270E251E1B1ED8B000D2FE0D /* Layer 15.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E25181B1ED8B000D2FE0D /* Layer 15.png */; };
22 | 270E251F1B1ED8B000D2FE0D /* Layer 15@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E25191B1ED8B000D2FE0D /* Layer 15@2x.png */; };
23 | 270E25201B1ED8B000D2FE0D /* Layer 15@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E251A1B1ED8B000D2FE0D /* Layer 15@3x.png */; };
24 | 270E25211B1ED8B000D2FE0D /* Layer 16.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E251B1B1ED8B000D2FE0D /* Layer 16.png */; };
25 | 270E25221B1ED8B000D2FE0D /* Layer 16@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E251C1B1ED8B000D2FE0D /* Layer 16@2x.png */; };
26 | 270E25231B1ED8B000D2FE0D /* Layer 16@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 270E251D1B1ED8B000D2FE0D /* Layer 16@3x.png */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | 270E24FB1B1D95A800D2FE0D /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 270E24D91B1D95A800D2FE0D /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 270E24E01B1D95A800D2FE0D;
35 | remoteInfo = VMButtonCircleFun;
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXFileReference section */
40 | 270E24E11B1D95A800D2FE0D /* VMButtonCircleFun.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VMButtonCircleFun.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 270E24E51B1D95A800D2FE0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | 270E24E61B1D95A800D2FE0D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
43 | 270E24E81B1D95A800D2FE0D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
44 | 270E24E91B1D95A800D2FE0D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
45 | 270E24EB1B1D95A800D2FE0D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
46 | 270E24EC1B1D95A800D2FE0D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
47 | 270E24EF1B1D95A800D2FE0D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
48 | 270E24F11B1D95A800D2FE0D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
49 | 270E24F41B1D95A800D2FE0D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
50 | 270E24FA1B1D95A800D2FE0D /* VMButtonCircleFunTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VMButtonCircleFunTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 270E24FF1B1D95A800D2FE0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | 270E25001B1D95A800D2FE0D /* VMButtonCircleFunTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VMButtonCircleFunTests.m; sourceTree = ""; };
53 | 270E250E1B1DB00400D2FE0D /* VMButtonCircleFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMButtonCircleFun.h; sourceTree = ""; };
54 | 270E250F1B1DB00400D2FE0D /* VMButtonCircleFun.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VMButtonCircleFun.m; sourceTree = ""; };
55 | 270E25121B1DB9E200D2FE0D /* Layer 14.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 14.png"; sourceTree = ""; };
56 | 270E25131B1DB9E200D2FE0D /* Layer 14@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 14@2x.png"; sourceTree = ""; };
57 | 270E25141B1DB9E200D2FE0D /* Layer 14@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 14@3x.png"; sourceTree = ""; };
58 | 270E25181B1ED8B000D2FE0D /* Layer 15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 15.png"; sourceTree = ""; };
59 | 270E25191B1ED8B000D2FE0D /* Layer 15@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 15@2x.png"; sourceTree = ""; };
60 | 270E251A1B1ED8B000D2FE0D /* Layer 15@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 15@3x.png"; sourceTree = ""; };
61 | 270E251B1B1ED8B000D2FE0D /* Layer 16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 16.png"; sourceTree = ""; };
62 | 270E251C1B1ED8B000D2FE0D /* Layer 16@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 16@2x.png"; sourceTree = ""; };
63 | 270E251D1B1ED8B000D2FE0D /* Layer 16@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Layer 16@3x.png"; sourceTree = ""; };
64 | /* End PBXFileReference section */
65 |
66 | /* Begin PBXFrameworksBuildPhase section */
67 | 270E24DE1B1D95A800D2FE0D /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | );
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | 270E24F71B1D95A800D2FE0D /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | 270E24D81B1D95A800D2FE0D = {
85 | isa = PBXGroup;
86 | children = (
87 | 270E24E31B1D95A800D2FE0D /* VMButtonCircleFun */,
88 | 270E24FD1B1D95A800D2FE0D /* VMButtonCircleFunTests */,
89 | 270E24E21B1D95A800D2FE0D /* Products */,
90 | );
91 | sourceTree = "";
92 | };
93 | 270E24E21B1D95A800D2FE0D /* Products */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 270E24E11B1D95A800D2FE0D /* VMButtonCircleFun.app */,
97 | 270E24FA1B1D95A800D2FE0D /* VMButtonCircleFunTests.xctest */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 270E24E31B1D95A800D2FE0D /* VMButtonCircleFun */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 270E25111B1DB90B00D2FE0D /* Images */,
106 | 270E250D1B1DAFDA00D2FE0D /* VMButtonCircleFun */,
107 | 270E24E81B1D95A800D2FE0D /* AppDelegate.h */,
108 | 270E24E91B1D95A800D2FE0D /* AppDelegate.m */,
109 | 270E24EB1B1D95A800D2FE0D /* ViewController.h */,
110 | 270E24EC1B1D95A800D2FE0D /* ViewController.m */,
111 | 270E24EE1B1D95A800D2FE0D /* Main.storyboard */,
112 | 270E24F11B1D95A800D2FE0D /* Images.xcassets */,
113 | 270E24F31B1D95A800D2FE0D /* LaunchScreen.xib */,
114 | 270E24E41B1D95A800D2FE0D /* Supporting Files */,
115 | );
116 | path = VMButtonCircleFun;
117 | sourceTree = "";
118 | };
119 | 270E24E41B1D95A800D2FE0D /* Supporting Files */ = {
120 | isa = PBXGroup;
121 | children = (
122 | 270E24E51B1D95A800D2FE0D /* Info.plist */,
123 | 270E24E61B1D95A800D2FE0D /* main.m */,
124 | );
125 | name = "Supporting Files";
126 | sourceTree = "";
127 | };
128 | 270E24FD1B1D95A800D2FE0D /* VMButtonCircleFunTests */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 270E25001B1D95A800D2FE0D /* VMButtonCircleFunTests.m */,
132 | 270E24FE1B1D95A800D2FE0D /* Supporting Files */,
133 | );
134 | path = VMButtonCircleFunTests;
135 | sourceTree = "";
136 | };
137 | 270E24FE1B1D95A800D2FE0D /* Supporting Files */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 270E24FF1B1D95A800D2FE0D /* Info.plist */,
141 | );
142 | name = "Supporting Files";
143 | sourceTree = "";
144 | };
145 | 270E250D1B1DAFDA00D2FE0D /* VMButtonCircleFun */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 270E250E1B1DB00400D2FE0D /* VMButtonCircleFun.h */,
149 | 270E250F1B1DB00400D2FE0D /* VMButtonCircleFun.m */,
150 | );
151 | name = VMButtonCircleFun;
152 | sourceTree = "";
153 | };
154 | 270E25111B1DB90B00D2FE0D /* Images */ = {
155 | isa = PBXGroup;
156 | children = (
157 | 270E25181B1ED8B000D2FE0D /* Layer 15.png */,
158 | 270E25191B1ED8B000D2FE0D /* Layer 15@2x.png */,
159 | 270E251A1B1ED8B000D2FE0D /* Layer 15@3x.png */,
160 | 270E251B1B1ED8B000D2FE0D /* Layer 16.png */,
161 | 270E251C1B1ED8B000D2FE0D /* Layer 16@2x.png */,
162 | 270E251D1B1ED8B000D2FE0D /* Layer 16@3x.png */,
163 | 270E25121B1DB9E200D2FE0D /* Layer 14.png */,
164 | 270E25131B1DB9E200D2FE0D /* Layer 14@2x.png */,
165 | 270E25141B1DB9E200D2FE0D /* Layer 14@3x.png */,
166 | );
167 | name = Images;
168 | sourceTree = "";
169 | };
170 | /* End PBXGroup section */
171 |
172 | /* Begin PBXNativeTarget section */
173 | 270E24E01B1D95A800D2FE0D /* VMButtonCircleFun */ = {
174 | isa = PBXNativeTarget;
175 | buildConfigurationList = 270E25041B1D95A800D2FE0D /* Build configuration list for PBXNativeTarget "VMButtonCircleFun" */;
176 | buildPhases = (
177 | 270E24DD1B1D95A800D2FE0D /* Sources */,
178 | 270E24DE1B1D95A800D2FE0D /* Frameworks */,
179 | 270E24DF1B1D95A800D2FE0D /* Resources */,
180 | );
181 | buildRules = (
182 | );
183 | dependencies = (
184 | );
185 | name = VMButtonCircleFun;
186 | productName = VMButtonCircleFun;
187 | productReference = 270E24E11B1D95A800D2FE0D /* VMButtonCircleFun.app */;
188 | productType = "com.apple.product-type.application";
189 | };
190 | 270E24F91B1D95A800D2FE0D /* VMButtonCircleFunTests */ = {
191 | isa = PBXNativeTarget;
192 | buildConfigurationList = 270E25071B1D95A800D2FE0D /* Build configuration list for PBXNativeTarget "VMButtonCircleFunTests" */;
193 | buildPhases = (
194 | 270E24F61B1D95A800D2FE0D /* Sources */,
195 | 270E24F71B1D95A800D2FE0D /* Frameworks */,
196 | 270E24F81B1D95A800D2FE0D /* Resources */,
197 | );
198 | buildRules = (
199 | );
200 | dependencies = (
201 | 270E24FC1B1D95A800D2FE0D /* PBXTargetDependency */,
202 | );
203 | name = VMButtonCircleFunTests;
204 | productName = VMButtonCircleFunTests;
205 | productReference = 270E24FA1B1D95A800D2FE0D /* VMButtonCircleFunTests.xctest */;
206 | productType = "com.apple.product-type.bundle.unit-test";
207 | };
208 | /* End PBXNativeTarget section */
209 |
210 | /* Begin PBXProject section */
211 | 270E24D91B1D95A800D2FE0D /* Project object */ = {
212 | isa = PBXProject;
213 | attributes = {
214 | LastUpgradeCheck = 0630;
215 | ORGANIZATIONNAME = VuMai;
216 | TargetAttributes = {
217 | 270E24E01B1D95A800D2FE0D = {
218 | CreatedOnToolsVersion = 6.3.2;
219 | };
220 | 270E24F91B1D95A800D2FE0D = {
221 | CreatedOnToolsVersion = 6.3.2;
222 | TestTargetID = 270E24E01B1D95A800D2FE0D;
223 | };
224 | };
225 | };
226 | buildConfigurationList = 270E24DC1B1D95A800D2FE0D /* Build configuration list for PBXProject "VMButtonCircleFun" */;
227 | compatibilityVersion = "Xcode 3.2";
228 | developmentRegion = English;
229 | hasScannedForEncodings = 0;
230 | knownRegions = (
231 | en,
232 | Base,
233 | );
234 | mainGroup = 270E24D81B1D95A800D2FE0D;
235 | productRefGroup = 270E24E21B1D95A800D2FE0D /* Products */;
236 | projectDirPath = "";
237 | projectRoot = "";
238 | targets = (
239 | 270E24E01B1D95A800D2FE0D /* VMButtonCircleFun */,
240 | 270E24F91B1D95A800D2FE0D /* VMButtonCircleFunTests */,
241 | );
242 | };
243 | /* End PBXProject section */
244 |
245 | /* Begin PBXResourcesBuildPhase section */
246 | 270E24DF1B1D95A800D2FE0D /* Resources */ = {
247 | isa = PBXResourcesBuildPhase;
248 | buildActionMask = 2147483647;
249 | files = (
250 | 270E251E1B1ED8B000D2FE0D /* Layer 15.png in Resources */,
251 | 270E24F01B1D95A800D2FE0D /* Main.storyboard in Resources */,
252 | 270E25151B1DB9E200D2FE0D /* Layer 14.png in Resources */,
253 | 270E25221B1ED8B000D2FE0D /* Layer 16@2x.png in Resources */,
254 | 270E25161B1DB9E200D2FE0D /* Layer 14@2x.png in Resources */,
255 | 270E24F51B1D95A800D2FE0D /* LaunchScreen.xib in Resources */,
256 | 270E24F21B1D95A800D2FE0D /* Images.xcassets in Resources */,
257 | 270E25171B1DB9E200D2FE0D /* Layer 14@3x.png in Resources */,
258 | 270E25211B1ED8B000D2FE0D /* Layer 16.png in Resources */,
259 | 270E25231B1ED8B000D2FE0D /* Layer 16@3x.png in Resources */,
260 | 270E251F1B1ED8B000D2FE0D /* Layer 15@2x.png in Resources */,
261 | 270E25201B1ED8B000D2FE0D /* Layer 15@3x.png in Resources */,
262 | );
263 | runOnlyForDeploymentPostprocessing = 0;
264 | };
265 | 270E24F81B1D95A800D2FE0D /* Resources */ = {
266 | isa = PBXResourcesBuildPhase;
267 | buildActionMask = 2147483647;
268 | files = (
269 | );
270 | runOnlyForDeploymentPostprocessing = 0;
271 | };
272 | /* End PBXResourcesBuildPhase section */
273 |
274 | /* Begin PBXSourcesBuildPhase section */
275 | 270E24DD1B1D95A800D2FE0D /* Sources */ = {
276 | isa = PBXSourcesBuildPhase;
277 | buildActionMask = 2147483647;
278 | files = (
279 | 270E25101B1DB00400D2FE0D /* VMButtonCircleFun.m in Sources */,
280 | 270E24ED1B1D95A800D2FE0D /* ViewController.m in Sources */,
281 | 270E24EA1B1D95A800D2FE0D /* AppDelegate.m in Sources */,
282 | 270E24E71B1D95A800D2FE0D /* main.m in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | 270E24F61B1D95A800D2FE0D /* Sources */ = {
287 | isa = PBXSourcesBuildPhase;
288 | buildActionMask = 2147483647;
289 | files = (
290 | 270E25011B1D95A800D2FE0D /* VMButtonCircleFunTests.m in Sources */,
291 | );
292 | runOnlyForDeploymentPostprocessing = 0;
293 | };
294 | /* End PBXSourcesBuildPhase section */
295 |
296 | /* Begin PBXTargetDependency section */
297 | 270E24FC1B1D95A800D2FE0D /* PBXTargetDependency */ = {
298 | isa = PBXTargetDependency;
299 | target = 270E24E01B1D95A800D2FE0D /* VMButtonCircleFun */;
300 | targetProxy = 270E24FB1B1D95A800D2FE0D /* PBXContainerItemProxy */;
301 | };
302 | /* End PBXTargetDependency section */
303 |
304 | /* Begin PBXVariantGroup section */
305 | 270E24EE1B1D95A800D2FE0D /* Main.storyboard */ = {
306 | isa = PBXVariantGroup;
307 | children = (
308 | 270E24EF1B1D95A800D2FE0D /* Base */,
309 | );
310 | name = Main.storyboard;
311 | sourceTree = "";
312 | };
313 | 270E24F31B1D95A800D2FE0D /* LaunchScreen.xib */ = {
314 | isa = PBXVariantGroup;
315 | children = (
316 | 270E24F41B1D95A800D2FE0D /* Base */,
317 | );
318 | name = LaunchScreen.xib;
319 | sourceTree = "";
320 | };
321 | /* End PBXVariantGroup section */
322 |
323 | /* Begin XCBuildConfiguration section */
324 | 270E25021B1D95A800D2FE0D /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | ALWAYS_SEARCH_USER_PATHS = NO;
328 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
329 | CLANG_CXX_LIBRARY = "libc++";
330 | CLANG_ENABLE_MODULES = YES;
331 | CLANG_ENABLE_OBJC_ARC = YES;
332 | CLANG_WARN_BOOL_CONVERSION = YES;
333 | CLANG_WARN_CONSTANT_CONVERSION = YES;
334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335 | CLANG_WARN_EMPTY_BODY = YES;
336 | CLANG_WARN_ENUM_CONVERSION = YES;
337 | CLANG_WARN_INT_CONVERSION = YES;
338 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
339 | CLANG_WARN_UNREACHABLE_CODE = YES;
340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
342 | COPY_PHASE_STRIP = NO;
343 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
344 | ENABLE_STRICT_OBJC_MSGSEND = YES;
345 | GCC_C_LANGUAGE_STANDARD = gnu99;
346 | GCC_DYNAMIC_NO_PIC = NO;
347 | GCC_NO_COMMON_BLOCKS = YES;
348 | GCC_OPTIMIZATION_LEVEL = 0;
349 | GCC_PREPROCESSOR_DEFINITIONS = (
350 | "DEBUG=1",
351 | "$(inherited)",
352 | );
353 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
356 | GCC_WARN_UNDECLARED_SELECTOR = YES;
357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358 | GCC_WARN_UNUSED_FUNCTION = YES;
359 | GCC_WARN_UNUSED_VARIABLE = YES;
360 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
361 | MTL_ENABLE_DEBUG_INFO = YES;
362 | ONLY_ACTIVE_ARCH = YES;
363 | SDKROOT = iphoneos;
364 | TARGETED_DEVICE_FAMILY = "1,2";
365 | };
366 | name = Debug;
367 | };
368 | 270E25031B1D95A800D2FE0D /* Release */ = {
369 | isa = XCBuildConfiguration;
370 | buildSettings = {
371 | ALWAYS_SEARCH_USER_PATHS = NO;
372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
373 | CLANG_CXX_LIBRARY = "libc++";
374 | CLANG_ENABLE_MODULES = YES;
375 | CLANG_ENABLE_OBJC_ARC = YES;
376 | CLANG_WARN_BOOL_CONVERSION = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
379 | CLANG_WARN_EMPTY_BODY = YES;
380 | CLANG_WARN_ENUM_CONVERSION = YES;
381 | CLANG_WARN_INT_CONVERSION = YES;
382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386 | COPY_PHASE_STRIP = NO;
387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
388 | ENABLE_NS_ASSERTIONS = NO;
389 | ENABLE_STRICT_OBJC_MSGSEND = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu99;
391 | GCC_NO_COMMON_BLOCKS = YES;
392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
394 | GCC_WARN_UNDECLARED_SELECTOR = YES;
395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
396 | GCC_WARN_UNUSED_FUNCTION = YES;
397 | GCC_WARN_UNUSED_VARIABLE = YES;
398 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
399 | MTL_ENABLE_DEBUG_INFO = NO;
400 | SDKROOT = iphoneos;
401 | TARGETED_DEVICE_FAMILY = "1,2";
402 | VALIDATE_PRODUCT = YES;
403 | };
404 | name = Release;
405 | };
406 | 270E25051B1D95A800D2FE0D /* Debug */ = {
407 | isa = XCBuildConfiguration;
408 | buildSettings = {
409 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
410 | INFOPLIST_FILE = VMButtonCircleFun/Info.plist;
411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | };
414 | name = Debug;
415 | };
416 | 270E25061B1D95A800D2FE0D /* Release */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420 | INFOPLIST_FILE = VMButtonCircleFun/Info.plist;
421 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
422 | PRODUCT_NAME = "$(TARGET_NAME)";
423 | };
424 | name = Release;
425 | };
426 | 270E25081B1D95A800D2FE0D /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | buildSettings = {
429 | BUNDLE_LOADER = "$(TEST_HOST)";
430 | FRAMEWORK_SEARCH_PATHS = (
431 | "$(SDKROOT)/Developer/Library/Frameworks",
432 | "$(inherited)",
433 | );
434 | GCC_PREPROCESSOR_DEFINITIONS = (
435 | "DEBUG=1",
436 | "$(inherited)",
437 | );
438 | INFOPLIST_FILE = VMButtonCircleFunTests/Info.plist;
439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
440 | PRODUCT_NAME = "$(TARGET_NAME)";
441 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VMButtonCircleFun.app/VMButtonCircleFun";
442 | };
443 | name = Debug;
444 | };
445 | 270E25091B1D95A800D2FE0D /* Release */ = {
446 | isa = XCBuildConfiguration;
447 | buildSettings = {
448 | BUNDLE_LOADER = "$(TEST_HOST)";
449 | FRAMEWORK_SEARCH_PATHS = (
450 | "$(SDKROOT)/Developer/Library/Frameworks",
451 | "$(inherited)",
452 | );
453 | INFOPLIST_FILE = VMButtonCircleFunTests/Info.plist;
454 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
455 | PRODUCT_NAME = "$(TARGET_NAME)";
456 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VMButtonCircleFun.app/VMButtonCircleFun";
457 | };
458 | name = Release;
459 | };
460 | /* End XCBuildConfiguration section */
461 |
462 | /* Begin XCConfigurationList section */
463 | 270E24DC1B1D95A800D2FE0D /* Build configuration list for PBXProject "VMButtonCircleFun" */ = {
464 | isa = XCConfigurationList;
465 | buildConfigurations = (
466 | 270E25021B1D95A800D2FE0D /* Debug */,
467 | 270E25031B1D95A800D2FE0D /* Release */,
468 | );
469 | defaultConfigurationIsVisible = 0;
470 | defaultConfigurationName = Release;
471 | };
472 | 270E25041B1D95A800D2FE0D /* Build configuration list for PBXNativeTarget "VMButtonCircleFun" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 270E25051B1D95A800D2FE0D /* Debug */,
476 | 270E25061B1D95A800D2FE0D /* Release */,
477 | );
478 | defaultConfigurationIsVisible = 0;
479 | defaultConfigurationName = Release;
480 | };
481 | 270E25071B1D95A800D2FE0D /* Build configuration list for PBXNativeTarget "VMButtonCircleFunTests" */ = {
482 | isa = XCConfigurationList;
483 | buildConfigurations = (
484 | 270E25081B1D95A800D2FE0D /* Debug */,
485 | 270E25091B1D95A800D2FE0D /* Release */,
486 | );
487 | defaultConfigurationIsVisible = 0;
488 | defaultConfigurationName = Release;
489 | };
490 | /* End XCConfigurationList section */
491 | };
492 | rootObject = 270E24D91B1D95A800D2FE0D /* Project object */;
493 | }
494 |
--------------------------------------------------------------------------------