├── shape_animated_button
├── 1112.gif
├── shape_animated_button
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── Publish_hiFive.imageset
│ │ │ ├── Publish_hiFive@2x.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.swift
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.swift
│ └── CLHiFiveButton.swift
├── shape_animated_button.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── shape_animated_buttonTests
│ ├── Info.plist
│ └── shape_animated_buttonTests.swift
├── README.md
├── LICENSE
└── .gitignore
/shape_animated_button/1112.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tickboxs/Shape_Animated_Button/HEAD/shape_animated_button/1112.gif
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/Assets.xcassets/Publish_hiFive.imageset/Publish_hiFive@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tickboxs/Shape_Animated_Button/HEAD/shape_animated_button/shape_animated_button/Assets.xcassets/Publish_hiFive.imageset/Publish_hiFive@2x.png
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/Assets.xcassets/Publish_hiFive.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Publish_hiFive@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Shape_Animated_Button
2 | a UIButton with shape change,tintColor change animation
3 |
4 | 
5 |
6 | since the button frame will change during animation,the autolayout framework cannot work approprately with this button.please try using frame to locate button.
7 | 因为button的frame会在动画过程中改变 所以自动布局系统不能工作 请用frame来定位button
8 |
9 | please feel free to modify according to your requirement
10 | 请自由按照你的需求随意修改
11 |
12 | pop() pop animation 放大动画
13 | shrink shrink animation 缩小动画
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/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 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_buttonTests/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 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // shape_animated_button
4 | //
5 | // Created by 蔡磊 on 16/6/12.
6 | // Copyright © 2016年 cailei. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 |
17 | let hiFiveButton = CLHiFiveButton {
18 |
19 | }
20 |
21 | view.addSubview(hiFiveButton)
22 | let centerX = view.bounds.width*0.5
23 | let centerY = view.bounds.height*0.5
24 |
25 | hiFiveButton.center = CGPoint(x: centerX, y: centerY)
26 | }
27 |
28 | override func didReceiveMemoryWarning() {
29 | super.didReceiveMemoryWarning()
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 iOS-mamu
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 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_buttonTests/shape_animated_buttonTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // shape_animated_buttonTests.swift
3 | // shape_animated_buttonTests
4 | //
5 | // Created by 蔡磊 on 16/6/12.
6 | // Copyright © 2016年 cailei. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import shape_animated_button
11 |
12 | class shape_animated_buttonTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/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 |
40 |
41 |
--------------------------------------------------------------------------------
/.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 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | ## Playgrounds
31 | timeline.xctimeline
32 | playground.xcworkspace
33 |
34 | # Swift Package Manager
35 | #
36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
37 | # Packages/
38 | .build/
39 |
40 | # CocoaPods
41 | #
42 | # We recommend against adding the Pods directory to your .gitignore. However
43 | # you should judge for yourself, the pros and cons are mentioned at:
44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
45 | #
46 | # Pods/
47 |
48 | # Carthage
49 | #
50 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
51 | # Carthage/Checkouts
52 |
53 | Carthage/Build
54 |
55 | # fastlane
56 | #
57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
58 | # screenshots whenever they are needed.
59 | # For more information about the recommended setup visit:
60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
61 |
62 | fastlane/report.xml
63 | fastlane/Preview.html
64 | fastlane/screenshots
65 | fastlane/test_output
66 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/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 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // shape_animated_button
4 | //
5 | // Created by 蔡磊 on 16/6/12.
6 | // Copyright © 2016年 cailei. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button/CLHiFiveButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CLHiFiveButton.swift
3 | // tetsadadsa
4 | //
5 | // Created by 蔡磊 on 16/6/6.
6 | // Copyright © 2016年 bjzjns. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CLHiFiveButton: UIView {
12 |
13 | //MARK:lazy load
14 | lazy var imageView = UIImageView()
15 | lazy var titleLabel = UILabel()
16 |
17 | lazy var backgroundColorLayer = CAShapeLayer()
18 |
19 | //状态标识
20 | private var isPopped = true
21 |
22 | //timer
23 | var timer:NSTimer?
24 |
25 | //点击事件回调
26 | var tapCallback:(()->Void)?
27 |
28 | //MARK:init
29 | init(TapCallback tapCallback:(()->Void)) {
30 | super.init(frame: CGRectZero)
31 |
32 | self.tapCallback = tapCallback
33 |
34 | prepareView()
35 | setupUI()
36 |
37 | }
38 |
39 | required init?(coder aDecoder: NSCoder) {
40 | fatalError("init(coder:) has not been implemented")
41 | }
42 |
43 | //MARK:UI
44 | private func prepareView() -> Void{
45 |
46 | self.backgroundColor = UIColor.clearColor()
47 | self.layer.cornerRadius = 25
48 | self.clipsToBounds = true
49 | self.bounds = CGRect(x: 0, y: 0, width: 120, height: 50)
50 |
51 | //点击事件
52 | // let tapGesture = UITapGestureRecognizer { (tapGesture) in
53 | // self.tapCallback!()
54 | // }
55 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tap))
56 | self.addGestureRecognizer(tapGesture)
57 | }
58 |
59 | private func setupUI() -> Void{
60 | layer.addSublayer(backgroundColorLayer)
61 | addSubview(imageView)
62 | addSubview(titleLabel)
63 | layer.animationKeys()
64 | let path = UIBezierPath(roundedRect: self.bounds, cornerRadius: 25)
65 | backgroundColorLayer.path = path.CGPath
66 | backgroundColorLayer.fillColor = UIColor.redColor().CGColor
67 |
68 | imageView.frame = CGRect(x:13.5 , y: 13, width: 23, height: 24)
69 | imageView.image = UIImage(named: "Publish_hiFive")!.imageWithRenderingMode(.AlwaysTemplate)
70 | imageView.tintColor = UIColor.whiteColor()
71 |
72 | titleLabel.text = "我需要"
73 | titleLabel.textColor = UIColor.whiteColor()
74 | titleLabel.font = UIFont.systemFontOfSize(15)
75 | titleLabel.frame = CGRect(x: 50, y: 0, width: 100, height: 50)
76 |
77 | //开始循环动画
78 | NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: #selector(repeatAnimation), userInfo: nil, repeats: true)
79 |
80 | }
81 |
82 | //MARK:animation
83 | //放大动画
84 | func pop() -> Void{
85 | //如果有动画进行 则直接返回
86 | if layer.animationKeys() != nil{
87 | return
88 | }
89 |
90 | //保存旧frame 计算新frame
91 | let originalFrame = self.frame
92 | let newFrame = CGRect(x: originalFrame.origin.x, y: originalFrame.origin.y-5, width: 120, height: 50)
93 |
94 | UIView.animateWithDuration(0.25, animations: {
95 | //imageView 颜色变成白色
96 | self.imageView.tintColor = UIColor.whiteColor()
97 | //view frame 放大
98 | self.frame = newFrame
99 |
100 | //调整imageView位置
101 | self.imageView.frame = CGRect(x:13.5 , y: 13, width: 23, height: 24)
102 | //调整titleLabel位置和alpha
103 | self.titleLabel.frame = CGRect(x: 50, y: 0, width: 100, height: 50)
104 | self.titleLabel.alpha = 1
105 |
106 |
107 | }) { (stop) in
108 | self.layer.cornerRadius = 25
109 | }
110 |
111 | //backgroundColorLayer 放大动画
112 | let shrinkAnimation = CABasicAnimation(keyPath: "path")
113 | shrinkAnimation.duration = 0.25
114 | shrinkAnimation.toValue = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: newFrame.width, height: newFrame.height), cornerRadius: 25).CGPath
115 | shrinkAnimation.timingFunction = CAMediaTimingFunction(
116 | name: kCAMediaTimingFunctionEaseOut)
117 | shrinkAnimation.removedOnCompletion = false
118 | shrinkAnimation.fillMode = kCAFillModeForwards
119 | backgroundColorLayer.addAnimation(shrinkAnimation, forKey: nil)
120 |
121 | //backgroundColorLayer 颜色变红
122 | let colorAnimation = CABasicAnimation(keyPath: "fillColor")
123 | colorAnimation.duration = 0.25
124 | colorAnimation.toValue = UIColor.redColor().CGColor
125 | colorAnimation.timingFunction = CAMediaTimingFunction(
126 | name: kCAMediaTimingFunctionEaseOut)
127 | colorAnimation.removedOnCompletion = false
128 | colorAnimation.fillMode = kCAFillModeForwards
129 | backgroundColorLayer.addAnimation(colorAnimation, forKey: "colorAnimation")
130 | }
131 |
132 | //缩小动画
133 | func shrink() -> Void{
134 | //如果有动画进行 则直接返回
135 | if layer.animationKeys() != nil{
136 | return
137 | }
138 |
139 | //保存旧frame 计算新frame
140 | let originalFrame = self.frame
141 | let newFrame = CGRect(x: originalFrame.origin.x, y: originalFrame.origin.y+5, width: 40, height: 40)
142 |
143 | UIView.animateWithDuration(0.25, animations: {
144 | //imageView 颜色变成黑色
145 | self.imageView.tintColor = UIColor.blackColor()
146 | //view frame 缩小
147 | self.frame = newFrame
148 | self.layer.cornerRadius = 20
149 | //调整imageView位置
150 | self.imageView.frame = CGRect(x: 11, y: 10.5, width: 18, height: 19)
151 | //调整titleLabel位置和alpha
152 | self.titleLabel.frame = CGRect(x: 0, y: 0, width: 100, height: 50)
153 | self.titleLabel.alpha = 0
154 |
155 |
156 | }) { (stop) in
157 |
158 | }
159 |
160 | //backgroundColorLayer 缩小动画
161 | let shrinkAnimation = CABasicAnimation(keyPath: "path")
162 | shrinkAnimation.duration = 0.25
163 | shrinkAnimation.toValue = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: 40, height: 40), cornerRadius: 20).CGPath
164 | shrinkAnimation.timingFunction = CAMediaTimingFunction(
165 | name: kCAMediaTimingFunctionEaseOut)
166 | shrinkAnimation.removedOnCompletion = false
167 | shrinkAnimation.fillMode = kCAFillModeForwards
168 | backgroundColorLayer.addAnimation(shrinkAnimation, forKey: nil)
169 |
170 | //backgroundColorLayer 颜色变白
171 | let colorAnimation = CABasicAnimation(keyPath: "fillColor")
172 | colorAnimation.duration = 0.25
173 | colorAnimation.toValue = UIColor.whiteColor().CGColor
174 | colorAnimation.timingFunction = CAMediaTimingFunction(
175 | name: kCAMediaTimingFunctionEaseOut)
176 | colorAnimation.removedOnCompletion = false
177 | colorAnimation.fillMode = kCAFillModeForwards
178 | backgroundColorLayer.addAnimation(colorAnimation, forKey: "colorAnimation")
179 |
180 | }
181 |
182 | //开启循环动画
183 | func startRepeatAnimation() -> Void{
184 | self.timer?.fireDate = NSDate.distantPast()
185 | }
186 |
187 | //关闭循环动画
188 | func stopRepeatAnimation() -> Void{
189 | self.timer?.fireDate = NSDate.distantFuture()
190 | }
191 |
192 | func tap() -> Void{
193 | self.tapCallback!()
194 | }
195 |
196 | func repeatAnimation() -> Void{
197 | //循环pop shrink动画
198 | if self.isPopped == true{
199 | self.shrink()
200 | }else{
201 | self.pop()
202 | }
203 |
204 | self.isPopped = !self.isPopped
205 | }
206 |
207 | }
208 |
--------------------------------------------------------------------------------
/shape_animated_button/shape_animated_button.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | F7C307401D0D39160044177C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C3073F1D0D39160044177C /* AppDelegate.swift */; };
11 | F7C307421D0D39160044177C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C307411D0D39160044177C /* ViewController.swift */; };
12 | F7C307451D0D39160044177C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7C307431D0D39160044177C /* Main.storyboard */; };
13 | F7C307471D0D39160044177C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7C307461D0D39160044177C /* Assets.xcassets */; };
14 | F7C3074A1D0D39160044177C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7C307481D0D39160044177C /* LaunchScreen.storyboard */; };
15 | F7C307551D0D39160044177C /* shape_animated_buttonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C307541D0D39160044177C /* shape_animated_buttonTests.swift */; };
16 | F7C307601D0D39210044177C /* CLHiFiveButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C3075F1D0D39210044177C /* CLHiFiveButton.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | F7C307511D0D39160044177C /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = F7C307341D0D39160044177C /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = F7C3073B1D0D39160044177C;
25 | remoteInfo = shape_animated_button;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | F7C3073C1D0D39160044177C /* shape_animated_button.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = shape_animated_button.app; sourceTree = BUILT_PRODUCTS_DIR; };
31 | F7C3073F1D0D39160044177C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
32 | F7C307411D0D39160044177C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
33 | F7C307441D0D39160044177C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
34 | F7C307461D0D39160044177C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
35 | F7C307491D0D39160044177C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
36 | F7C3074B1D0D39160044177C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
37 | F7C307501D0D39160044177C /* shape_animated_buttonTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = shape_animated_buttonTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
38 | F7C307541D0D39160044177C /* shape_animated_buttonTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = shape_animated_buttonTests.swift; sourceTree = ""; };
39 | F7C307561D0D39160044177C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
40 | F7C3075F1D0D39210044177C /* CLHiFiveButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CLHiFiveButton.swift; sourceTree = ""; };
41 | /* End PBXFileReference section */
42 |
43 | /* Begin PBXFrameworksBuildPhase section */
44 | F7C307391D0D39160044177C /* Frameworks */ = {
45 | isa = PBXFrameworksBuildPhase;
46 | buildActionMask = 2147483647;
47 | files = (
48 | );
49 | runOnlyForDeploymentPostprocessing = 0;
50 | };
51 | F7C3074D1D0D39160044177C /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | );
56 | runOnlyForDeploymentPostprocessing = 0;
57 | };
58 | /* End PBXFrameworksBuildPhase section */
59 |
60 | /* Begin PBXGroup section */
61 | F7C307331D0D39160044177C = {
62 | isa = PBXGroup;
63 | children = (
64 | F7C3073E1D0D39160044177C /* shape_animated_button */,
65 | F7C307531D0D39160044177C /* shape_animated_buttonTests */,
66 | F7C3073D1D0D39160044177C /* Products */,
67 | );
68 | sourceTree = "";
69 | };
70 | F7C3073D1D0D39160044177C /* Products */ = {
71 | isa = PBXGroup;
72 | children = (
73 | F7C3073C1D0D39160044177C /* shape_animated_button.app */,
74 | F7C307501D0D39160044177C /* shape_animated_buttonTests.xctest */,
75 | );
76 | name = Products;
77 | sourceTree = "";
78 | };
79 | F7C3073E1D0D39160044177C /* shape_animated_button */ = {
80 | isa = PBXGroup;
81 | children = (
82 | F7C3075F1D0D39210044177C /* CLHiFiveButton.swift */,
83 | F7C3073F1D0D39160044177C /* AppDelegate.swift */,
84 | F7C307411D0D39160044177C /* ViewController.swift */,
85 | F7C307431D0D39160044177C /* Main.storyboard */,
86 | F7C307461D0D39160044177C /* Assets.xcassets */,
87 | F7C307481D0D39160044177C /* LaunchScreen.storyboard */,
88 | F7C3074B1D0D39160044177C /* Info.plist */,
89 | );
90 | path = shape_animated_button;
91 | sourceTree = "";
92 | };
93 | F7C307531D0D39160044177C /* shape_animated_buttonTests */ = {
94 | isa = PBXGroup;
95 | children = (
96 | F7C307541D0D39160044177C /* shape_animated_buttonTests.swift */,
97 | F7C307561D0D39160044177C /* Info.plist */,
98 | );
99 | path = shape_animated_buttonTests;
100 | sourceTree = "";
101 | };
102 | /* End PBXGroup section */
103 |
104 | /* Begin PBXNativeTarget section */
105 | F7C3073B1D0D39160044177C /* shape_animated_button */ = {
106 | isa = PBXNativeTarget;
107 | buildConfigurationList = F7C307591D0D39160044177C /* Build configuration list for PBXNativeTarget "shape_animated_button" */;
108 | buildPhases = (
109 | F7C307381D0D39160044177C /* Sources */,
110 | F7C307391D0D39160044177C /* Frameworks */,
111 | F7C3073A1D0D39160044177C /* Resources */,
112 | );
113 | buildRules = (
114 | );
115 | dependencies = (
116 | );
117 | name = shape_animated_button;
118 | productName = shape_animated_button;
119 | productReference = F7C3073C1D0D39160044177C /* shape_animated_button.app */;
120 | productType = "com.apple.product-type.application";
121 | };
122 | F7C3074F1D0D39160044177C /* shape_animated_buttonTests */ = {
123 | isa = PBXNativeTarget;
124 | buildConfigurationList = F7C3075C1D0D39160044177C /* Build configuration list for PBXNativeTarget "shape_animated_buttonTests" */;
125 | buildPhases = (
126 | F7C3074C1D0D39160044177C /* Sources */,
127 | F7C3074D1D0D39160044177C /* Frameworks */,
128 | F7C3074E1D0D39160044177C /* Resources */,
129 | );
130 | buildRules = (
131 | );
132 | dependencies = (
133 | F7C307521D0D39160044177C /* PBXTargetDependency */,
134 | );
135 | name = shape_animated_buttonTests;
136 | productName = shape_animated_buttonTests;
137 | productReference = F7C307501D0D39160044177C /* shape_animated_buttonTests.xctest */;
138 | productType = "com.apple.product-type.bundle.unit-test";
139 | };
140 | /* End PBXNativeTarget section */
141 |
142 | /* Begin PBXProject section */
143 | F7C307341D0D39160044177C /* Project object */ = {
144 | isa = PBXProject;
145 | attributes = {
146 | LastSwiftUpdateCheck = 0730;
147 | LastUpgradeCheck = 0730;
148 | ORGANIZATIONNAME = cailei;
149 | TargetAttributes = {
150 | F7C3073B1D0D39160044177C = {
151 | CreatedOnToolsVersion = 7.3;
152 | };
153 | F7C3074F1D0D39160044177C = {
154 | CreatedOnToolsVersion = 7.3;
155 | TestTargetID = F7C3073B1D0D39160044177C;
156 | };
157 | };
158 | };
159 | buildConfigurationList = F7C307371D0D39160044177C /* Build configuration list for PBXProject "shape_animated_button" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = English;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = F7C307331D0D39160044177C;
168 | productRefGroup = F7C3073D1D0D39160044177C /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | F7C3073B1D0D39160044177C /* shape_animated_button */,
173 | F7C3074F1D0D39160044177C /* shape_animated_buttonTests */,
174 | );
175 | };
176 | /* End PBXProject section */
177 |
178 | /* Begin PBXResourcesBuildPhase section */
179 | F7C3073A1D0D39160044177C /* Resources */ = {
180 | isa = PBXResourcesBuildPhase;
181 | buildActionMask = 2147483647;
182 | files = (
183 | F7C3074A1D0D39160044177C /* LaunchScreen.storyboard in Resources */,
184 | F7C307471D0D39160044177C /* Assets.xcassets in Resources */,
185 | F7C307451D0D39160044177C /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | F7C3074E1D0D39160044177C /* Resources */ = {
190 | isa = PBXResourcesBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | );
194 | runOnlyForDeploymentPostprocessing = 0;
195 | };
196 | /* End PBXResourcesBuildPhase section */
197 |
198 | /* Begin PBXSourcesBuildPhase section */
199 | F7C307381D0D39160044177C /* Sources */ = {
200 | isa = PBXSourcesBuildPhase;
201 | buildActionMask = 2147483647;
202 | files = (
203 | F7C307601D0D39210044177C /* CLHiFiveButton.swift in Sources */,
204 | F7C307421D0D39160044177C /* ViewController.swift in Sources */,
205 | F7C307401D0D39160044177C /* AppDelegate.swift in Sources */,
206 | );
207 | runOnlyForDeploymentPostprocessing = 0;
208 | };
209 | F7C3074C1D0D39160044177C /* Sources */ = {
210 | isa = PBXSourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | F7C307551D0D39160044177C /* shape_animated_buttonTests.swift in Sources */,
214 | );
215 | runOnlyForDeploymentPostprocessing = 0;
216 | };
217 | /* End PBXSourcesBuildPhase section */
218 |
219 | /* Begin PBXTargetDependency section */
220 | F7C307521D0D39160044177C /* PBXTargetDependency */ = {
221 | isa = PBXTargetDependency;
222 | target = F7C3073B1D0D39160044177C /* shape_animated_button */;
223 | targetProxy = F7C307511D0D39160044177C /* PBXContainerItemProxy */;
224 | };
225 | /* End PBXTargetDependency section */
226 |
227 | /* Begin PBXVariantGroup section */
228 | F7C307431D0D39160044177C /* Main.storyboard */ = {
229 | isa = PBXVariantGroup;
230 | children = (
231 | F7C307441D0D39160044177C /* Base */,
232 | );
233 | name = Main.storyboard;
234 | sourceTree = "";
235 | };
236 | F7C307481D0D39160044177C /* LaunchScreen.storyboard */ = {
237 | isa = PBXVariantGroup;
238 | children = (
239 | F7C307491D0D39160044177C /* Base */,
240 | );
241 | name = LaunchScreen.storyboard;
242 | sourceTree = "";
243 | };
244 | /* End PBXVariantGroup section */
245 |
246 | /* Begin XCBuildConfiguration section */
247 | F7C307571D0D39160044177C /* Debug */ = {
248 | isa = XCBuildConfiguration;
249 | buildSettings = {
250 | ALWAYS_SEARCH_USER_PATHS = NO;
251 | CLANG_ANALYZER_NONNULL = YES;
252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
253 | CLANG_CXX_LIBRARY = "libc++";
254 | CLANG_ENABLE_MODULES = YES;
255 | CLANG_ENABLE_OBJC_ARC = YES;
256 | CLANG_WARN_BOOL_CONVERSION = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
259 | CLANG_WARN_EMPTY_BODY = YES;
260 | CLANG_WARN_ENUM_CONVERSION = YES;
261 | CLANG_WARN_INT_CONVERSION = YES;
262 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
263 | CLANG_WARN_UNREACHABLE_CODE = YES;
264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
266 | COPY_PHASE_STRIP = NO;
267 | DEBUG_INFORMATION_FORMAT = dwarf;
268 | ENABLE_STRICT_OBJC_MSGSEND = YES;
269 | ENABLE_TESTABILITY = YES;
270 | GCC_C_LANGUAGE_STANDARD = gnu99;
271 | GCC_DYNAMIC_NO_PIC = NO;
272 | GCC_NO_COMMON_BLOCKS = YES;
273 | GCC_OPTIMIZATION_LEVEL = 0;
274 | GCC_PREPROCESSOR_DEFINITIONS = (
275 | "DEBUG=1",
276 | "$(inherited)",
277 | );
278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280 | GCC_WARN_UNDECLARED_SELECTOR = YES;
281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
282 | GCC_WARN_UNUSED_FUNCTION = YES;
283 | GCC_WARN_UNUSED_VARIABLE = YES;
284 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
285 | MTL_ENABLE_DEBUG_INFO = YES;
286 | ONLY_ACTIVE_ARCH = YES;
287 | SDKROOT = iphoneos;
288 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
289 | };
290 | name = Debug;
291 | };
292 | F7C307581D0D39160044177C /* Release */ = {
293 | isa = XCBuildConfiguration;
294 | buildSettings = {
295 | ALWAYS_SEARCH_USER_PATHS = NO;
296 | CLANG_ANALYZER_NONNULL = YES;
297 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
298 | CLANG_CXX_LIBRARY = "libc++";
299 | CLANG_ENABLE_MODULES = YES;
300 | CLANG_ENABLE_OBJC_ARC = YES;
301 | CLANG_WARN_BOOL_CONVERSION = YES;
302 | CLANG_WARN_CONSTANT_CONVERSION = YES;
303 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
304 | CLANG_WARN_EMPTY_BODY = YES;
305 | CLANG_WARN_ENUM_CONVERSION = YES;
306 | CLANG_WARN_INT_CONVERSION = YES;
307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
308 | CLANG_WARN_UNREACHABLE_CODE = YES;
309 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
310 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
311 | COPY_PHASE_STRIP = NO;
312 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
313 | ENABLE_NS_ASSERTIONS = NO;
314 | ENABLE_STRICT_OBJC_MSGSEND = YES;
315 | GCC_C_LANGUAGE_STANDARD = gnu99;
316 | GCC_NO_COMMON_BLOCKS = YES;
317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
319 | GCC_WARN_UNDECLARED_SELECTOR = YES;
320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
321 | GCC_WARN_UNUSED_FUNCTION = YES;
322 | GCC_WARN_UNUSED_VARIABLE = YES;
323 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
324 | MTL_ENABLE_DEBUG_INFO = NO;
325 | SDKROOT = iphoneos;
326 | VALIDATE_PRODUCT = YES;
327 | };
328 | name = Release;
329 | };
330 | F7C3075A1D0D39160044177C /* Debug */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
334 | INFOPLIST_FILE = shape_animated_button/Info.plist;
335 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
336 | PRODUCT_BUNDLE_IDENTIFIER = "cailei.shape-animated-button";
337 | PRODUCT_NAME = "$(TARGET_NAME)";
338 | };
339 | name = Debug;
340 | };
341 | F7C3075B1D0D39160044177C /* Release */ = {
342 | isa = XCBuildConfiguration;
343 | buildSettings = {
344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
345 | INFOPLIST_FILE = shape_animated_button/Info.plist;
346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
347 | PRODUCT_BUNDLE_IDENTIFIER = "cailei.shape-animated-button";
348 | PRODUCT_NAME = "$(TARGET_NAME)";
349 | };
350 | name = Release;
351 | };
352 | F7C3075D1D0D39160044177C /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | BUNDLE_LOADER = "$(TEST_HOST)";
356 | INFOPLIST_FILE = shape_animated_buttonTests/Info.plist;
357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
358 | PRODUCT_BUNDLE_IDENTIFIER = "cailei.shape-animated-buttonTests";
359 | PRODUCT_NAME = "$(TARGET_NAME)";
360 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/shape_animated_button.app/shape_animated_button";
361 | };
362 | name = Debug;
363 | };
364 | F7C3075E1D0D39160044177C /* Release */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | BUNDLE_LOADER = "$(TEST_HOST)";
368 | INFOPLIST_FILE = shape_animated_buttonTests/Info.plist;
369 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
370 | PRODUCT_BUNDLE_IDENTIFIER = "cailei.shape-animated-buttonTests";
371 | PRODUCT_NAME = "$(TARGET_NAME)";
372 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/shape_animated_button.app/shape_animated_button";
373 | };
374 | name = Release;
375 | };
376 | /* End XCBuildConfiguration section */
377 |
378 | /* Begin XCConfigurationList section */
379 | F7C307371D0D39160044177C /* Build configuration list for PBXProject "shape_animated_button" */ = {
380 | isa = XCConfigurationList;
381 | buildConfigurations = (
382 | F7C307571D0D39160044177C /* Debug */,
383 | F7C307581D0D39160044177C /* Release */,
384 | );
385 | defaultConfigurationIsVisible = 0;
386 | defaultConfigurationName = Release;
387 | };
388 | F7C307591D0D39160044177C /* Build configuration list for PBXNativeTarget "shape_animated_button" */ = {
389 | isa = XCConfigurationList;
390 | buildConfigurations = (
391 | F7C3075A1D0D39160044177C /* Debug */,
392 | F7C3075B1D0D39160044177C /* Release */,
393 | );
394 | defaultConfigurationIsVisible = 0;
395 | };
396 | F7C3075C1D0D39160044177C /* Build configuration list for PBXNativeTarget "shape_animated_buttonTests" */ = {
397 | isa = XCConfigurationList;
398 | buildConfigurations = (
399 | F7C3075D1D0D39160044177C /* Debug */,
400 | F7C3075E1D0D39160044177C /* Release */,
401 | );
402 | defaultConfigurationIsVisible = 0;
403 | };
404 | /* End XCConfigurationList section */
405 | };
406 | rootObject = F7C307341D0D39160044177C /* Project object */;
407 | }
408 |
--------------------------------------------------------------------------------