├── fastlane
├── Fastfile
└── README.md
├── ZYProgressViewDemo.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── ZYProgressViewDemo
├── Example
│ ├── Line
│ │ ├── LineViewController.h
│ │ └── LineViewController.m
│ └── Circle
│ │ ├── CircleViewController.h
│ │ └── CircleViewController.m
├── ExampleListViewController.h
├── AppDelegate.h
├── main.m
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── AppDelegate.m
└── ExampleListViewController.m
├── ZYProgressView
├── ZYLineProgressView
│ ├── ZYLineProgressView.h
│ ├── ZYLineProgressViewConfig.m
│ ├── ZYLineProgressViewConfig.h
│ └── ZYLineProgressView.m
└── ZYCircleProgressView
│ ├── ZYCircleProgressView.h
│ ├── ZYCircleProgressViewConfig.m
│ ├── ZYCircleProgressViewConfig.h
│ └── ZYCircleProgressView.m
├── ZYProgressView.podspec
├── LICENSE
├── .gitignore
└── README.md
/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 | import_from_git(url: 'https://github.com/ripperhe/fastlane-files', branch: 'master')
2 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/Example/Line/LineViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // LineViewController.h
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface LineViewController : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/Example/Circle/CircleViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CircleViewController.h
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface CircleViewController : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/ExampleListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ExampleListViewController.h
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface ExampleListViewController : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ZYProgressViewDemo
4 | //
5 | // Created by ripper on 2017/3/27.
6 | // Copyright © 2017年 ripper. 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 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ZYProgressViewDemo
4 | //
5 | // Created by ripper on 2017/3/27.
6 | // Copyright © 2017年 ripper. 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 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYLineProgressView/ZYLineProgressView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZYLineProgressView.h
3 | // ZYLineProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/1.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 | #import "ZYLineProgressViewConfig.h"
12 |
13 | @interface ZYLineProgressView : UIView
14 |
15 | /** 配置 */
16 | @property (nonatomic, strong, readonly) ZYLineProgressViewConfig *config;
17 | /** 进度 */
18 | @property (nonatomic, assign) CGFloat progress;
19 |
20 | /**
21 | 统一更新配置,在block中修改config的值
22 |
23 | @param configBlock 修改配置的block
24 | */
25 | - (void)updateConfig:(void(^)(ZYLineProgressViewConfig *config))configBlock;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYCircleProgressView/ZYCircleProgressView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZYCircleProgressView.h
3 | // ZYCircleProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/1/6.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 | #import "ZYCircleProgressViewConfig.h"
12 |
13 | @interface ZYCircleProgressView : UIControl
14 |
15 | /** 配置 */
16 | @property (nonatomic, strong, readonly) ZYCircleProgressViewConfig *config;
17 | /** 进度 */
18 | @property (nonatomic, assign) CGFloat progress;
19 |
20 |
21 | /**
22 | 统一更新配置,在block中修改config的值
23 |
24 | @param configBlock 修改配置的block
25 | */
26 | - (void)updateConfig:(void(^)(ZYCircleProgressViewConfig *config))configBlock;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/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 | }
--------------------------------------------------------------------------------
/fastlane/README.md:
--------------------------------------------------------------------------------
1 | fastlane documentation
2 | ================
3 | # Installation
4 |
5 | Make sure you have the latest version of the Xcode command line tools installed:
6 |
7 | ```
8 | xcode-select --install
9 | ```
10 |
11 | Install _fastlane_ using
12 | ```
13 | [sudo] gem install fastlane -NV
14 | ```
15 | or alternatively using `brew cask install fastlane`
16 |
17 | # Available Actions
18 | ### release_pod
19 | ```
20 | fastlane release_pod
21 | ```
22 | Release new pod version
23 |
24 | ----
25 |
26 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
27 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
28 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
29 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYLineProgressView/ZYLineProgressViewConfig.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZYLineProgressViewConfig.m
3 | // ZYLineProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/1.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "ZYLineProgressViewConfig.h"
11 |
12 | @implementation ZYLineProgressViewConfig
13 |
14 | - (instancetype)init
15 | {
16 | self = [super init];
17 | if (self) {
18 | self.capType = ZYLineProgressViewCapTypeRound;
19 | self.backLineColor = [UIColor colorWithRed:0.93 green:0.93 blue:0.93 alpha:1.00];
20 | self.progressLineColor = [UIColor colorWithRed:0.14 green:0.78 blue:0.54 alpha:1.00];
21 |
22 | self.isShowDot = NO;
23 | self.dotSpace = 1;
24 | self.dotColor = [UIColor whiteColor];
25 | }
26 | return self;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYCircleProgressView/ZYCircleProgressViewConfig.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZYCircleProgressViewConfig.m
3 | // ZYCircleProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/1/6.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "ZYCircleProgressViewConfig.h"
11 |
12 | @implementation ZYCircleProgressViewConfig
13 |
14 |
15 | - (instancetype)init
16 | {
17 | self = [super init];
18 | if (self) {
19 | self.lineWidth = 2;
20 | self.lineCap = kCALineCapRound;
21 | self.backLineColor = [UIColor colorWithRed:0.93 green:0.93 blue:0.93 alpha:1.00];
22 | self.progressLineColor = [UIColor colorWithRed:0.14 green:0.78 blue:0.54 alpha:1.00];
23 | self.startAngle = - M_PI_2;
24 | self.endAngle = M_PI + M_PI_2;
25 | self.clockwise = YES;
26 | }
27 | return self;
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYCircleProgressView/ZYCircleProgressViewConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZYCircleProgressViewConfig.h
3 | // ZYCircleProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/1/6.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @interface ZYCircleProgressViewConfig : NSObject
13 |
14 | /** 宽度 */
15 | @property (nonatomic, assign) CGFloat lineWidth;
16 | /** 端点类型 kCALineCapButt | kCALineCapRound | kCALineCapSquare */
17 | @property (nonatomic, assign) NSString *lineCap;
18 | /** 背景条颜色 */
19 | @property (nonatomic, strong) UIColor *backLineColor;
20 | /** 进度条颜色 */
21 | @property (nonatomic, strong) UIColor *progressLineColor;
22 | /** 开始角度 弧度制 */
23 | @property (nonatomic, assign) CGFloat startAngle;
24 | /** 结束角度 弧度制 */
25 | @property (nonatomic, assign) CGFloat endAngle;
26 | /** 是否顺时针 */
27 | @property (nonatomic, assign) BOOL clockwise;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYLineProgressView/ZYLineProgressViewConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZYLineProgressViewConfig.h
3 | // ZYLineProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/1.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | typedef NS_ENUM(NSUInteger, ZYLineProgressViewCapType) {
13 | ZYLineProgressViewCapTypeRound,
14 | ZYLineProgressViewCapTypeSquare,
15 | };
16 |
17 | @interface ZYLineProgressViewConfig : NSObject
18 |
19 | /** 端点类型 */
20 | @property (nonatomic, assign) ZYLineProgressViewCapType capType;
21 | /** 背景条颜色 */
22 | @property (nonatomic, strong) UIColor *backLineColor;
23 | /** 进度条颜色 */
24 | @property (nonatomic, strong) UIColor *progressLineColor;
25 |
26 | /** 是否显示进度点 */
27 | @property (nonatomic, assign) BOOL isShowDot;
28 | /** 进度点和进度条的半径差值 */
29 | @property (nonatomic, assign) CGFloat dotSpace;
30 | /** 进度点颜色 */
31 | @property (nonatomic, strong) UIColor *dotColor;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ZYProgressView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'ZYProgressView'
3 | s.version = '0.1.1'
4 | s.summary = 'A simple progress view.'
5 | s.homepage = 'https://github.com/ripperhe/ZYProgressView'
6 | s.license = { :type => 'MIT', :file => 'LICENSE' }
7 | s.author = { 'ripper' => 'ripperhe@qq.com' }
8 | s.source = { :git => 'https://github.com/ripperhe/ZYProgressView.git', :tag => s.version.to_s }
9 |
10 | s.ios.deployment_target = '8.0'
11 |
12 | s.source_files = 'ZYProgressView/**/*'
13 |
14 | # s.resource_bundles = {
15 | # 'ZYProgressView' => ['ZYProgressView/Assets/*.png']
16 | # }
17 |
18 | #s.subspec 'ZYProgressView' do | sm |
19 | #sm.source_files = 'ZYProgressView/ZYSubModule/**/*'
20 | #sm.dependency 'AFNetworking', '~> 2.3'
21 | #end
22 |
23 | # s.public_header_files = 'Pod/Classes/**/*.h'
24 | # s.frameworks = 'UIKit', 'MapKit'
25 | # s.dependency 'AFNetworking', '~> 2.3'
26 | end
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 ripper
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 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/Example/Line/LineViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // LineViewController.m
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "LineViewController.h"
11 | #import "ZYLineProgressView.h"
12 |
13 | @interface LineViewController ()
14 |
15 | @property (nonatomic, weak) ZYLineProgressView *progressView;
16 |
17 | @end
18 |
19 | @implementation LineViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 |
24 | self.view.backgroundColor = [UIColor whiteColor];
25 |
26 | ZYLineProgressView *progressView = [[ZYLineProgressView alloc] initWithFrame:CGRectMake(20, 150, self.view.frame.size.width - 40, 6)];
27 | [progressView updateConfig:^(ZYLineProgressViewConfig *config) {
28 | config.isShowDot = YES;
29 | }];
30 | [self.view addSubview:progressView];
31 | self.progressView = progressView;
32 |
33 | progressView.progress = 0.01;
34 |
35 | }
36 |
37 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
38 | {
39 | self.progressView.progress = 0.8;
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/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 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/.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 | # 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/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ZYProgressView
2 |
3 | [](http://cocoapods.org/pods/ZYProgressView)
4 | [](http://cocoapods.org/pods/ZYProgressView)
5 | [](http://cocoapods.org/pods/ZYProgressView)
6 |
7 | ## Snapshot
8 |
9 |  
10 |
11 | ## Example
12 |
13 | To run the example project, clone the repo, and run directory.
14 |
15 | ## Requirements
16 |
17 | `iOS 8.0` or later
18 |
19 | ## Installation
20 |
21 | ZYProgressView is available through [CocoaPods](http://cocoapods.org). To install
22 | it, simply add the following line to your Podfile:
23 |
24 | ```ruby
25 | pod "ZYProgressView"
26 | ```
27 |
28 | ## Useage
29 |
30 | ### Line
31 |
32 | #### 初始化
33 |
34 | ```objc
35 | ZYLineProgressView *progressView = [[ZYLineProgressView alloc] initWithFrame:CGRectMake(20, 150, 200, 6)];
36 |
37 | ```
38 |
39 | #### 更新进度
40 |
41 | ```objc
42 | progressView.progress = 0.8;
43 | ```
44 |
45 | #### 更新配置
46 |
47 | ```objc
48 | [progressView updateConfig:^(ZYLineProgressViewConfig *config) {
49 | config.isShowDot = YES;
50 | }];
51 | ```
52 |
53 | ### Circle
54 |
55 | #### 初始化
56 |
57 | ```objc
58 | ZYCircleProgressView *progressView = [[ZYCircleProgressView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
59 | ```
60 |
61 | #### 更新进度
62 |
63 | ```objc
64 | progressView.progress = 0.3;
65 | ```
66 |
67 | #### 更新配置
68 |
69 | ```objc
70 | [progressView updateConfig:^(ZYCircleProgressViewConfig *config) {
71 | config.lineWidth = 3;
72 | config.lineCap = kCALineCapSquare;
73 | config.startAngle = - (M_PI + M_PI_4);
74 | config.endAngle = M_PI_4;
75 | }];
76 | ```
77 |
78 | ## Author
79 |
80 | ripper, ripperhe@qq.com
81 |
82 | ## License
83 |
84 | ZYProgressView is available under the MIT license. See the LICENSE file for more info.
85 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ZYProgressViewDemo
4 | //
5 | // Created by ripper on 2017/3/27.
6 | // Copyright © 2017年 ripper. 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 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // 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.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // 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.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // 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.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/Example/Circle/CircleViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CircleViewController.m
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "CircleViewController.h"
11 | #import "ZYCircleProgressView.h"
12 |
13 | @interface CircleViewController ()
14 |
15 | @property (nonatomic, weak) ZYCircleProgressView *progressView;
16 | @property (nonatomic, weak) ZYCircleProgressView *progressView2;
17 |
18 | @end
19 |
20 | @implementation CircleViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 |
25 | self.view.backgroundColor = [UIColor whiteColor];
26 |
27 | // 示例 1
28 | ZYCircleProgressView *progressView = [[ZYCircleProgressView alloc] initWithFrame:CGRectMake(100, 150, 100, 100)];
29 | progressView.progress = 0.3;
30 | [self.view addSubview:progressView];
31 | self.progressView = progressView;
32 |
33 | [self.progressView addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
34 | [self.progressView addTarget:self action:@selector(valueChange:) forControlEvents:UIControlEventValueChanged];
35 |
36 |
37 |
38 | // 示例 2
39 | ZYCircleProgressView *progressView2 = [[ZYCircleProgressView alloc] initWithFrame:CGRectMake(100, 300, 100, 100)];
40 | [self.view addSubview:progressView2];
41 |
42 | progressView2.progress = 0.3;
43 | [progressView2 updateConfig:^(ZYCircleProgressViewConfig *config) {
44 | config.backLineColor = [UIColor lightGrayColor];
45 | config.progressLineColor = [UIColor orangeColor];
46 | config.lineWidth = 6;
47 | config.startAngle = M_PI_2 + M_PI_4;
48 | config.endAngle = M_PI * 2 + M_PI_2 - M_PI_4;
49 | config.clockwise = YES;
50 | }];
51 |
52 | self.progressView2 = progressView2;
53 | }
54 |
55 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
56 | {
57 | // self.progressView.progress = 0.8;
58 |
59 | self.progressView2.progress = 0.8;
60 | }
61 |
62 | - (void)click:(ZYCircleProgressView *)sender
63 | {
64 | NSLog(@"click");
65 |
66 | [self.progressView updateConfig:^(ZYCircleProgressViewConfig *config) {
67 | // config.lineWidth = 3;
68 | config.lineCap = kCALineCapSquare;
69 | }];
70 |
71 | self.progressView.progress = 0.8;
72 | }
73 |
74 | - (void)valueChange:(ZYCircleProgressView *)sender
75 | {
76 | NSLog(@"valueChange");
77 | }
78 |
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/ExampleListViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ExampleListViewController.m
3 | // ZYProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/27.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "ExampleListViewController.h"
11 | #import "LineViewController.h"
12 | #import "CircleViewController.h"
13 |
14 | /**
15 | TODO:
16 |
17 |
20 | */
21 | @interface ExampleListViewController ()
22 |
23 | @property (weak, nonatomic) IBOutlet UITableView *tableView;
24 | @property (nonatomic, strong) NSArray *tableData;
25 |
26 | @end
27 |
28 | @implementation ExampleListViewController
29 |
30 | - (void)viewDidLoad {
31 | [super viewDidLoad];
32 | // Do any additional setup after loading the view, typically from a nib.
33 |
34 | __weak typeof(self) weakSelf = self;
35 | self.tableData = @[
36 | @{
37 | @"title":@"Line",
38 | @"action":^{
39 | LineViewController *lineVC = [LineViewController new];
40 | [weakSelf.navigationController pushViewController:lineVC animated:YES];
41 | }
42 | },
43 | @{
44 | @"title":@"Circle",
45 | @"action":^{
46 | CircleViewController *circleVC = [CircleViewController new];
47 | [weakSelf.navigationController pushViewController:circleVC animated:YES];
48 | }
49 | },
50 | ];
51 |
52 |
53 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"testCell"];
54 | }
55 |
56 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
57 | {
58 | return [self.tableData count];
59 | }
60 |
61 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
62 | UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"testCell"];
63 | NSDictionary* info = self.tableData[indexPath.row];
64 | cell.textLabel.text = info[@"title"];
65 | cell.textLabel.textColor = [UIColor colorWithRed:0.14 green:0.78 blue:0.55 alpha:1.00];
66 |
67 | return cell;
68 | }
69 |
70 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
71 | {
72 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
73 | NSDictionary* info = self.tableData[indexPath.row];
74 | ((void(^)())info[@"action"])();
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYCircleProgressView/ZYCircleProgressView.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZYCircleProgressView.m
3 | // ZYCircleProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/1/6.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "ZYCircleProgressView.h"
11 |
12 | @interface ZYCircleProgressView ()
13 |
14 | @property (nonatomic, weak) CAShapeLayer *backLayer;
15 |
16 | @property (nonatomic, weak) CAShapeLayer *progressLayer;
17 |
18 | @property (nonatomic, strong) ZYCircleProgressViewConfig *config;
19 |
20 | @end
21 |
22 |
23 | @implementation ZYCircleProgressView
24 |
25 | - (void)layoutSubviews
26 | {
27 | [super layoutSubviews];
28 |
29 | [self updatePath];
30 | self.progressLayer.strokeEnd = self.progress;
31 | }
32 |
33 | #pragma mark - API
34 | - (void)updateConfig:(void (^)(ZYCircleProgressViewConfig *config))configBlock
35 | {
36 | if (!configBlock) return;
37 |
38 | configBlock(self.config);
39 |
40 | [self updateLayerProperty:self.backLayer withColor:self.config.backLineColor];
41 | [self updateLayerProperty:self.progressLayer withColor:self.config.progressLineColor];
42 | [self updatePath];
43 | }
44 |
45 | #pragma mark - private methods
46 | - (void)updatePath
47 | {
48 | CGFloat width = self.frame.size.width;
49 | CGFloat height = self.frame.size.height;
50 |
51 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(width * 0.5, height * 0.5) radius:width * 0.5 startAngle:self.config.startAngle endAngle:self.config.endAngle clockwise:self.config.clockwise];
52 | self.backLayer.path = path.CGPath;
53 | self.progressLayer.path = path.CGPath;
54 | }
55 |
56 | - (void)updateLayerProperty:(CAShapeLayer *)layer withColor:(UIColor *)color
57 | {
58 | layer.lineWidth = self.config.lineWidth;
59 | layer.lineCap = self.config.lineCap;
60 | layer.strokeColor = color.CGColor;
61 | }
62 |
63 | #pragma mark - setter
64 | - (void)setProgress:(CGFloat)progress
65 | {
66 | CGFloat lastProgress = _progress;
67 |
68 | if (progress <= 0) {
69 | _progress = 0;
70 | }else if (progress >= 1) {
71 | _progress = 1;
72 | }else{
73 | _progress = progress;
74 | }
75 |
76 | self.progressLayer.strokeEnd = _progress;
77 |
78 | if (lastProgress != _progress) {
79 | [self sendActionsForControlEvents:UIControlEventValueChanged];
80 | }
81 | }
82 |
83 | #pragma mark - getter
84 | - (CAShapeLayer *)backLayer
85 | {
86 | if (!_backLayer) {
87 | CAShapeLayer *backLayer = [CAShapeLayer layer];
88 | backLayer.fillColor = [UIColor clearColor].CGColor;
89 | [self updateLayerProperty:backLayer withColor:self.config.backLineColor];
90 | [self.layer insertSublayer:backLayer atIndex:0];
91 | _backLayer = backLayer;
92 | }
93 | return _backLayer;
94 | }
95 |
96 | - (CAShapeLayer *)progressLayer
97 | {
98 | if (!_progressLayer) {
99 | CAShapeLayer *progressLayer = [CAShapeLayer layer];
100 | progressLayer.fillColor = [UIColor clearColor].CGColor;
101 | [self updateLayerProperty:progressLayer withColor:self.config.progressLineColor];
102 | [self.layer addSublayer:progressLayer];
103 | _progressLayer = progressLayer;
104 | }
105 | return _progressLayer;
106 | }
107 |
108 | - (ZYCircleProgressViewConfig *)config
109 | {
110 | if (!_config) {
111 | _config = [ZYCircleProgressViewConfig new];
112 | }
113 | return _config;
114 | }
115 |
116 | @end
117 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo/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 |
--------------------------------------------------------------------------------
/ZYProgressView/ZYLineProgressView/ZYLineProgressView.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZYLineProgressView.m
3 | // ZYLineProgressViewDemo
4 | //
5 | // GitHub https://github.com/ripperhe
6 | // Created by ripper on 2017/3/1.
7 | // Copyright © 2017年 ripper. All rights reserved.
8 | //
9 |
10 | #import "ZYLineProgressView.h"
11 |
12 | @interface ZYLineProgressView ()
13 |
14 | @property (nonatomic, strong) ZYLineProgressViewConfig *config;
15 |
16 | @property (nonatomic, weak) CAShapeLayer *backLayer;
17 | @property (nonatomic, weak) CAShapeLayer *progressLayer;
18 | @property (nonatomic, weak) CAShapeLayer *dotLayer;
19 |
20 | @end
21 |
22 | @implementation ZYLineProgressView
23 |
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | {
26 | self = [super initWithFrame:frame];
27 | if (self) {
28 | }
29 | return self;
30 | }
31 |
32 | - (void)layoutSubviews
33 | {
34 | [super layoutSubviews];
35 |
36 | [self updateFrame];
37 | }
38 |
39 | #pragma mark - API
40 | - (void)updateConfig:(void (^)(ZYLineProgressViewConfig *config))configBlock
41 | {
42 | if (!configBlock) return;
43 |
44 | configBlock(self.config);
45 |
46 | self.backLayer.backgroundColor = self.config.backLineColor.CGColor;
47 | self.progressLayer.backgroundColor = self.config.progressLineColor.CGColor;
48 | _dotLayer.backgroundColor = self.config.dotColor.CGColor;
49 | [self updateFrame];
50 | }
51 |
52 | #pragma mark - private methods
53 | - (void)updateFrame
54 | {
55 | // corner radius
56 | if (self.config.capType == ZYLineProgressViewCapTypeRound) {
57 | self.backLayer.cornerRadius = self.frame.size.height * 0.5;
58 | self.progressLayer.cornerRadius = self.backLayer.cornerRadius;
59 | }else{
60 | self.backLayer.cornerRadius = 0;
61 | self.progressLayer.cornerRadius = 0;
62 | }
63 |
64 | // back progress
65 | self.backLayer.frame = self.bounds;
66 | self.progressLayer.frame = CGRectMake(0, 0, self.frame.size.width * _progress, self.frame.size.height);
67 |
68 | // dot
69 | if (self.config.isShowDot) {
70 |
71 | if (self.progressLayer.frame.size.width > self.progressLayer.frame.size.height) {
72 | self.dotLayer.hidden = NO;
73 | }else{
74 | self.dotLayer.hidden = YES;
75 | }
76 |
77 | CGFloat dotW = self.progressLayer.frame.size.height - 2 * self.config.dotSpace;
78 | if (dotW > 0) {
79 | CGFloat dotH = dotW;
80 | CGFloat dotX = self.progressLayer.frame.size.width - self.progressLayer.frame.size.height + self.config.dotSpace;
81 | CGFloat dotY = self.config.dotSpace;
82 | self.dotLayer.cornerRadius = dotW * 0.5;
83 | self.dotLayer.frame = CGRectMake(dotX, dotY, dotW, dotH);
84 | }else{
85 | [_dotLayer removeFromSuperlayer];
86 | _dotLayer = nil;
87 | }
88 | }
89 | }
90 |
91 | #pragma mark - setter
92 | - (void)setProgress:(CGFloat)progress
93 | {
94 | if (progress <= 0) {
95 | _progress = 0;
96 | }else if (progress >= 1) {
97 | _progress = 1;
98 | }else{
99 | _progress = progress;
100 | }
101 | self.progressLayer.frame = CGRectMake(0, 0, self.frame.size.width * _progress, self.frame.size.height);
102 | if (_dotLayer) {
103 | if (self.progressLayer.frame.size.width > self.progressLayer.frame.size.height) {
104 | self.dotLayer.hidden = NO;
105 | CGFloat dotX = self.progressLayer.frame.size.width - self.progressLayer.frame.size.height + self.config.dotSpace;
106 | self.dotLayer.frame = CGRectMake(dotX,
107 | self.dotLayer.frame.origin.y,
108 | self.dotLayer.frame.size.width,
109 | self.dotLayer.frame.size.width);
110 | }else{
111 | self.dotLayer.hidden = YES;
112 | }
113 | }
114 | }
115 |
116 | #pragma mark - getter
117 | - (ZYLineProgressViewConfig *)config
118 | {
119 | if (!_config) {
120 | _config = [ZYLineProgressViewConfig new];
121 | }
122 | return _config;
123 | }
124 |
125 | - (CAShapeLayer *)backLayer
126 | {
127 | if (!_backLayer) {
128 | CAShapeLayer *backLayer = [CAShapeLayer layer];
129 | backLayer.fillColor = [UIColor clearColor].CGColor;
130 | backLayer.backgroundColor = self.config.backLineColor.CGColor;
131 | [self.layer insertSublayer:backLayer atIndex:0];
132 | _backLayer = backLayer;
133 | }
134 | return _backLayer;
135 | }
136 |
137 | - (CAShapeLayer *)progressLayer
138 | {
139 | if (!_progressLayer) {
140 | CAShapeLayer *progressLayer = [CAShapeLayer layer];
141 | progressLayer.fillColor = [UIColor clearColor].CGColor;
142 | progressLayer.backgroundColor = self.config.progressLineColor.CGColor;
143 | [self.layer addSublayer:progressLayer];
144 | _progressLayer = progressLayer;
145 | }
146 | return _progressLayer;
147 | }
148 |
149 | - (CAShapeLayer *)dotLayer
150 | {
151 | if (!_dotLayer) {
152 | CAShapeLayer *dotLayer = [CAShapeLayer layer];
153 | dotLayer.fillColor = [UIColor clearColor].CGColor;
154 | dotLayer.backgroundColor = self.config.dotColor.CGColor;
155 | [self.layer addSublayer:dotLayer];
156 | _dotLayer = dotLayer;
157 | }
158 | return _dotLayer;
159 | }
160 |
161 |
162 | @end
163 |
--------------------------------------------------------------------------------
/ZYProgressViewDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | C93EF5601E88AE57003ED09F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF55F1E88AE57003ED09F /* main.m */; };
11 | C93EF5631E88AE57003ED09F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF5621E88AE57003ED09F /* AppDelegate.m */; };
12 | C93EF5691E88AE57003ED09F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C93EF5671E88AE57003ED09F /* Main.storyboard */; };
13 | C93EF56B1E88AE57003ED09F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C93EF56A1E88AE57003ED09F /* Assets.xcassets */; };
14 | C93EF56E1E88AE57003ED09F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C93EF56C1E88AE57003ED09F /* LaunchScreen.storyboard */; };
15 | C93EF5771E88AE98003ED09F /* ExampleListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF5761E88AE98003ED09F /* ExampleListViewController.m */; };
16 | C93EF57D1E88AF69003ED09F /* LineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF57C1E88AF69003ED09F /* LineViewController.m */; };
17 | C93EF5801E88AF79003ED09F /* CircleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF57F1E88AF79003ED09F /* CircleViewController.m */; };
18 | C93EF5871E88AFEE003ED09F /* ZYCircleProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF5841E88AFEE003ED09F /* ZYCircleProgressView.m */; };
19 | C93EF5881E88AFEE003ED09F /* ZYCircleProgressViewConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF5861E88AFEE003ED09F /* ZYCircleProgressViewConfig.m */; };
20 | C93EF58E1E88B155003ED09F /* ZYLineProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF58B1E88B155003ED09F /* ZYLineProgressView.m */; };
21 | C93EF58F1E88B155003ED09F /* ZYLineProgressViewConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = C93EF58D1E88B155003ED09F /* ZYLineProgressViewConfig.m */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXFileReference section */
25 | C93EF55B1E88AE57003ED09F /* ZYProgressViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZYProgressViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
26 | C93EF55F1E88AE57003ED09F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
27 | C93EF5611E88AE57003ED09F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
28 | C93EF5621E88AE57003ED09F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
29 | C93EF5681E88AE57003ED09F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
30 | C93EF56A1E88AE57003ED09F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
31 | C93EF56D1E88AE57003ED09F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
32 | C93EF56F1E88AE57003ED09F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | C93EF5751E88AE98003ED09F /* ExampleListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleListViewController.h; sourceTree = ""; };
34 | C93EF5761E88AE98003ED09F /* ExampleListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleListViewController.m; sourceTree = ""; };
35 | C93EF57B1E88AF69003ED09F /* LineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineViewController.h; sourceTree = ""; };
36 | C93EF57C1E88AF69003ED09F /* LineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LineViewController.m; sourceTree = ""; };
37 | C93EF57E1E88AF79003ED09F /* CircleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleViewController.h; sourceTree = ""; };
38 | C93EF57F1E88AF79003ED09F /* CircleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CircleViewController.m; sourceTree = ""; };
39 | C93EF5831E88AFEE003ED09F /* ZYCircleProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZYCircleProgressView.h; sourceTree = ""; };
40 | C93EF5841E88AFEE003ED09F /* ZYCircleProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZYCircleProgressView.m; sourceTree = ""; };
41 | C93EF5851E88AFEE003ED09F /* ZYCircleProgressViewConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZYCircleProgressViewConfig.h; sourceTree = ""; };
42 | C93EF5861E88AFEE003ED09F /* ZYCircleProgressViewConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZYCircleProgressViewConfig.m; sourceTree = ""; };
43 | C93EF58A1E88B155003ED09F /* ZYLineProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZYLineProgressView.h; sourceTree = ""; };
44 | C93EF58B1E88B155003ED09F /* ZYLineProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZYLineProgressView.m; sourceTree = ""; };
45 | C93EF58C1E88B155003ED09F /* ZYLineProgressViewConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZYLineProgressViewConfig.h; sourceTree = ""; };
46 | C93EF58D1E88B155003ED09F /* ZYLineProgressViewConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZYLineProgressViewConfig.m; sourceTree = ""; };
47 | /* End PBXFileReference section */
48 |
49 | /* Begin PBXFrameworksBuildPhase section */
50 | C93EF5581E88AE57003ED09F /* Frameworks */ = {
51 | isa = PBXFrameworksBuildPhase;
52 | buildActionMask = 2147483647;
53 | files = (
54 | );
55 | runOnlyForDeploymentPostprocessing = 0;
56 | };
57 | /* End PBXFrameworksBuildPhase section */
58 |
59 | /* Begin PBXGroup section */
60 | C93EF5521E88AE57003ED09F = {
61 | isa = PBXGroup;
62 | children = (
63 | C93EF5811E88AFEE003ED09F /* ZYProgressView */,
64 | C93EF55D1E88AE57003ED09F /* ZYProgressViewDemo */,
65 | C93EF55C1E88AE57003ED09F /* Products */,
66 | );
67 | sourceTree = "";
68 | };
69 | C93EF55C1E88AE57003ED09F /* Products */ = {
70 | isa = PBXGroup;
71 | children = (
72 | C93EF55B1E88AE57003ED09F /* ZYProgressViewDemo.app */,
73 | );
74 | name = Products;
75 | sourceTree = "";
76 | };
77 | C93EF55D1E88AE57003ED09F /* ZYProgressViewDemo */ = {
78 | isa = PBXGroup;
79 | children = (
80 | C93EF5781E88AF2B003ED09F /* Example */,
81 | C93EF5611E88AE57003ED09F /* AppDelegate.h */,
82 | C93EF5621E88AE57003ED09F /* AppDelegate.m */,
83 | C93EF5751E88AE98003ED09F /* ExampleListViewController.h */,
84 | C93EF5761E88AE98003ED09F /* ExampleListViewController.m */,
85 | C93EF5671E88AE57003ED09F /* Main.storyboard */,
86 | C93EF56A1E88AE57003ED09F /* Assets.xcassets */,
87 | C93EF56C1E88AE57003ED09F /* LaunchScreen.storyboard */,
88 | C93EF56F1E88AE57003ED09F /* Info.plist */,
89 | C93EF55E1E88AE57003ED09F /* Supporting Files */,
90 | );
91 | path = ZYProgressViewDemo;
92 | sourceTree = "";
93 | };
94 | C93EF55E1E88AE57003ED09F /* Supporting Files */ = {
95 | isa = PBXGroup;
96 | children = (
97 | C93EF55F1E88AE57003ED09F /* main.m */,
98 | );
99 | name = "Supporting Files";
100 | sourceTree = "";
101 | };
102 | C93EF5781E88AF2B003ED09F /* Example */ = {
103 | isa = PBXGroup;
104 | children = (
105 | C93EF57A1E88AF58003ED09F /* Line */,
106 | C93EF5791E88AF58003ED09F /* Circle */,
107 | );
108 | path = Example;
109 | sourceTree = "";
110 | };
111 | C93EF5791E88AF58003ED09F /* Circle */ = {
112 | isa = PBXGroup;
113 | children = (
114 | C93EF57E1E88AF79003ED09F /* CircleViewController.h */,
115 | C93EF57F1E88AF79003ED09F /* CircleViewController.m */,
116 | );
117 | path = Circle;
118 | sourceTree = "";
119 | };
120 | C93EF57A1E88AF58003ED09F /* Line */ = {
121 | isa = PBXGroup;
122 | children = (
123 | C93EF57B1E88AF69003ED09F /* LineViewController.h */,
124 | C93EF57C1E88AF69003ED09F /* LineViewController.m */,
125 | );
126 | path = Line;
127 | sourceTree = "";
128 | };
129 | C93EF5811E88AFEE003ED09F /* ZYProgressView */ = {
130 | isa = PBXGroup;
131 | children = (
132 | C93EF5891E88B155003ED09F /* ZYLineProgressView */,
133 | C93EF5821E88AFEE003ED09F /* ZYCircleProgressView */,
134 | );
135 | path = ZYProgressView;
136 | sourceTree = "";
137 | };
138 | C93EF5821E88AFEE003ED09F /* ZYCircleProgressView */ = {
139 | isa = PBXGroup;
140 | children = (
141 | C93EF5831E88AFEE003ED09F /* ZYCircleProgressView.h */,
142 | C93EF5841E88AFEE003ED09F /* ZYCircleProgressView.m */,
143 | C93EF5851E88AFEE003ED09F /* ZYCircleProgressViewConfig.h */,
144 | C93EF5861E88AFEE003ED09F /* ZYCircleProgressViewConfig.m */,
145 | );
146 | path = ZYCircleProgressView;
147 | sourceTree = "";
148 | };
149 | C93EF5891E88B155003ED09F /* ZYLineProgressView */ = {
150 | isa = PBXGroup;
151 | children = (
152 | C93EF58A1E88B155003ED09F /* ZYLineProgressView.h */,
153 | C93EF58B1E88B155003ED09F /* ZYLineProgressView.m */,
154 | C93EF58C1E88B155003ED09F /* ZYLineProgressViewConfig.h */,
155 | C93EF58D1E88B155003ED09F /* ZYLineProgressViewConfig.m */,
156 | );
157 | path = ZYLineProgressView;
158 | sourceTree = "";
159 | };
160 | /* End PBXGroup section */
161 |
162 | /* Begin PBXNativeTarget section */
163 | C93EF55A1E88AE57003ED09F /* ZYProgressViewDemo */ = {
164 | isa = PBXNativeTarget;
165 | buildConfigurationList = C93EF5721E88AE57003ED09F /* Build configuration list for PBXNativeTarget "ZYProgressViewDemo" */;
166 | buildPhases = (
167 | C93EF5571E88AE57003ED09F /* Sources */,
168 | C93EF5581E88AE57003ED09F /* Frameworks */,
169 | C93EF5591E88AE57003ED09F /* Resources */,
170 | );
171 | buildRules = (
172 | );
173 | dependencies = (
174 | );
175 | name = ZYProgressViewDemo;
176 | productName = ZYProgressViewDemo;
177 | productReference = C93EF55B1E88AE57003ED09F /* ZYProgressViewDemo.app */;
178 | productType = "com.apple.product-type.application";
179 | };
180 | /* End PBXNativeTarget section */
181 |
182 | /* Begin PBXProject section */
183 | C93EF5531E88AE57003ED09F /* Project object */ = {
184 | isa = PBXProject;
185 | attributes = {
186 | LastUpgradeCheck = 0820;
187 | ORGANIZATIONNAME = ripper;
188 | TargetAttributes = {
189 | C93EF55A1E88AE57003ED09F = {
190 | CreatedOnToolsVersion = 8.2.1;
191 | ProvisioningStyle = Automatic;
192 | };
193 | };
194 | };
195 | buildConfigurationList = C93EF5561E88AE57003ED09F /* Build configuration list for PBXProject "ZYProgressViewDemo" */;
196 | compatibilityVersion = "Xcode 3.2";
197 | developmentRegion = English;
198 | hasScannedForEncodings = 0;
199 | knownRegions = (
200 | en,
201 | Base,
202 | );
203 | mainGroup = C93EF5521E88AE57003ED09F;
204 | productRefGroup = C93EF55C1E88AE57003ED09F /* Products */;
205 | projectDirPath = "";
206 | projectRoot = "";
207 | targets = (
208 | C93EF55A1E88AE57003ED09F /* ZYProgressViewDemo */,
209 | );
210 | };
211 | /* End PBXProject section */
212 |
213 | /* Begin PBXResourcesBuildPhase section */
214 | C93EF5591E88AE57003ED09F /* Resources */ = {
215 | isa = PBXResourcesBuildPhase;
216 | buildActionMask = 2147483647;
217 | files = (
218 | C93EF56E1E88AE57003ED09F /* LaunchScreen.storyboard in Resources */,
219 | C93EF56B1E88AE57003ED09F /* Assets.xcassets in Resources */,
220 | C93EF5691E88AE57003ED09F /* Main.storyboard in Resources */,
221 | );
222 | runOnlyForDeploymentPostprocessing = 0;
223 | };
224 | /* End PBXResourcesBuildPhase section */
225 |
226 | /* Begin PBXSourcesBuildPhase section */
227 | C93EF5571E88AE57003ED09F /* Sources */ = {
228 | isa = PBXSourcesBuildPhase;
229 | buildActionMask = 2147483647;
230 | files = (
231 | C93EF5631E88AE57003ED09F /* AppDelegate.m in Sources */,
232 | C93EF5771E88AE98003ED09F /* ExampleListViewController.m in Sources */,
233 | C93EF58E1E88B155003ED09F /* ZYLineProgressView.m in Sources */,
234 | C93EF5871E88AFEE003ED09F /* ZYCircleProgressView.m in Sources */,
235 | C93EF57D1E88AF69003ED09F /* LineViewController.m in Sources */,
236 | C93EF58F1E88B155003ED09F /* ZYLineProgressViewConfig.m in Sources */,
237 | C93EF5601E88AE57003ED09F /* main.m in Sources */,
238 | C93EF5801E88AF79003ED09F /* CircleViewController.m in Sources */,
239 | C93EF5881E88AFEE003ED09F /* ZYCircleProgressViewConfig.m in Sources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | /* End PBXSourcesBuildPhase section */
244 |
245 | /* Begin PBXVariantGroup section */
246 | C93EF5671E88AE57003ED09F /* Main.storyboard */ = {
247 | isa = PBXVariantGroup;
248 | children = (
249 | C93EF5681E88AE57003ED09F /* Base */,
250 | );
251 | name = Main.storyboard;
252 | sourceTree = "";
253 | };
254 | C93EF56C1E88AE57003ED09F /* LaunchScreen.storyboard */ = {
255 | isa = PBXVariantGroup;
256 | children = (
257 | C93EF56D1E88AE57003ED09F /* Base */,
258 | );
259 | name = LaunchScreen.storyboard;
260 | sourceTree = "";
261 | };
262 | /* End PBXVariantGroup section */
263 |
264 | /* Begin XCBuildConfiguration section */
265 | C93EF5701E88AE57003ED09F /* Debug */ = {
266 | isa = XCBuildConfiguration;
267 | buildSettings = {
268 | ALWAYS_SEARCH_USER_PATHS = NO;
269 | CLANG_ANALYZER_NONNULL = YES;
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
271 | CLANG_CXX_LIBRARY = "libc++";
272 | CLANG_ENABLE_MODULES = YES;
273 | CLANG_ENABLE_OBJC_ARC = YES;
274 | CLANG_WARN_BOOL_CONVERSION = YES;
275 | CLANG_WARN_CONSTANT_CONVERSION = YES;
276 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
277 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
278 | CLANG_WARN_EMPTY_BODY = YES;
279 | CLANG_WARN_ENUM_CONVERSION = YES;
280 | CLANG_WARN_INFINITE_RECURSION = YES;
281 | CLANG_WARN_INT_CONVERSION = YES;
282 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
283 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
284 | CLANG_WARN_UNREACHABLE_CODE = YES;
285 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
286 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
287 | COPY_PHASE_STRIP = NO;
288 | DEBUG_INFORMATION_FORMAT = dwarf;
289 | ENABLE_STRICT_OBJC_MSGSEND = YES;
290 | ENABLE_TESTABILITY = YES;
291 | GCC_C_LANGUAGE_STANDARD = gnu99;
292 | GCC_DYNAMIC_NO_PIC = NO;
293 | GCC_NO_COMMON_BLOCKS = YES;
294 | GCC_OPTIMIZATION_LEVEL = 0;
295 | GCC_PREPROCESSOR_DEFINITIONS = (
296 | "DEBUG=1",
297 | "$(inherited)",
298 | );
299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
301 | GCC_WARN_UNDECLARED_SELECTOR = YES;
302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
303 | GCC_WARN_UNUSED_FUNCTION = YES;
304 | GCC_WARN_UNUSED_VARIABLE = YES;
305 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
306 | MTL_ENABLE_DEBUG_INFO = YES;
307 | ONLY_ACTIVE_ARCH = YES;
308 | SDKROOT = iphoneos;
309 | };
310 | name = Debug;
311 | };
312 | C93EF5711E88AE57003ED09F /* Release */ = {
313 | isa = XCBuildConfiguration;
314 | buildSettings = {
315 | ALWAYS_SEARCH_USER_PATHS = NO;
316 | CLANG_ANALYZER_NONNULL = YES;
317 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
318 | CLANG_CXX_LIBRARY = "libc++";
319 | CLANG_ENABLE_MODULES = YES;
320 | CLANG_ENABLE_OBJC_ARC = YES;
321 | CLANG_WARN_BOOL_CONVERSION = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
324 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
331 | CLANG_WARN_UNREACHABLE_CODE = YES;
332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
334 | COPY_PHASE_STRIP = NO;
335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
336 | ENABLE_NS_ASSERTIONS = NO;
337 | ENABLE_STRICT_OBJC_MSGSEND = YES;
338 | GCC_C_LANGUAGE_STANDARD = gnu99;
339 | GCC_NO_COMMON_BLOCKS = YES;
340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
342 | GCC_WARN_UNDECLARED_SELECTOR = YES;
343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
344 | GCC_WARN_UNUSED_FUNCTION = YES;
345 | GCC_WARN_UNUSED_VARIABLE = YES;
346 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
347 | MTL_ENABLE_DEBUG_INFO = NO;
348 | SDKROOT = iphoneos;
349 | VALIDATE_PRODUCT = YES;
350 | };
351 | name = Release;
352 | };
353 | C93EF5731E88AE57003ED09F /* Debug */ = {
354 | isa = XCBuildConfiguration;
355 | buildSettings = {
356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357 | INFOPLIST_FILE = ZYProgressViewDemo/Info.plist;
358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
359 | PRODUCT_BUNDLE_IDENTIFIER = com.ripperhe.ZYProgressViewDemo;
360 | PRODUCT_NAME = "$(TARGET_NAME)";
361 | };
362 | name = Debug;
363 | };
364 | C93EF5741E88AE57003ED09F /* Release */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
368 | INFOPLIST_FILE = ZYProgressViewDemo/Info.plist;
369 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
370 | PRODUCT_BUNDLE_IDENTIFIER = com.ripperhe.ZYProgressViewDemo;
371 | PRODUCT_NAME = "$(TARGET_NAME)";
372 | };
373 | name = Release;
374 | };
375 | /* End XCBuildConfiguration section */
376 |
377 | /* Begin XCConfigurationList section */
378 | C93EF5561E88AE57003ED09F /* Build configuration list for PBXProject "ZYProgressViewDemo" */ = {
379 | isa = XCConfigurationList;
380 | buildConfigurations = (
381 | C93EF5701E88AE57003ED09F /* Debug */,
382 | C93EF5711E88AE57003ED09F /* Release */,
383 | );
384 | defaultConfigurationIsVisible = 0;
385 | defaultConfigurationName = Release;
386 | };
387 | C93EF5721E88AE57003ED09F /* Build configuration list for PBXNativeTarget "ZYProgressViewDemo" */ = {
388 | isa = XCConfigurationList;
389 | buildConfigurations = (
390 | C93EF5731E88AE57003ED09F /* Debug */,
391 | C93EF5741E88AE57003ED09F /* Release */,
392 | );
393 | defaultConfigurationIsVisible = 0;
394 | defaultConfigurationName = Release;
395 | };
396 | /* End XCConfigurationList section */
397 | };
398 | rootObject = C93EF5531E88AE57003ED09F /* Project object */;
399 | }
400 |
--------------------------------------------------------------------------------