├── FFLoadingView.gif
├── FFLoadingViewExample
├── FFLoadingViewExample.xcodeproj
│ ├── xcuserdata
│ │ └── fang.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── FFLoadingViewExample.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── fang.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
├── FFLoadingViewExample
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── FFLoadingView
│ │ ├── FFLoadingView.h
│ │ └── FFLoadingView.m
│ ├── Assets.xcassets
│ │ ├── LaunchImage.launchimage
│ │ │ └── Contents.json
│ │ ├── LaunchImage-2.launchimage
│ │ │ └── Contents.json
│ │ ├── LaunchImage-3.launchimage
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ └── ViewController.m
├── FFLoadingViewExampleTests
│ ├── Info.plist
│ └── FFLoadingViewExampleTests.m
└── FFLoadingViewExampleUITests
│ ├── Info.plist
│ └── FFLoadingViewExampleUITests.m
├── README.md
├── FFLoadingView
├── FFLoadingView.h
└── FFLoadingView.m
└── LICENSE
/FFLoadingView.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma125125t/FFLoadingView/HEAD/FFLoadingView.gif
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/xcuserdata/fang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/project.xcworkspace/xcuserdata/fang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ma125125t/FFLoadingView/HEAD/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/project.xcworkspace/xcuserdata/fang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // FFLoadingViewExample
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // FFLoadingViewExample
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. 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 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // FFLoadingViewExample
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. 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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | [](https://raw.githubusercontent.com/skx926/KSPhotoBrowser/master/LICENSE)
3 | [](http://cocoapods.org/?q=KSPhotoBrowser)
4 | [](https://www.apple.com/nl/ios/)
5 |
6 | Installation
7 | --------------
8 | To use the FFLoadingView class in an app, just drag the FFLoadingView class files (demo files and assets are not needed) into your project.
9 |
10 | Examples
11 | --------------
12 | 
13 |
14 | Thanks For Viewing this page
15 | --------------
16 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExampleTests/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 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExampleUITests/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 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/xcuserdata/fang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | FFLoadingViewExample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 321846061EEE8F8300ADAE8F
16 |
17 | primary
18 |
19 |
20 | 3218461F1EEE8F8300ADAE8F
21 |
22 | primary
23 |
24 |
25 | 3218462A1EEE8F8300ADAE8F
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/FFLoadingView/FFLoadingView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingView.h
3 | // FFLoadingView
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FFLoadingView : UIView
12 |
13 | /**
14 | * 回调block callback block
15 | */
16 | typedef void (^FFLoadingCompleteBlock) ();
17 |
18 | /**
19 | * 线条宽度
20 | */
21 | @property (nonatomic,assign)CGFloat lineWidth;
22 |
23 | /**
24 | * 线条颜色
25 | */
26 | @property (nonatomic,copy )UIColor *strokeColor;
27 |
28 | /**
29 | * 开始 start
30 | */
31 | - (void)startLoading;
32 |
33 | /**
34 | * 结束,视图会被移除 end, view will be removed
35 | */
36 | - (void)endLoading;
37 |
38 | /**
39 | * 以成功结束动画 stop animation with a success
40 | *
41 | * @param block 回调(callback)
42 | */
43 | - (void)finishSuccess:(FFLoadingCompleteBlock)block;
44 |
45 | /**
46 | * 以失败结束动画 stop animation with a failure
47 | *
48 | * @param block 回调(callback)
49 | */
50 | - (void)finishFailure:(FFLoadingCompleteBlock)block;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/FFLoadingView/FFLoadingView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingView.h
3 | // FFLoadingView
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FFLoadingView : UIView
12 |
13 | /**
14 | * 回调block callback block
15 | */
16 | typedef void (^FFLoadingCompleteBlock) ();
17 |
18 | /**
19 | * 线条宽度
20 | */
21 | @property (nonatomic,assign)CGFloat lineWidth;
22 |
23 | /**
24 | * 线条颜色
25 | */
26 | @property (nonatomic,copy )UIColor *strokeColor;
27 |
28 | /**
29 | * 开始 start
30 | */
31 | - (void)startLoading;
32 |
33 | /**
34 | * 结束,视图会被移除 end, view will be removed
35 | */
36 | - (void)endLoading;
37 |
38 | /**
39 | * 以成功结束动画 stop animation with a success
40 | *
41 | * @param block 回调(callback)
42 | */
43 | - (void)finishSuccess:(FFLoadingCompleteBlock)block;
44 |
45 | /**
46 | * 以失败结束动画 stop animation with a failure
47 | *
48 | * @param block 回调(callback)
49 | */
50 | - (void)finishFailure:(FFLoadingCompleteBlock)block;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 FFFang
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 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExampleTests/FFLoadingViewExampleTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingViewExampleTests.m
3 | // FFLoadingViewExampleTests
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FFLoadingViewExampleTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation FFLoadingViewExampleTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "ipad",
6 | "minimum-system-version" : "7.0",
7 | "extent" : "full-screen",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "minimum-system-version" : "7.0",
14 | "extent" : "full-screen",
15 | "scale" : "1x"
16 | },
17 | {
18 | "orientation" : "landscape",
19 | "idiom" : "ipad",
20 | "minimum-system-version" : "7.0",
21 | "extent" : "full-screen",
22 | "scale" : "2x"
23 | },
24 | {
25 | "orientation" : "portrait",
26 | "idiom" : "iphone",
27 | "minimum-system-version" : "7.0",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "minimum-system-version" : "7.0",
34 | "subtype" : "retina4",
35 | "scale" : "2x"
36 | },
37 | {
38 | "orientation" : "portrait",
39 | "idiom" : "ipad",
40 | "minimum-system-version" : "7.0",
41 | "extent" : "full-screen",
42 | "scale" : "1x"
43 | }
44 | ],
45 | "info" : {
46 | "version" : 1,
47 | "author" : "xcode"
48 | }
49 | }
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/Assets.xcassets/LaunchImage-2.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "ipad",
6 | "minimum-system-version" : "7.0",
7 | "extent" : "full-screen",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "minimum-system-version" : "7.0",
14 | "extent" : "full-screen",
15 | "scale" : "1x"
16 | },
17 | {
18 | "orientation" : "landscape",
19 | "idiom" : "ipad",
20 | "minimum-system-version" : "7.0",
21 | "extent" : "full-screen",
22 | "scale" : "2x"
23 | },
24 | {
25 | "orientation" : "portrait",
26 | "idiom" : "iphone",
27 | "minimum-system-version" : "7.0",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "minimum-system-version" : "7.0",
34 | "subtype" : "retina4",
35 | "scale" : "2x"
36 | },
37 | {
38 | "orientation" : "portrait",
39 | "idiom" : "ipad",
40 | "minimum-system-version" : "7.0",
41 | "extent" : "full-screen",
42 | "scale" : "1x"
43 | }
44 | ],
45 | "info" : {
46 | "version" : 1,
47 | "author" : "xcode"
48 | }
49 | }
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/Assets.xcassets/LaunchImage-3.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "ipad",
6 | "minimum-system-version" : "7.0",
7 | "extent" : "full-screen",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "minimum-system-version" : "7.0",
14 | "extent" : "full-screen",
15 | "scale" : "1x"
16 | },
17 | {
18 | "orientation" : "landscape",
19 | "idiom" : "ipad",
20 | "minimum-system-version" : "7.0",
21 | "extent" : "full-screen",
22 | "scale" : "2x"
23 | },
24 | {
25 | "orientation" : "portrait",
26 | "idiom" : "iphone",
27 | "minimum-system-version" : "7.0",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "minimum-system-version" : "7.0",
34 | "subtype" : "retina4",
35 | "scale" : "2x"
36 | },
37 | {
38 | "orientation" : "portrait",
39 | "idiom" : "ipad",
40 | "minimum-system-version" : "7.0",
41 | "extent" : "full-screen",
42 | "scale" : "1x"
43 | }
44 | ],
45 | "info" : {
46 | "version" : 1,
47 | "author" : "xcode"
48 | }
49 | }
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExampleUITests/FFLoadingViewExampleUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingViewExampleUITests.m
3 | // FFLoadingViewExampleUITests
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FFLoadingViewExampleUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation FFLoadingViewExampleUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/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 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/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 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // FFLoadingViewExample
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | #import "ViewController.h"
12 |
13 | @interface AppDelegate ()
14 |
15 | @end
16 |
17 | @implementation AppDelegate
18 |
19 |
20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
22 | self.window.backgroundColor = [UIColor whiteColor];
23 | self.window.rootViewController = [[ViewController alloc] init];
24 | [self.window makeKeyAndVisible];
25 | return YES;
26 | }
27 |
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application {
30 | // 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.
31 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
32 | }
33 |
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application {
36 | // 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.
37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
38 | }
39 |
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application {
42 | // 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.
43 | }
44 |
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application {
47 | // 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.
48 | }
49 |
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application {
52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
53 | }
54 |
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // FFLoadingViewExample
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "FFLoadingView.h"
12 |
13 | @interface ViewController ()
14 |
15 | @property (strong, nonatomic) FFLoadingView *loadingView;
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 | UIButton* btnStart = [[UIButton alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/2-100, 100, 200, 40)];
24 | [btnStart setTitle:@"start loading" forState:UIControlStateNormal];
25 | [btnStart setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
26 | [btnStart addTarget:self action:@selector(startLoading:) forControlEvents:UIControlEventTouchUpInside];
27 | [self.view addSubview:btnStart];
28 |
29 | UIButton* btnSuc = [[UIButton alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/2-100, 160, 200, 40)];
30 | [btnSuc setTitle:@"Success" forState:UIControlStateNormal];
31 | [btnSuc setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
32 | [btnSuc addTarget:self action:@selector(finishSucceed:) forControlEvents:UIControlEventTouchUpInside];
33 | [self.view addSubview:btnSuc];
34 |
35 | UIButton* btnFail = [[UIButton alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/2-100, 220, 200, 40)];
36 | [btnFail setTitle:@"Failure" forState:UIControlStateNormal];
37 | [btnFail setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
38 | [btnFail addTarget:self action:@selector(finishFailed:) forControlEvents:UIControlEventTouchUpInside];
39 | [self.view addSubview:btnFail];
40 |
41 | self.loadingView = [[FFLoadingView alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width/2-50, 300, 100, 100)];
42 | self.loadingView.lineWidth = 4;
43 | self.loadingView.strokeColor = [UIColor blueColor];
44 | [self.view addSubview:self.loadingView];
45 | }
46 |
47 |
48 | - (void)didReceiveMemoryWarning {
49 | [super didReceiveMemoryWarning];
50 | }
51 |
52 | - (void)startLoading:(id)sender {
53 | [self.loadingView startLoading];
54 | }
55 |
56 | - (void)finishSucceed:(id)sender {
57 | [self.loadingView finishSuccess:nil];
58 | }
59 |
60 | - (void)finishFailed:(id)sender {
61 | [self.loadingView finishFailure:nil];
62 | }
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/xcuserdata/fang.xcuserdatad/xcschemes/FFLoadingViewExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/FFLoadingView/FFLoadingView.m:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingView.m
3 | // FFLoadingView
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import "FFLoadingView.h"
10 |
11 |
12 | #define _fromValue @(0)
13 | #define _StationValue @(0.3)
14 | #define _endValue @(0.9)
15 | #define _duration1 (1)
16 | #define _duration2 (0.5)
17 | #define _durationFinish (0.7)
18 |
19 |
20 | #define kAnimationDrawCircle @"kAnimationDrawCircle"
21 | #define kAnimationDrawSuccess @"kAnimationDrawSuccess"
22 | #define kAnimationDrawFailure @"kAnimationDrawFailure"
23 | #define kAnimationClose @"kAnimationClose"
24 |
25 | @interface FFLoadingView()
26 |
27 | @property (nonatomic, assign) BOOL bWillFinish;
28 | @property (nonatomic, strong) CAShapeLayer *progressLayer;
29 | @property (nonatomic, strong) CAShapeLayer *successLayer;
30 | @property (nonatomic, strong) CAShapeLayer *failureLayer;
31 |
32 | @property (nonatomic, copy ) FFLoadingCompleteBlock finishBlock;
33 |
34 | @end
35 |
36 | @implementation FFLoadingView
37 |
38 | - (void)dealloc {
39 | NSLog(@"FFLoadingView dealloc");
40 | }
41 |
42 | - (id)initWithFrame:(CGRect)frame
43 | {
44 | self = [super initWithFrame:frame];
45 | if (self) {
46 | self.backgroundColor = [UIColor whiteColor];
47 | _strokeColor = [UIColor colorWithRed:0.15 green:0.7 blue:0.92 alpha:1];
48 | [self setupView];
49 | }
50 | return self;
51 | }
52 |
53 | - (instancetype)initWithCoder:(NSCoder *)aDecoder {
54 | if (self = [super initWithCoder:aDecoder]) {
55 | self.backgroundColor = [UIColor whiteColor];
56 | _strokeColor = [UIColor colorWithRed:0.15 green:0.7 blue:0.92 alpha:1];
57 | [self setupView];
58 | }
59 | return self;
60 | }
61 |
62 | - (void)setupView
63 | {
64 | _progressLayer = [CAShapeLayer layer];
65 | _progressLayer.fillColor = [UIColor clearColor].CGColor;
66 | _progressLayer.strokeColor = self.strokeColor.CGColor;
67 | _progressLayer.lineWidth = 4;
68 | _progressLayer.frame = self.bounds;
69 | _progressLayer.lineJoin = kCALineJoinRound;
70 | _progressLayer.lineCap = kCALineCapRound;
71 | [self.layer addSublayer:_progressLayer];
72 |
73 | _successLayer = [CAShapeLayer layer];
74 | _successLayer.fillColor = [UIColor clearColor].CGColor;
75 | _successLayer.strokeColor = self.strokeColor.CGColor;
76 | _successLayer.lineWidth = 4;
77 | _successLayer.frame = self.bounds;
78 | _successLayer.lineJoin = kCALineJoinRound;
79 | _successLayer.lineCap = kCALineCapRound;
80 | [self.layer addSublayer:_successLayer];
81 |
82 |
83 | _failureLayer = [CAShapeLayer layer];
84 | _failureLayer.fillColor = [UIColor clearColor].CGColor;
85 | _failureLayer.strokeColor = self.strokeColor.CGColor;
86 | _failureLayer.lineWidth = 4;
87 | _failureLayer.frame = self.bounds;
88 | _failureLayer.lineJoin = kCALineJoinRound;
89 | _failureLayer.lineCap = kCALineCapRound;
90 | [self.layer addSublayer:_failureLayer];
91 | }
92 |
93 | - (void)setLineWidth:(CGFloat)lineWidth {
94 | _lineWidth = lineWidth;
95 | _progressLayer.lineWidth = lineWidth;
96 | _successLayer.lineWidth = lineWidth;
97 | _failureLayer.lineWidth = lineWidth;
98 | }
99 |
100 | - (void)setStrokeColor:(UIColor *)strokeColor {
101 | _strokeColor = strokeColor;
102 | _progressLayer.strokeColor = strokeColor.CGColor;
103 | _successLayer.strokeColor = strokeColor.CGColor;
104 | _failureLayer.strokeColor = strokeColor.CGColor;
105 | }
106 |
107 | #pragma mark - load
108 | - (void)startLoading
109 | {
110 | [_progressLayer removeAllAnimations];
111 | _progressLayer.path = nil;
112 | [_successLayer removeAllAnimations];
113 | _successLayer.path = nil;
114 | [_failureLayer removeAllAnimations];
115 | _failureLayer.path = nil;
116 |
117 | self.bWillFinish = NO;
118 |
119 | [self drawCircleAnimation:_fromValue end:_endValue duration:_duration1];
120 |
121 | CABasicAnimation *rotateAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
122 | rotateAnimation.repeatCount = INFINITY;
123 | rotateAnimation.byValue = @(M_PI*2);
124 | rotateAnimation.duration = 0.7;
125 | [_progressLayer addAnimation:rotateAnimation forKey:@"rotateAnimation"];
126 | }
127 |
128 | - (void)endLoading
129 | {
130 | [_progressLayer removeAllAnimations];
131 | _progressLayer.path = nil;
132 | [_successLayer removeAllAnimations];
133 | _successLayer.path = nil;
134 | [_failureLayer removeAllAnimations];
135 | _failureLayer.path = nil;
136 | [self removeFromSuperview];
137 | }
138 |
139 | - (void)finishSuccess:(FFLoadingCompleteBlock)block {
140 | self.bWillFinish = YES;
141 | self.finishBlock = block;
142 | [self drawSuccessAnimation];
143 | [_failureLayer removeAllAnimations];
144 | _failureLayer.path = nil;
145 | }
146 |
147 | - (void)finishFailure:(FFLoadingCompleteBlock)block {
148 | self.bWillFinish = YES;
149 | self.finishBlock = block;
150 | [self drawFailureAnimation];
151 | [_successLayer removeAllAnimations];
152 | _successLayer.path = nil;
153 | }
154 |
155 |
156 | #pragma mark - Animation Delegate -
157 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {
158 | NSString* key = [anim valueForKey:@"id"];
159 | if ([key isEqualToString:kAnimationDrawCircle] && !self.bWillFinish) {
160 | [self closeCircleAnimation];
161 | }
162 | else if ([key isEqualToString:kAnimationClose] && !self.bWillFinish) {
163 | [_progressLayer removeAnimationForKey:@"kAnimationDrawCircle"];
164 | [_progressLayer removeAnimationForKey:@"kAnimationClose"];
165 |
166 | [self drawCircleAnimation:_fromValue end:_endValue duration:_duration1];
167 | }
168 | else if ([key isEqualToString:kAnimationDrawSuccess] || [key isEqualToString:kAnimationDrawFailure]) {
169 | if (self.finishBlock != NULL) {
170 | self.finishBlock();
171 | }
172 | }
173 | }
174 |
175 | #pragma mark - Private Methods
176 | - (void)drawSuccessAnimation {
177 | UIBezierPath* successPath = [UIBezierPath bezierPath];
178 | CGFloat size = self.bounds.size.width;
179 | [successPath moveToPoint: CGPointMake(size/3.1578, size/2)];
180 | [successPath addLineToPoint: CGPointMake(size/2.0618, size/1.57894)];
181 | [successPath addLineToPoint: CGPointMake(size/1.3953, size/2.7272)];
182 | _successLayer.path = successPath.CGPath;
183 |
184 | CABasicAnimation *successAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
185 | [successAnimation setValue:kAnimationDrawSuccess forKey:@"id"];
186 | successAnimation.duration = _durationFinish;
187 | successAnimation.delegate = self;
188 | successAnimation.fromValue = @0;
189 | successAnimation.toValue = @1;
190 | successAnimation.removedOnCompletion = NO;
191 | successAnimation.fillMode = kCAFillModeForwards;
192 | successAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
193 | [_successLayer addAnimation:successAnimation forKey:kAnimationDrawSuccess];
194 |
195 | [_progressLayer removeAllAnimations];
196 | [self drawCircleAnimation:_fromValue end:@1 duration:_durationFinish];
197 | }
198 |
199 | - (void)drawFailureAnimation {
200 | UIBezierPath* failurePath = [UIBezierPath bezierPath];
201 | CGFloat size = self.bounds.size.width;
202 | [failurePath moveToPoint: CGPointMake(size/3.5, size/3.5)];
203 | [failurePath addLineToPoint: CGPointMake(size - size/3.5, size - size/3.5)];
204 |
205 | [failurePath moveToPoint: CGPointMake(size - size/3.5, size/3.5)];
206 | [failurePath addLineToPoint: CGPointMake(size/3.5, size - size/3.5)];
207 |
208 | _failureLayer.path = failurePath.CGPath;
209 |
210 | CABasicAnimation *failureAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
211 | [failureAnimation setValue:kAnimationDrawFailure forKey:@"id"];
212 | failureAnimation.duration = _durationFinish;
213 | failureAnimation.delegate = self;
214 | failureAnimation.fromValue = @0;
215 | failureAnimation.toValue = @1;
216 | failureAnimation.removedOnCompletion = NO;
217 | failureAnimation.fillMode = kCAFillModeForwards;
218 | failureAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
219 | [_failureLayer addAnimation:failureAnimation forKey:kAnimationDrawFailure];
220 |
221 | [_progressLayer removeAllAnimations];
222 | [self drawCircleAnimation:_fromValue end:@1 duration:_durationFinish];
223 | }
224 |
225 | - (void)drawCircleAnimation:(NSNumber*)from end:(NSNumber*)end duration:(CGFloat)duration {
226 | UIBezierPath * roundPath = [UIBezierPath bezierPath];
227 | CGRect rectSelf = self.bounds;
228 | [roundPath addArcWithCenter:CGPointMake(rectSelf.size.width / 2, rectSelf.size.height / 2) radius:CGRectGetHeight(rectSelf) / 2 startAngle:- 0.5 * M_PI endAngle:1.5 * M_PI clockwise:YES];
229 | _progressLayer.path = roundPath.CGPath;
230 |
231 | CABasicAnimation* headStartAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
232 | [headStartAnimation setValue:kAnimationDrawCircle forKey:@"id"];
233 | headStartAnimation.fromValue = from;
234 | headStartAnimation.toValue = end;
235 | headStartAnimation.duration = duration;
236 | headStartAnimation.fillMode = kCAFillModeForwards;
237 | headStartAnimation.removedOnCompletion = NO;
238 | headStartAnimation.delegate = self;
239 | headStartAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
240 | [_progressLayer addAnimation:headStartAnimation forKey:kAnimationDrawCircle];
241 | }
242 |
243 | - (void)closeCircleAnimation {
244 | CABasicAnimation* headEndAnimation1 = [CABasicAnimation animationWithKeyPath:@"strokeStart"];
245 | [headEndAnimation1 setValue:kAnimationClose forKey:@"id"];
246 | headEndAnimation1.fromValue = _fromValue;
247 | headEndAnimation1.toValue = _endValue;
248 | headEndAnimation1.duration = _duration2;
249 | headEndAnimation1.fillMode = kCAFillModeForwards;
250 | headEndAnimation1.removedOnCompletion = NO;
251 | headEndAnimation1.delegate = self;
252 | headEndAnimation1.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
253 | [_progressLayer addAnimation:headEndAnimation1 forKey:kAnimationClose];
254 | }
255 |
256 | @end
257 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample/FFLoadingView/FFLoadingView.m:
--------------------------------------------------------------------------------
1 | //
2 | // FFLoadingView.m
3 | // FFLoadingView
4 | //
5 | // Created by fang on 2017/6/12.
6 | // Copyright © 2017年 organization. All rights reserved.
7 | //
8 |
9 | #import "FFLoadingView.h"
10 |
11 |
12 | #define _fromValue @(0)
13 | #define _StationValue @(0.3)
14 | #define _endValue @(0.9)
15 | #define _duration1 (1)
16 | #define _duration2 (0.5)
17 | #define _durationFinish (0.7)
18 |
19 |
20 | #define kAnimationDrawCircle @"kAnimationDrawCircle"
21 | #define kAnimationDrawSuccess @"kAnimationDrawSuccess"
22 | #define kAnimationDrawFailure @"kAnimationDrawFailure"
23 | #define kAnimationClose @"kAnimationClose"
24 |
25 | @interface FFLoadingView()
26 |
27 | @property (nonatomic, assign) BOOL bWillFinish;
28 | @property (nonatomic, strong) CAShapeLayer *progressLayer;
29 | @property (nonatomic, strong) CAShapeLayer *successLayer;
30 | @property (nonatomic, strong) CAShapeLayer *failureLayer;
31 |
32 | @property (nonatomic, copy ) FFLoadingCompleteBlock finishBlock;
33 |
34 | @end
35 |
36 | @implementation FFLoadingView
37 |
38 | - (void)dealloc {
39 | NSLog(@"FFLoadingView dealloc");
40 | }
41 |
42 | - (id)initWithFrame:(CGRect)frame
43 | {
44 | self = [super initWithFrame:frame];
45 | if (self) {
46 | self.backgroundColor = [UIColor whiteColor];
47 | _strokeColor = [UIColor colorWithRed:0.15 green:0.7 blue:0.92 alpha:1];
48 | [self setupView];
49 | }
50 | return self;
51 | }
52 |
53 | - (instancetype)initWithCoder:(NSCoder *)aDecoder {
54 | if (self = [super initWithCoder:aDecoder]) {
55 | self.backgroundColor = [UIColor whiteColor];
56 | _strokeColor = [UIColor colorWithRed:0.15 green:0.7 blue:0.92 alpha:1];
57 | [self setupView];
58 | }
59 | return self;
60 | }
61 |
62 | - (void)setupView
63 | {
64 | _progressLayer = [CAShapeLayer layer];
65 | _progressLayer.fillColor = [UIColor clearColor].CGColor;
66 | _progressLayer.strokeColor = self.strokeColor.CGColor;
67 | _progressLayer.lineWidth = 4;
68 | _progressLayer.frame = self.bounds;
69 | _progressLayer.lineJoin = kCALineJoinRound;
70 | _progressLayer.lineCap = kCALineCapRound;
71 | [self.layer addSublayer:_progressLayer];
72 |
73 | _successLayer = [CAShapeLayer layer];
74 | _successLayer.fillColor = [UIColor clearColor].CGColor;
75 | _successLayer.strokeColor = self.strokeColor.CGColor;
76 | _successLayer.lineWidth = 4;
77 | _successLayer.frame = self.bounds;
78 | _successLayer.lineJoin = kCALineJoinRound;
79 | _successLayer.lineCap = kCALineCapRound;
80 | [self.layer addSublayer:_successLayer];
81 |
82 |
83 | _failureLayer = [CAShapeLayer layer];
84 | _failureLayer.fillColor = [UIColor clearColor].CGColor;
85 | _failureLayer.strokeColor = self.strokeColor.CGColor;
86 | _failureLayer.lineWidth = 4;
87 | _failureLayer.frame = self.bounds;
88 | _failureLayer.lineJoin = kCALineJoinRound;
89 | _failureLayer.lineCap = kCALineCapRound;
90 | [self.layer addSublayer:_failureLayer];
91 | }
92 |
93 | - (void)setLineWidth:(CGFloat)lineWidth {
94 | _lineWidth = lineWidth;
95 | _progressLayer.lineWidth = lineWidth;
96 | _successLayer.lineWidth = lineWidth;
97 | _failureLayer.lineWidth = lineWidth;
98 | }
99 |
100 | - (void)setStrokeColor:(UIColor *)strokeColor {
101 | _strokeColor = strokeColor;
102 | _progressLayer.strokeColor = strokeColor.CGColor;
103 | _successLayer.strokeColor = strokeColor.CGColor;
104 | _failureLayer.strokeColor = strokeColor.CGColor;
105 | }
106 |
107 | #pragma mark - load
108 | - (void)startLoading
109 | {
110 | [_progressLayer removeAllAnimations];
111 | _progressLayer.path = nil;
112 | [_successLayer removeAllAnimations];
113 | _successLayer.path = nil;
114 | [_failureLayer removeAllAnimations];
115 | _failureLayer.path = nil;
116 |
117 | self.bWillFinish = NO;
118 |
119 | [self drawCircleAnimation:_fromValue end:_endValue duration:_duration1];
120 |
121 | CABasicAnimation *rotateAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
122 | rotateAnimation.repeatCount = INFINITY;
123 | rotateAnimation.byValue = @(M_PI*2);
124 | rotateAnimation.duration = 0.7;
125 | [_progressLayer addAnimation:rotateAnimation forKey:@"rotateAnimation"];
126 | }
127 |
128 | - (void)endLoading
129 | {
130 | [_progressLayer removeAllAnimations];
131 | _progressLayer.path = nil;
132 | [_successLayer removeAllAnimations];
133 | _successLayer.path = nil;
134 | [_failureLayer removeAllAnimations];
135 | _failureLayer.path = nil;
136 | [self removeFromSuperview];
137 | }
138 |
139 | - (void)finishSuccess:(FFLoadingCompleteBlock)block {
140 | self.bWillFinish = YES;
141 | self.finishBlock = block;
142 | [self drawSuccessAnimation];
143 | [_failureLayer removeAllAnimations];
144 | _failureLayer.path = nil;
145 | }
146 |
147 | - (void)finishFailure:(FFLoadingCompleteBlock)block {
148 | self.bWillFinish = YES;
149 | self.finishBlock = block;
150 | [self drawFailureAnimation];
151 | [_successLayer removeAllAnimations];
152 | _successLayer.path = nil;
153 | }
154 |
155 |
156 | #pragma mark - Animation Delegate -
157 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {
158 | NSString* key = [anim valueForKey:@"id"];
159 | if ([key isEqualToString:kAnimationDrawCircle] && !self.bWillFinish) {
160 | [self closeCircleAnimation];
161 | }
162 | else if ([key isEqualToString:kAnimationClose] && !self.bWillFinish) {
163 | [_progressLayer removeAnimationForKey:@"kAnimationDrawCircle"];
164 | [_progressLayer removeAnimationForKey:@"kAnimationClose"];
165 |
166 | [self drawCircleAnimation:_fromValue end:_endValue duration:_duration1];
167 | }
168 | else if ([key isEqualToString:kAnimationDrawSuccess] || [key isEqualToString:kAnimationDrawFailure]) {
169 | if (self.finishBlock != NULL) {
170 | self.finishBlock();
171 | }
172 | }
173 | }
174 |
175 | #pragma mark - Private Methods
176 | - (void)drawSuccessAnimation {
177 | UIBezierPath* successPath = [UIBezierPath bezierPath];
178 | CGFloat size = self.bounds.size.width;
179 | [successPath moveToPoint: CGPointMake(size/3.1578, size/2)];
180 | [successPath addLineToPoint: CGPointMake(size/2.0618, size/1.57894)];
181 | [successPath addLineToPoint: CGPointMake(size/1.3953, size/2.7272)];
182 | _successLayer.path = successPath.CGPath;
183 |
184 | CABasicAnimation *successAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
185 | [successAnimation setValue:kAnimationDrawSuccess forKey:@"id"];
186 | successAnimation.duration = _durationFinish;
187 | successAnimation.delegate = self;
188 | successAnimation.fromValue = @0;
189 | successAnimation.toValue = @1;
190 | successAnimation.removedOnCompletion = NO;
191 | successAnimation.fillMode = kCAFillModeForwards;
192 | successAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
193 | [_successLayer addAnimation:successAnimation forKey:kAnimationDrawSuccess];
194 |
195 | [_progressLayer removeAllAnimations];
196 | [self drawCircleAnimation:_fromValue end:@1 duration:_durationFinish];
197 | }
198 |
199 | - (void)drawFailureAnimation {
200 | UIBezierPath* failurePath = [UIBezierPath bezierPath];
201 | CGFloat size = self.bounds.size.width;
202 | [failurePath moveToPoint: CGPointMake(size/3.5, size/3.5)];
203 | [failurePath addLineToPoint: CGPointMake(size - size/3.5, size - size/3.5)];
204 |
205 | [failurePath moveToPoint: CGPointMake(size - size/3.5, size/3.5)];
206 | [failurePath addLineToPoint: CGPointMake(size/3.5, size - size/3.5)];
207 |
208 | _failureLayer.path = failurePath.CGPath;
209 |
210 | CABasicAnimation *failureAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
211 | [failureAnimation setValue:kAnimationDrawFailure forKey:@"id"];
212 | failureAnimation.duration = _durationFinish;
213 | failureAnimation.delegate = self;
214 | failureAnimation.fromValue = @0;
215 | failureAnimation.toValue = @1;
216 | failureAnimation.removedOnCompletion = NO;
217 | failureAnimation.fillMode = kCAFillModeForwards;
218 | failureAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
219 | [_failureLayer addAnimation:failureAnimation forKey:kAnimationDrawFailure];
220 |
221 | [_progressLayer removeAllAnimations];
222 | [self drawCircleAnimation:_fromValue end:@1 duration:_durationFinish];
223 | }
224 |
225 | - (void)drawCircleAnimation:(NSNumber*)from end:(NSNumber*)end duration:(CGFloat)duration {
226 | UIBezierPath * roundPath = [UIBezierPath bezierPath];
227 | CGRect rectSelf = self.bounds;
228 | [roundPath addArcWithCenter:CGPointMake(rectSelf.size.width / 2, rectSelf.size.height / 2) radius:CGRectGetHeight(rectSelf) / 2 startAngle:- 0.5 * M_PI endAngle:1.5 * M_PI clockwise:YES];
229 | _progressLayer.path = roundPath.CGPath;
230 |
231 | CABasicAnimation* headStartAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
232 | [headStartAnimation setValue:kAnimationDrawCircle forKey:@"id"];
233 | headStartAnimation.fromValue = from;
234 | headStartAnimation.toValue = end;
235 | headStartAnimation.duration = duration;
236 | headStartAnimation.fillMode = kCAFillModeForwards;
237 | headStartAnimation.removedOnCompletion = NO;
238 | headStartAnimation.delegate = self;
239 | headStartAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
240 | [_progressLayer addAnimation:headStartAnimation forKey:kAnimationDrawCircle];
241 | }
242 |
243 | - (void)closeCircleAnimation {
244 | CABasicAnimation* headEndAnimation1 = [CABasicAnimation animationWithKeyPath:@"strokeStart"];
245 | [headEndAnimation1 setValue:kAnimationClose forKey:@"id"];
246 | headEndAnimation1.fromValue = _fromValue;
247 | headEndAnimation1.toValue = _endValue;
248 | headEndAnimation1.duration = _duration2;
249 | headEndAnimation1.fillMode = kCAFillModeForwards;
250 | headEndAnimation1.removedOnCompletion = NO;
251 | headEndAnimation1.delegate = self;
252 | headEndAnimation1.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
253 | [_progressLayer addAnimation:headEndAnimation1 forKey:kAnimationClose];
254 | }
255 |
256 | @end
257 |
--------------------------------------------------------------------------------
/FFLoadingViewExample/FFLoadingViewExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 3218460C1EEE8F8300ADAE8F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3218460B1EEE8F8300ADAE8F /* main.m */; };
11 | 3218460F1EEE8F8300ADAE8F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3218460E1EEE8F8300ADAE8F /* AppDelegate.m */; };
12 | 321846121EEE8F8300ADAE8F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 321846111EEE8F8300ADAE8F /* ViewController.m */; };
13 | 321846171EEE8F8300ADAE8F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 321846161EEE8F8300ADAE8F /* Assets.xcassets */; };
14 | 321846251EEE8F8300ADAE8F /* FFLoadingViewExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 321846241EEE8F8300ADAE8F /* FFLoadingViewExampleTests.m */; };
15 | 321846301EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3218462F1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.m */; };
16 | 321846421EEE949C00ADAE8F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 321846411EEE949C00ADAE8F /* LaunchScreen.storyboard */; };
17 | 321846461EEE982800ADAE8F /* FFLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 321846451EEE982800ADAE8F /* FFLoadingView.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 321846211EEE8F8300ADAE8F /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 321845FF1EEE8F8300ADAE8F /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 321846061EEE8F8300ADAE8F;
26 | remoteInfo = FFLoadingViewExample;
27 | };
28 | 3218462C1EEE8F8300ADAE8F /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = 321845FF1EEE8F8300ADAE8F /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = 321846061EEE8F8300ADAE8F;
33 | remoteInfo = FFLoadingViewExample;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | 321846071EEE8F8300ADAE8F /* FFLoadingViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FFLoadingViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 3218460B1EEE8F8300ADAE8F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
40 | 3218460D1EEE8F8300ADAE8F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
41 | 3218460E1EEE8F8300ADAE8F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
42 | 321846101EEE8F8300ADAE8F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
43 | 321846111EEE8F8300ADAE8F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
44 | 321846161EEE8F8300ADAE8F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
45 | 3218461B1EEE8F8300ADAE8F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
46 | 321846201EEE8F8300ADAE8F /* FFLoadingViewExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FFLoadingViewExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 321846241EEE8F8300ADAE8F /* FFLoadingViewExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFLoadingViewExampleTests.m; sourceTree = ""; };
48 | 321846261EEE8F8300ADAE8F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 3218462B1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FFLoadingViewExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 3218462F1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFLoadingViewExampleUITests.m; sourceTree = ""; };
51 | 321846311EEE8F8300ADAE8F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | 321846411EEE949C00ADAE8F /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; };
53 | 321846441EEE982800ADAE8F /* FFLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FFLoadingView.h; sourceTree = ""; };
54 | 321846451EEE982800ADAE8F /* FFLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FFLoadingView.m; sourceTree = ""; };
55 | /* End PBXFileReference section */
56 |
57 | /* Begin PBXFrameworksBuildPhase section */
58 | 321846041EEE8F8300ADAE8F /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | 3218461D1EEE8F8300ADAE8F /* Frameworks */ = {
66 | isa = PBXFrameworksBuildPhase;
67 | buildActionMask = 2147483647;
68 | files = (
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | 321846281EEE8F8300ADAE8F /* Frameworks */ = {
73 | isa = PBXFrameworksBuildPhase;
74 | buildActionMask = 2147483647;
75 | files = (
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | /* End PBXFrameworksBuildPhase section */
80 |
81 | /* Begin PBXGroup section */
82 | 321845FE1EEE8F8300ADAE8F = {
83 | isa = PBXGroup;
84 | children = (
85 | 321846091EEE8F8300ADAE8F /* FFLoadingViewExample */,
86 | 321846231EEE8F8300ADAE8F /* FFLoadingViewExampleTests */,
87 | 3218462E1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests */,
88 | 321846081EEE8F8300ADAE8F /* Products */,
89 | );
90 | sourceTree = "";
91 | };
92 | 321846081EEE8F8300ADAE8F /* Products */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 321846071EEE8F8300ADAE8F /* FFLoadingViewExample.app */,
96 | 321846201EEE8F8300ADAE8F /* FFLoadingViewExampleTests.xctest */,
97 | 3218462B1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.xctest */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 321846091EEE8F8300ADAE8F /* FFLoadingViewExample */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 321846431EEE982800ADAE8F /* FFLoadingView */,
106 | 3218460D1EEE8F8300ADAE8F /* AppDelegate.h */,
107 | 3218460E1EEE8F8300ADAE8F /* AppDelegate.m */,
108 | 321846101EEE8F8300ADAE8F /* ViewController.h */,
109 | 321846111EEE8F8300ADAE8F /* ViewController.m */,
110 | 321846161EEE8F8300ADAE8F /* Assets.xcassets */,
111 | 3218461B1EEE8F8300ADAE8F /* Info.plist */,
112 | 321846411EEE949C00ADAE8F /* LaunchScreen.storyboard */,
113 | 3218460A1EEE8F8300ADAE8F /* Supporting Files */,
114 | );
115 | path = FFLoadingViewExample;
116 | sourceTree = "";
117 | };
118 | 3218460A1EEE8F8300ADAE8F /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 3218460B1EEE8F8300ADAE8F /* main.m */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | 321846231EEE8F8300ADAE8F /* FFLoadingViewExampleTests */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 321846241EEE8F8300ADAE8F /* FFLoadingViewExampleTests.m */,
130 | 321846261EEE8F8300ADAE8F /* Info.plist */,
131 | );
132 | path = FFLoadingViewExampleTests;
133 | sourceTree = "";
134 | };
135 | 3218462E1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 3218462F1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.m */,
139 | 321846311EEE8F8300ADAE8F /* Info.plist */,
140 | );
141 | path = FFLoadingViewExampleUITests;
142 | sourceTree = "";
143 | };
144 | 321846431EEE982800ADAE8F /* FFLoadingView */ = {
145 | isa = PBXGroup;
146 | children = (
147 | 321846441EEE982800ADAE8F /* FFLoadingView.h */,
148 | 321846451EEE982800ADAE8F /* FFLoadingView.m */,
149 | );
150 | path = FFLoadingView;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 321846061EEE8F8300ADAE8F /* FFLoadingViewExample */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 321846341EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExample" */;
159 | buildPhases = (
160 | 321846031EEE8F8300ADAE8F /* Sources */,
161 | 321846041EEE8F8300ADAE8F /* Frameworks */,
162 | 321846051EEE8F8300ADAE8F /* Resources */,
163 | );
164 | buildRules = (
165 | );
166 | dependencies = (
167 | );
168 | name = FFLoadingViewExample;
169 | productName = FFLoadingViewExample;
170 | productReference = 321846071EEE8F8300ADAE8F /* FFLoadingViewExample.app */;
171 | productType = "com.apple.product-type.application";
172 | };
173 | 3218461F1EEE8F8300ADAE8F /* FFLoadingViewExampleTests */ = {
174 | isa = PBXNativeTarget;
175 | buildConfigurationList = 321846371EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExampleTests" */;
176 | buildPhases = (
177 | 3218461C1EEE8F8300ADAE8F /* Sources */,
178 | 3218461D1EEE8F8300ADAE8F /* Frameworks */,
179 | 3218461E1EEE8F8300ADAE8F /* Resources */,
180 | );
181 | buildRules = (
182 | );
183 | dependencies = (
184 | 321846221EEE8F8300ADAE8F /* PBXTargetDependency */,
185 | );
186 | name = FFLoadingViewExampleTests;
187 | productName = FFLoadingViewExampleTests;
188 | productReference = 321846201EEE8F8300ADAE8F /* FFLoadingViewExampleTests.xctest */;
189 | productType = "com.apple.product-type.bundle.unit-test";
190 | };
191 | 3218462A1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests */ = {
192 | isa = PBXNativeTarget;
193 | buildConfigurationList = 3218463A1EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExampleUITests" */;
194 | buildPhases = (
195 | 321846271EEE8F8300ADAE8F /* Sources */,
196 | 321846281EEE8F8300ADAE8F /* Frameworks */,
197 | 321846291EEE8F8300ADAE8F /* Resources */,
198 | );
199 | buildRules = (
200 | );
201 | dependencies = (
202 | 3218462D1EEE8F8300ADAE8F /* PBXTargetDependency */,
203 | );
204 | name = FFLoadingViewExampleUITests;
205 | productName = FFLoadingViewExampleUITests;
206 | productReference = 3218462B1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.xctest */;
207 | productType = "com.apple.product-type.bundle.ui-testing";
208 | };
209 | /* End PBXNativeTarget section */
210 |
211 | /* Begin PBXProject section */
212 | 321845FF1EEE8F8300ADAE8F /* Project object */ = {
213 | isa = PBXProject;
214 | attributes = {
215 | LastUpgradeCheck = 0830;
216 | ORGANIZATIONNAME = organization;
217 | TargetAttributes = {
218 | 321846061EEE8F8300ADAE8F = {
219 | CreatedOnToolsVersion = 8.3.2;
220 | ProvisioningStyle = Automatic;
221 | };
222 | 3218461F1EEE8F8300ADAE8F = {
223 | CreatedOnToolsVersion = 8.3.2;
224 | ProvisioningStyle = Automatic;
225 | TestTargetID = 321846061EEE8F8300ADAE8F;
226 | };
227 | 3218462A1EEE8F8300ADAE8F = {
228 | CreatedOnToolsVersion = 8.3.2;
229 | ProvisioningStyle = Automatic;
230 | TestTargetID = 321846061EEE8F8300ADAE8F;
231 | };
232 | };
233 | };
234 | buildConfigurationList = 321846021EEE8F8300ADAE8F /* Build configuration list for PBXProject "FFLoadingViewExample" */;
235 | compatibilityVersion = "Xcode 3.2";
236 | developmentRegion = English;
237 | hasScannedForEncodings = 0;
238 | knownRegions = (
239 | en,
240 | Base,
241 | );
242 | mainGroup = 321845FE1EEE8F8300ADAE8F;
243 | productRefGroup = 321846081EEE8F8300ADAE8F /* Products */;
244 | projectDirPath = "";
245 | projectRoot = "";
246 | targets = (
247 | 321846061EEE8F8300ADAE8F /* FFLoadingViewExample */,
248 | 3218461F1EEE8F8300ADAE8F /* FFLoadingViewExampleTests */,
249 | 3218462A1EEE8F8300ADAE8F /* FFLoadingViewExampleUITests */,
250 | );
251 | };
252 | /* End PBXProject section */
253 |
254 | /* Begin PBXResourcesBuildPhase section */
255 | 321846051EEE8F8300ADAE8F /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | 321846171EEE8F8300ADAE8F /* Assets.xcassets in Resources */,
260 | 321846421EEE949C00ADAE8F /* LaunchScreen.storyboard in Resources */,
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | };
264 | 3218461E1EEE8F8300ADAE8F /* Resources */ = {
265 | isa = PBXResourcesBuildPhase;
266 | buildActionMask = 2147483647;
267 | files = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | 321846291EEE8F8300ADAE8F /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | );
276 | runOnlyForDeploymentPostprocessing = 0;
277 | };
278 | /* End PBXResourcesBuildPhase section */
279 |
280 | /* Begin PBXSourcesBuildPhase section */
281 | 321846031EEE8F8300ADAE8F /* Sources */ = {
282 | isa = PBXSourcesBuildPhase;
283 | buildActionMask = 2147483647;
284 | files = (
285 | 321846121EEE8F8300ADAE8F /* ViewController.m in Sources */,
286 | 3218460F1EEE8F8300ADAE8F /* AppDelegate.m in Sources */,
287 | 3218460C1EEE8F8300ADAE8F /* main.m in Sources */,
288 | 321846461EEE982800ADAE8F /* FFLoadingView.m in Sources */,
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | };
292 | 3218461C1EEE8F8300ADAE8F /* Sources */ = {
293 | isa = PBXSourcesBuildPhase;
294 | buildActionMask = 2147483647;
295 | files = (
296 | 321846251EEE8F8300ADAE8F /* FFLoadingViewExampleTests.m in Sources */,
297 | );
298 | runOnlyForDeploymentPostprocessing = 0;
299 | };
300 | 321846271EEE8F8300ADAE8F /* Sources */ = {
301 | isa = PBXSourcesBuildPhase;
302 | buildActionMask = 2147483647;
303 | files = (
304 | 321846301EEE8F8300ADAE8F /* FFLoadingViewExampleUITests.m in Sources */,
305 | );
306 | runOnlyForDeploymentPostprocessing = 0;
307 | };
308 | /* End PBXSourcesBuildPhase section */
309 |
310 | /* Begin PBXTargetDependency section */
311 | 321846221EEE8F8300ADAE8F /* PBXTargetDependency */ = {
312 | isa = PBXTargetDependency;
313 | target = 321846061EEE8F8300ADAE8F /* FFLoadingViewExample */;
314 | targetProxy = 321846211EEE8F8300ADAE8F /* PBXContainerItemProxy */;
315 | };
316 | 3218462D1EEE8F8300ADAE8F /* PBXTargetDependency */ = {
317 | isa = PBXTargetDependency;
318 | target = 321846061EEE8F8300ADAE8F /* FFLoadingViewExample */;
319 | targetProxy = 3218462C1EEE8F8300ADAE8F /* PBXContainerItemProxy */;
320 | };
321 | /* End PBXTargetDependency section */
322 |
323 | /* Begin XCBuildConfiguration section */
324 | 321846321EEE8F8300ADAE8F /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | ALWAYS_SEARCH_USER_PATHS = NO;
328 | CLANG_ANALYZER_NONNULL = YES;
329 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
331 | CLANG_CXX_LIBRARY = "libc++";
332 | CLANG_ENABLE_MODULES = YES;
333 | CLANG_ENABLE_OBJC_ARC = YES;
334 | CLANG_WARN_BOOL_CONVERSION = YES;
335 | CLANG_WARN_CONSTANT_CONVERSION = YES;
336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
338 | CLANG_WARN_EMPTY_BODY = YES;
339 | CLANG_WARN_ENUM_CONVERSION = YES;
340 | CLANG_WARN_INFINITE_RECURSION = YES;
341 | CLANG_WARN_INT_CONVERSION = YES;
342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
343 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
344 | CLANG_WARN_UNREACHABLE_CODE = YES;
345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
347 | COPY_PHASE_STRIP = NO;
348 | DEBUG_INFORMATION_FORMAT = dwarf;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | ENABLE_TESTABILITY = YES;
351 | GCC_C_LANGUAGE_STANDARD = gnu99;
352 | GCC_DYNAMIC_NO_PIC = NO;
353 | GCC_NO_COMMON_BLOCKS = YES;
354 | GCC_OPTIMIZATION_LEVEL = 0;
355 | GCC_PREPROCESSOR_DEFINITIONS = (
356 | "DEBUG=1",
357 | "$(inherited)",
358 | );
359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
361 | GCC_WARN_UNDECLARED_SELECTOR = YES;
362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
363 | GCC_WARN_UNUSED_FUNCTION = YES;
364 | GCC_WARN_UNUSED_VARIABLE = YES;
365 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
366 | MTL_ENABLE_DEBUG_INFO = YES;
367 | ONLY_ACTIVE_ARCH = YES;
368 | SDKROOT = iphoneos;
369 | TARGETED_DEVICE_FAMILY = "1,2";
370 | };
371 | name = Debug;
372 | };
373 | 321846331EEE8F8300ADAE8F /* Release */ = {
374 | isa = XCBuildConfiguration;
375 | buildSettings = {
376 | ALWAYS_SEARCH_USER_PATHS = NO;
377 | CLANG_ANALYZER_NONNULL = YES;
378 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
380 | CLANG_CXX_LIBRARY = "libc++";
381 | CLANG_ENABLE_MODULES = YES;
382 | CLANG_ENABLE_OBJC_ARC = YES;
383 | CLANG_WARN_BOOL_CONVERSION = YES;
384 | CLANG_WARN_CONSTANT_CONVERSION = YES;
385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
386 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
387 | CLANG_WARN_EMPTY_BODY = YES;
388 | CLANG_WARN_ENUM_CONVERSION = YES;
389 | CLANG_WARN_INFINITE_RECURSION = YES;
390 | CLANG_WARN_INT_CONVERSION = YES;
391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
392 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
393 | CLANG_WARN_UNREACHABLE_CODE = YES;
394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
395 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
396 | COPY_PHASE_STRIP = NO;
397 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
398 | ENABLE_NS_ASSERTIONS = NO;
399 | ENABLE_STRICT_OBJC_MSGSEND = YES;
400 | GCC_C_LANGUAGE_STANDARD = gnu99;
401 | GCC_NO_COMMON_BLOCKS = YES;
402 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
403 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
404 | GCC_WARN_UNDECLARED_SELECTOR = YES;
405 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
406 | GCC_WARN_UNUSED_FUNCTION = YES;
407 | GCC_WARN_UNUSED_VARIABLE = YES;
408 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
409 | MTL_ENABLE_DEBUG_INFO = NO;
410 | SDKROOT = iphoneos;
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 321846351EEE8F8300ADAE8F /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "LaunchImage-3";
421 | INFOPLIST_FILE = FFLoadingViewExample/Info.plist;
422 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
423 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExample;
424 | PRODUCT_NAME = "$(TARGET_NAME)";
425 | };
426 | name = Debug;
427 | };
428 | 321846361EEE8F8300ADAE8F /* Release */ = {
429 | isa = XCBuildConfiguration;
430 | buildSettings = {
431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "LaunchImage-3";
433 | INFOPLIST_FILE = FFLoadingViewExample/Info.plist;
434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
435 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExample;
436 | PRODUCT_NAME = "$(TARGET_NAME)";
437 | };
438 | name = Release;
439 | };
440 | 321846381EEE8F8300ADAE8F /* Debug */ = {
441 | isa = XCBuildConfiguration;
442 | buildSettings = {
443 | BUNDLE_LOADER = "$(TEST_HOST)";
444 | INFOPLIST_FILE = FFLoadingViewExampleTests/Info.plist;
445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
446 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExampleTests;
447 | PRODUCT_NAME = "$(TARGET_NAME)";
448 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FFLoadingViewExample.app/FFLoadingViewExample";
449 | };
450 | name = Debug;
451 | };
452 | 321846391EEE8F8300ADAE8F /* Release */ = {
453 | isa = XCBuildConfiguration;
454 | buildSettings = {
455 | BUNDLE_LOADER = "$(TEST_HOST)";
456 | INFOPLIST_FILE = FFLoadingViewExampleTests/Info.plist;
457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
458 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExampleTests;
459 | PRODUCT_NAME = "$(TARGET_NAME)";
460 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FFLoadingViewExample.app/FFLoadingViewExample";
461 | };
462 | name = Release;
463 | };
464 | 3218463B1EEE8F8300ADAE8F /* Debug */ = {
465 | isa = XCBuildConfiguration;
466 | buildSettings = {
467 | INFOPLIST_FILE = FFLoadingViewExampleUITests/Info.plist;
468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
469 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExampleUITests;
470 | PRODUCT_NAME = "$(TARGET_NAME)";
471 | TEST_TARGET_NAME = FFLoadingViewExample;
472 | };
473 | name = Debug;
474 | };
475 | 3218463C1EEE8F8300ADAE8F /* Release */ = {
476 | isa = XCBuildConfiguration;
477 | buildSettings = {
478 | INFOPLIST_FILE = FFLoadingViewExampleUITests/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
480 | PRODUCT_BUNDLE_IDENTIFIER = com.FFLoadingViewExampleUITests;
481 | PRODUCT_NAME = "$(TARGET_NAME)";
482 | TEST_TARGET_NAME = FFLoadingViewExample;
483 | };
484 | name = Release;
485 | };
486 | /* End XCBuildConfiguration section */
487 |
488 | /* Begin XCConfigurationList section */
489 | 321846021EEE8F8300ADAE8F /* Build configuration list for PBXProject "FFLoadingViewExample" */ = {
490 | isa = XCConfigurationList;
491 | buildConfigurations = (
492 | 321846321EEE8F8300ADAE8F /* Debug */,
493 | 321846331EEE8F8300ADAE8F /* Release */,
494 | );
495 | defaultConfigurationIsVisible = 0;
496 | defaultConfigurationName = Release;
497 | };
498 | 321846341EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExample" */ = {
499 | isa = XCConfigurationList;
500 | buildConfigurations = (
501 | 321846351EEE8F8300ADAE8F /* Debug */,
502 | 321846361EEE8F8300ADAE8F /* Release */,
503 | );
504 | defaultConfigurationIsVisible = 0;
505 | defaultConfigurationName = Release;
506 | };
507 | 321846371EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExampleTests" */ = {
508 | isa = XCConfigurationList;
509 | buildConfigurations = (
510 | 321846381EEE8F8300ADAE8F /* Debug */,
511 | 321846391EEE8F8300ADAE8F /* Release */,
512 | );
513 | defaultConfigurationIsVisible = 0;
514 | defaultConfigurationName = Release;
515 | };
516 | 3218463A1EEE8F8300ADAE8F /* Build configuration list for PBXNativeTarget "FFLoadingViewExampleUITests" */ = {
517 | isa = XCConfigurationList;
518 | buildConfigurations = (
519 | 3218463B1EEE8F8300ADAE8F /* Debug */,
520 | 3218463C1EEE8F8300ADAE8F /* Release */,
521 | );
522 | defaultConfigurationIsVisible = 0;
523 | defaultConfigurationName = Release;
524 | };
525 | /* End XCConfigurationList section */
526 | };
527 | rootObject = 321845FF1EEE8F8300ADAE8F /* Project object */;
528 | }
529 |
--------------------------------------------------------------------------------