├── Demo
├── SquaresLoading
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── DemoViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── SquaresLoading-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── SquaresLoading-Info.plist
│ ├── AppDelegate.m
│ └── DemoViewController.m
├── SquaresLoadingTests
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── SquaresLoadingTests-Info.plist
│ └── SquaresLoadingTests.m
└── SquaresLoading.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── SquaresLoading.xccheckout
│ └── project.pbxproj
├── SquaresLoading.gif
├── .gitignore
├── RZSquaresLoading
├── RZSquaresLoading.h
└── RZSquaresLoading.m
├── RZSquaresLoading.podspec
├── README.md
└── LICENSE
/Demo/SquaresLoading/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/SquaresLoading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/robinzhangx/RZSquaresLoading/HEAD/SquaresLoading.gif
--------------------------------------------------------------------------------
/Demo/SquaresLoadingTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | .DS_Store
3 | */build/*
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | profile
14 | *.moved-aside
15 | DerivedData
16 | .idea/
17 | *.hmap
18 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/DemoViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoViewController.h
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DemoViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/RZSquaresLoading/RZSquaresLoading.h:
--------------------------------------------------------------------------------
1 | //
2 | // RZSquaresLoading.h
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RZSquaresLoading : UIView
12 |
13 | @property (nonatomic) UIColor *color;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/SquaresLoading-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Demo/SquaresLoading/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/RZSquaresLoading.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "RZSquaresLoading"
3 | s.version = "1.1"
4 | s.summary = "iOS loading animations with squares."
5 | s.homepage = "https://github.com/robinzhangx/RZSquaresLoading"
6 | s.license = { :type => 'MIT', :file => 'LICENSE' }
7 | s.authors = { "robinz" => "robin.zhangx@gmail.com" }
8 | s.platform = :ios, '6.0'
9 | s.source = { :git => "https://github.com/robinzhangx/RZSquaresLoading.git", :tag => "1.1" }
10 | s.source_files = 'RZSquaresLoading/RZSquaresLoading.{h,m}'
11 | s.requires_arc = true
12 | end
13 |
--------------------------------------------------------------------------------
/Demo/SquaresLoadingTests/SquaresLoadingTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.example.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Demo/SquaresLoadingTests/SquaresLoadingTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SquaresLoadingTests.m
3 | // SquaresLoadingTests
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SquaresLoadingTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SquaresLoadingTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RZSquaresLoading
2 | ==============
3 | iOS loading animation with squares.
4 |
5 | 
6 |
7 | Usage
8 | ==============
9 | Instantiate ```RZSquaresLoading```(change the frame size and position to suit your need) and add to your view hierarchy.
10 | ```
11 | RZSquaresLoading *squareLoading = [[RZSquaresLoading alloc] initWithFrame:CGRectMake((0, 0, 36, 36)];
12 | [self.view addSubview:squareLoading];
13 | ```
14 |
15 | Change color:
16 | ```
17 | squareLoading.color = [UIColor redColor];
18 | ```
19 |
20 | Install
21 | ==============
22 | Install using CocoaPods:
23 | ```
24 | pod 'RZSquaresLoading'
25 | ```
26 |
27 | License
28 | ==============
29 | ```RZSquaresLoading``` is available under the MIT license. See the LICENSE file for more info.
30 |
31 | Note
32 | ==============
33 | RZSquaresLoading is also available for Xamarin. See [RZSquaresLoading-Xamarin-iOS](https://github.com/Backelite/RZSquaresLoading-Xamarin-iOS).
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Robin Zhang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/SquaresLoading-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.example.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading.xcodeproj/project.xcworkspace/xcshareddata/SquaresLoading.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 44CB346E-3139-43FD-9902-6B9E9D361B68
9 | IDESourceControlProjectName
10 | SquaresLoading
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | F6CD51F4-23D5-4161-B1D9-4F5E3D6D7857
14 | https://github.com/robinzhangx/RZSquaresLoading.git
15 |
16 | IDESourceControlProjectPath
17 | Demo/SquaresLoading.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | F6CD51F4-23D5-4161-B1D9-4F5E3D6D7857
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/robinzhangx/RZSquaresLoading.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | F6CD51F4-23D5-4161-B1D9-4F5E3D6D7857
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | F6CD51F4-23D5-4161-B1D9-4F5E3D6D7857
36 | IDESourceControlWCCName
37 | RZSquaresLoading
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "DemoViewController.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | self.window.backgroundColor = [UIColor whiteColor];
19 | self.window.rootViewController = [[DemoViewController alloc] init];
20 | [self.window makeKeyAndVisible];
21 | return YES;
22 | }
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application
25 | {
26 | // 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.
27 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
28 | }
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application
31 | {
32 | // 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.
33 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
34 | }
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application
37 | {
38 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
39 | }
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application
42 | {
43 | // 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.
44 | }
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application
47 | {
48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading/DemoViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoViewController.m
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import "DemoViewController.h"
10 | #import "RZSquaresLoading.h"
11 |
12 | @interface DemoViewController () {
13 | RZSquaresLoading *_square;
14 | UIColor *_red;
15 | UIButton *_redButton;
16 | UIColor *_green;
17 | UIButton *_greenButton;
18 | UIColor *_blue;
19 | UIButton *_blueButton;
20 | UIColor *_orange;
21 | UIButton *_orangeButton;
22 | UIButton *_grayButton;
23 | }
24 |
25 | @end
26 |
27 | @implementation DemoViewController
28 |
29 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
30 | {
31 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
32 | if (self) {
33 | // Custom initialization
34 | }
35 | return self;
36 | }
37 |
38 | - (void)viewDidLoad
39 | {
40 | [super viewDidLoad];
41 | // Do any additional setup after loading the view.
42 |
43 | _square = [[RZSquaresLoading alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 36) / 2,
44 | (self.view.frame.size.height - 36) / 2,
45 | 36,
46 | 36)];
47 | [self.view addSubview:_square];
48 |
49 | // Color buttons
50 | _red = [[UIColor alloc] initWithRed:1.0 green:65.0/255 blue:54.0/255 alpha:1.0];
51 | _redButton = [[UIButton alloc] initWithFrame:CGRectMake(40, _square.frame.origin.y + 144, 32, 32)];
52 | _redButton.backgroundColor = _red;
53 | _redButton.layer.cornerRadius = 3.0;
54 | [_redButton addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
55 | [self.view addSubview:_redButton];
56 |
57 | _green = [[UIColor alloc] initWithRed:46.0/255 green:204.0/255 blue:64.0/255 alpha:1.0];
58 | _greenButton = [[UIButton alloc] initWithFrame:CGRectMake(92, _square.frame.origin.y + 144, 32, 32)];
59 | _greenButton.backgroundColor = _green;
60 | _greenButton.layer.cornerRadius = 3.0;
61 | [_greenButton addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
62 | [self.view addSubview:_greenButton];
63 |
64 | _blue = [[UIColor alloc] initWithRed:0 green:116.0/255 blue:217.0/255 alpha:1.0];
65 | _blueButton = [[UIButton alloc] initWithFrame:CGRectMake(144, _square.frame.origin.y + 144, 32, 32)];
66 | _blueButton.backgroundColor = _blue;
67 | _blueButton.layer.cornerRadius = 3.0;
68 | [_blueButton addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
69 | [self.view addSubview:_blueButton];
70 |
71 | _orange = [[UIColor alloc] initWithRed:1.0 green:133.0/255 blue:27.0/255 alpha:1.0];
72 | _orangeButton = [[UIButton alloc] initWithFrame:CGRectMake(196, _square.frame.origin.y + 144, 32, 32)];
73 | _orangeButton.backgroundColor = _orange;
74 | _orangeButton.layer.cornerRadius = 3.0;
75 | [_orangeButton addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
76 | [self.view addSubview:_orangeButton];
77 |
78 | _grayButton = [[UIButton alloc] initWithFrame:CGRectMake(248, _square.frame.origin.y + 144, 32, 32)];
79 | _grayButton.backgroundColor = [UIColor darkGrayColor];
80 | _grayButton.layer.cornerRadius = 3.0;
81 | [_grayButton addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
82 | [self.view addSubview:_grayButton];
83 | }
84 |
85 | - (void)didReceiveMemoryWarning
86 | {
87 | [super didReceiveMemoryWarning];
88 | // Dispose of any resources that can be recreated.
89 | }
90 |
91 | - (IBAction)changeColor:(id)sender
92 | {
93 | if (sender == _redButton)
94 | _square.color = _red;
95 | else if (sender == _greenButton)
96 | _square.color = _green;
97 | else if (sender == _blueButton)
98 | _square.color = _blue;
99 | else if (sender == _orangeButton)
100 | _square.color = _orange;
101 | else if (sender == _grayButton)
102 | _square.color = [UIColor darkGrayColor];
103 | }
104 |
105 | @end
106 |
--------------------------------------------------------------------------------
/RZSquaresLoading/RZSquaresLoading.m:
--------------------------------------------------------------------------------
1 | //
2 | // RZSquaresLoading.m
3 | // SquaresLoading
4 | //
5 | // Created by robin on 1/29/14.
6 | // Copyright (c) 2014 SquaresLoading. All rights reserved.
7 | //
8 |
9 | #import "RZSquaresLoading.h"
10 |
11 | @implementation RZSquaresLoading {
12 | float _squareSize;
13 | float _gapSize;
14 | float _moveTime;
15 | float _squareStartX;
16 | float _squareStartY;
17 | float _squareStartOpacity;
18 | float _squareEndX;
19 | float _squareEndY;
20 | float _squareEndOpacity;
21 | float _squareOffsetX[9];
22 | float _squareOffsetY[9];
23 | float _squareOpacity[9];
24 | NSMutableArray *_squares;
25 | }
26 |
27 | - (id)initWithFrame:(CGRect)frame
28 | {
29 | self = [super initWithFrame:frame];
30 | if (self) {
31 | [self commonSetup:MIN(frame.size.width, frame.size.height)];
32 | }
33 | return self;
34 | }
35 |
36 | - (id)initWithCoder:(NSCoder *)coder
37 | {
38 | self = [super initWithCoder:coder];
39 | if (self) {
40 | [self commonSetup:MIN(CGRectGetWidth(self.frame), CGRectGetHeight(self.frame))];
41 | }
42 | return self;
43 | }
44 |
45 | - (void)setColor:(UIColor *)color
46 | {
47 | _color = color;
48 | for (CALayer *layer in _squares) {
49 | layer.backgroundColor = color.CGColor;
50 | }
51 | }
52 |
53 | - (void)commonSetup:(float)size
54 | {
55 | float gap = 0.04;
56 | _gapSize = size * gap;
57 | _squareSize = size * (1.0 - 2 * gap) / 3;
58 | _moveTime = 0.15;
59 | _squares = [[NSMutableArray alloc] init];
60 |
61 | for (int i = 0; i < 3; i++) {
62 | for (int j = 0; j < 3; j++) {
63 | float offsetX, offsetY;
64 | int idx = 3 * i + j;
65 | if (i == 1) {
66 | offsetX = _squareSize * (2 - j) + _gapSize * (2 - j);
67 | offsetY = _squareSize * i + _gapSize * i;
68 | } else {
69 | offsetX = _squareSize * j + _gapSize * j;
70 | offsetY = _squareSize * i + _gapSize * i;
71 | }
72 | _squareOffsetX[idx] = offsetX;
73 | _squareOffsetY[idx] = offsetY;
74 | _squareOpacity[idx] = 0.1 * (idx + 1);
75 | }
76 | }
77 | _squareStartX = _squareOffsetX[0];
78 | _squareStartY = _squareOffsetY[0] - 2 * _squareSize - 2 * _gapSize;
79 | _squareStartOpacity = 0.0;
80 | _squareEndX = _squareOffsetX[8];
81 | _squareEndY = _squareOffsetY[8] + 2 * _squareSize + 2 * _gapSize;
82 | _squareEndOpacity = 0.0;
83 |
84 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1)
85 | _color = [UIColor blackColor];
86 | else
87 | _color = self.tintColor;
88 |
89 | for (int i = -1; i < 9; i++) {
90 | [self addSquareAnimation:i];
91 | }
92 | }
93 |
94 | - (void)addSquareAnimation:(int)position
95 | {
96 |
97 | CALayer *square = [CALayer layer];
98 | if (position == -1) {
99 | square.frame = CGRectMake(_squareStartX, _squareStartY, _squareSize, _squareSize);
100 | square.opacity = _squareStartOpacity;
101 | } else {
102 | square.frame = CGRectMake(_squareOffsetX[position], _squareOffsetY[position], _squareSize, _squareSize);
103 | square.opacity = _squareOpacity[position];
104 | }
105 | square.backgroundColor = self.color.CGColor;
106 | [_squares addObject:square];
107 | [self.layer addSublayer:square];
108 |
109 | NSMutableArray *keyTimes = [[NSMutableArray alloc] init];
110 | NSMutableArray *alphas = [[NSMutableArray alloc] init];
111 | [keyTimes addObject:@(0.0)];
112 | if (position == -1) {
113 | [alphas addObject:@(0.0)];
114 | } else {
115 | [alphas addObject:@(_squareOpacity[position])];
116 | }
117 | if (position == 0)
118 | square.opacity = 0.0;
119 |
120 | CGPoint sp = square.position;
121 | CGMutablePathRef path = CGPathCreateMutable();
122 | CGPathMoveToPoint(path, NULL, sp.x, sp.y);
123 |
124 | float x, y, a;
125 | if (position == -1) {
126 | x = _squareOffsetX[0] - _squareStartX;
127 | y = _squareOffsetY[0] - _squareStartY;
128 | a = _squareOpacity[0];
129 | } else if (position == 8) {
130 | x = _squareEndX - _squareOffsetX[position];
131 | y = _squareEndY - _squareOffsetY[position];
132 | a = _squareEndOpacity;
133 | } else {
134 | x = _squareOffsetX[position + 1] - _squareOffsetX[position];
135 | y = _squareOffsetY[position + 1] - _squareOffsetY[position];
136 | a = _squareOpacity[position + 1];
137 | }
138 | CGPathAddLineToPoint(path, NULL, sp.x + x, sp.y + y);
139 | [keyTimes addObject:@(1.0 / 8.0)];
140 | [alphas addObject:@(a)];
141 |
142 | CGPathAddLineToPoint(path, NULL, sp.x + x, sp.y + y);
143 | [keyTimes addObject:@(1.0)];
144 | [alphas addObject:@(a)];
145 |
146 | CAKeyframeAnimation *posAnim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
147 | posAnim.removedOnCompletion = NO;
148 | posAnim.duration = _moveTime * 8;
149 | posAnim.path = path;
150 | posAnim.keyTimes = keyTimes;
151 |
152 | CAKeyframeAnimation *alphaAnim = [CAKeyframeAnimation animationWithKeyPath:@"opacity"];
153 | alphaAnim.removedOnCompletion = NO;
154 | alphaAnim.duration = _moveTime * 8;
155 | alphaAnim.values = alphas;
156 | alphaAnim.keyTimes = keyTimes;
157 |
158 | CAKeyframeAnimation *blankAnim = [CAKeyframeAnimation animationWithKeyPath:@"opacity"];
159 | blankAnim.removedOnCompletion = NO;
160 | blankAnim.beginTime = _moveTime * 8;
161 | blankAnim.duration = _moveTime;
162 | blankAnim.values = @[@(0.0), @(0.0)];
163 | blankAnim.keyTimes = @[@(0.0), @(1.0)];
164 |
165 | float beginTime;
166 | if (position == -1)
167 | beginTime = 0;
168 | else
169 | beginTime = _moveTime * (8 - position);
170 | CAAnimationGroup *group = [CAAnimationGroup animation];
171 | group.animations = @[posAnim, alphaAnim, blankAnim];
172 | group.beginTime = CACurrentMediaTime() + beginTime;
173 | group.repeatCount = HUGE_VALF;
174 | group.removedOnCompletion = NO;
175 | group.delegate = self;
176 | group.duration = 9 * _moveTime;
177 |
178 | [square addAnimation:group forKey:[NSString stringWithFormat:@"square-%d", position]];
179 | }
180 |
181 | @end
182 |
--------------------------------------------------------------------------------
/Demo/SquaresLoading.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 001DCC281898A40B004AEC43 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC271898A40B004AEC43 /* Foundation.framework */; };
11 | 001DCC2A1898A40B004AEC43 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC291898A40B004AEC43 /* CoreGraphics.framework */; };
12 | 001DCC2C1898A40B004AEC43 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC2B1898A40B004AEC43 /* UIKit.framework */; };
13 | 001DCC321898A40B004AEC43 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 001DCC301898A40B004AEC43 /* InfoPlist.strings */; };
14 | 001DCC341898A40B004AEC43 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 001DCC331898A40B004AEC43 /* main.m */; };
15 | 001DCC381898A40B004AEC43 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 001DCC371898A40B004AEC43 /* AppDelegate.m */; };
16 | 001DCC3A1898A40B004AEC43 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 001DCC391898A40B004AEC43 /* Images.xcassets */; };
17 | 001DCC411898A40B004AEC43 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC401898A40B004AEC43 /* XCTest.framework */; };
18 | 001DCC421898A40B004AEC43 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC271898A40B004AEC43 /* Foundation.framework */; };
19 | 001DCC431898A40B004AEC43 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 001DCC2B1898A40B004AEC43 /* UIKit.framework */; };
20 | 001DCC4B1898A40B004AEC43 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 001DCC491898A40B004AEC43 /* InfoPlist.strings */; };
21 | 001DCC4D1898A40B004AEC43 /* SquaresLoadingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 001DCC4C1898A40B004AEC43 /* SquaresLoadingTests.m */; };
22 | 001DCC621898A833004AEC43 /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 001DCC611898A833004AEC43 /* DemoViewController.m */; };
23 | 001DCC651898B75A004AEC43 /* RZSquaresLoading.m in Sources */ = {isa = PBXBuildFile; fileRef = 001DCC641898B75A004AEC43 /* RZSquaresLoading.m */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXContainerItemProxy section */
27 | 001DCC441898A40B004AEC43 /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 001DCC1C1898A40B004AEC43 /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 001DCC231898A40B004AEC43;
32 | remoteInfo = SquaresLoading;
33 | };
34 | /* End PBXContainerItemProxy section */
35 |
36 | /* Begin PBXFileReference section */
37 | 001DCC241898A40B004AEC43 /* SquaresLoading.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SquaresLoading.app; sourceTree = BUILT_PRODUCTS_DIR; };
38 | 001DCC271898A40B004AEC43 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
39 | 001DCC291898A40B004AEC43 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
40 | 001DCC2B1898A40B004AEC43 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
41 | 001DCC2F1898A40B004AEC43 /* SquaresLoading-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SquaresLoading-Info.plist"; sourceTree = ""; };
42 | 001DCC311898A40B004AEC43 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
43 | 001DCC331898A40B004AEC43 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | 001DCC351898A40B004AEC43 /* SquaresLoading-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SquaresLoading-Prefix.pch"; sourceTree = ""; };
45 | 001DCC361898A40B004AEC43 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 001DCC371898A40B004AEC43 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 001DCC391898A40B004AEC43 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
48 | 001DCC3F1898A40B004AEC43 /* SquaresLoadingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SquaresLoadingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 001DCC401898A40B004AEC43 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
50 | 001DCC481898A40B004AEC43 /* SquaresLoadingTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SquaresLoadingTests-Info.plist"; sourceTree = ""; };
51 | 001DCC4A1898A40B004AEC43 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
52 | 001DCC4C1898A40B004AEC43 /* SquaresLoadingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SquaresLoadingTests.m; sourceTree = ""; };
53 | 001DCC601898A833004AEC43 /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; };
54 | 001DCC611898A833004AEC43 /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; };
55 | 001DCC631898B75A004AEC43 /* RZSquaresLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RZSquaresLoading.h; path = ../../RZSquaresLoading/RZSquaresLoading.h; sourceTree = ""; };
56 | 001DCC641898B75A004AEC43 /* RZSquaresLoading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RZSquaresLoading.m; path = ../../RZSquaresLoading/RZSquaresLoading.m; sourceTree = ""; };
57 | /* End PBXFileReference section */
58 |
59 | /* Begin PBXFrameworksBuildPhase section */
60 | 001DCC211898A40B004AEC43 /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | 001DCC2A1898A40B004AEC43 /* CoreGraphics.framework in Frameworks */,
65 | 001DCC2C1898A40B004AEC43 /* UIKit.framework in Frameworks */,
66 | 001DCC281898A40B004AEC43 /* Foundation.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | 001DCC3C1898A40B004AEC43 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | 001DCC411898A40B004AEC43 /* XCTest.framework in Frameworks */,
75 | 001DCC431898A40B004AEC43 /* UIKit.framework in Frameworks */,
76 | 001DCC421898A40B004AEC43 /* Foundation.framework in Frameworks */,
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 001DCC1B1898A40B004AEC43 = {
84 | isa = PBXGroup;
85 | children = (
86 | 001DCC2D1898A40B004AEC43 /* SquaresLoading */,
87 | 001DCC461898A40B004AEC43 /* SquaresLoadingTests */,
88 | 001DCC261898A40B004AEC43 /* Frameworks */,
89 | 001DCC251898A40B004AEC43 /* Products */,
90 | );
91 | sourceTree = "";
92 | };
93 | 001DCC251898A40B004AEC43 /* Products */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 001DCC241898A40B004AEC43 /* SquaresLoading.app */,
97 | 001DCC3F1898A40B004AEC43 /* SquaresLoadingTests.xctest */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 001DCC261898A40B004AEC43 /* Frameworks */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 001DCC271898A40B004AEC43 /* Foundation.framework */,
106 | 001DCC291898A40B004AEC43 /* CoreGraphics.framework */,
107 | 001DCC2B1898A40B004AEC43 /* UIKit.framework */,
108 | 001DCC401898A40B004AEC43 /* XCTest.framework */,
109 | );
110 | name = Frameworks;
111 | sourceTree = "";
112 | };
113 | 001DCC2D1898A40B004AEC43 /* SquaresLoading */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 001DCC361898A40B004AEC43 /* AppDelegate.h */,
117 | 001DCC371898A40B004AEC43 /* AppDelegate.m */,
118 | 001DCC601898A833004AEC43 /* DemoViewController.h */,
119 | 001DCC611898A833004AEC43 /* DemoViewController.m */,
120 | 001DCC391898A40B004AEC43 /* Images.xcassets */,
121 | 001DCC631898B75A004AEC43 /* RZSquaresLoading.h */,
122 | 001DCC641898B75A004AEC43 /* RZSquaresLoading.m */,
123 | 001DCC2E1898A40B004AEC43 /* Supporting Files */,
124 | );
125 | path = SquaresLoading;
126 | sourceTree = "";
127 | };
128 | 001DCC2E1898A40B004AEC43 /* Supporting Files */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 001DCC2F1898A40B004AEC43 /* SquaresLoading-Info.plist */,
132 | 001DCC301898A40B004AEC43 /* InfoPlist.strings */,
133 | 001DCC331898A40B004AEC43 /* main.m */,
134 | 001DCC351898A40B004AEC43 /* SquaresLoading-Prefix.pch */,
135 | );
136 | name = "Supporting Files";
137 | sourceTree = "";
138 | };
139 | 001DCC461898A40B004AEC43 /* SquaresLoadingTests */ = {
140 | isa = PBXGroup;
141 | children = (
142 | 001DCC4C1898A40B004AEC43 /* SquaresLoadingTests.m */,
143 | 001DCC471898A40B004AEC43 /* Supporting Files */,
144 | );
145 | path = SquaresLoadingTests;
146 | sourceTree = "";
147 | };
148 | 001DCC471898A40B004AEC43 /* Supporting Files */ = {
149 | isa = PBXGroup;
150 | children = (
151 | 001DCC481898A40B004AEC43 /* SquaresLoadingTests-Info.plist */,
152 | 001DCC491898A40B004AEC43 /* InfoPlist.strings */,
153 | );
154 | name = "Supporting Files";
155 | sourceTree = "";
156 | };
157 | /* End PBXGroup section */
158 |
159 | /* Begin PBXNativeTarget section */
160 | 001DCC231898A40B004AEC43 /* SquaresLoading */ = {
161 | isa = PBXNativeTarget;
162 | buildConfigurationList = 001DCC501898A40B004AEC43 /* Build configuration list for PBXNativeTarget "SquaresLoading" */;
163 | buildPhases = (
164 | 001DCC201898A40B004AEC43 /* Sources */,
165 | 001DCC211898A40B004AEC43 /* Frameworks */,
166 | 001DCC221898A40B004AEC43 /* Resources */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | );
172 | name = SquaresLoading;
173 | productName = SquaresLoading;
174 | productReference = 001DCC241898A40B004AEC43 /* SquaresLoading.app */;
175 | productType = "com.apple.product-type.application";
176 | };
177 | 001DCC3E1898A40B004AEC43 /* SquaresLoadingTests */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = 001DCC531898A40B004AEC43 /* Build configuration list for PBXNativeTarget "SquaresLoadingTests" */;
180 | buildPhases = (
181 | 001DCC3B1898A40B004AEC43 /* Sources */,
182 | 001DCC3C1898A40B004AEC43 /* Frameworks */,
183 | 001DCC3D1898A40B004AEC43 /* Resources */,
184 | );
185 | buildRules = (
186 | );
187 | dependencies = (
188 | 001DCC451898A40B004AEC43 /* PBXTargetDependency */,
189 | );
190 | name = SquaresLoadingTests;
191 | productName = SquaresLoadingTests;
192 | productReference = 001DCC3F1898A40B004AEC43 /* SquaresLoadingTests.xctest */;
193 | productType = "com.apple.product-type.bundle.unit-test";
194 | };
195 | /* End PBXNativeTarget section */
196 |
197 | /* Begin PBXProject section */
198 | 001DCC1C1898A40B004AEC43 /* Project object */ = {
199 | isa = PBXProject;
200 | attributes = {
201 | LastUpgradeCheck = 0500;
202 | ORGANIZATIONNAME = SquaresLoading;
203 | TargetAttributes = {
204 | 001DCC3E1898A40B004AEC43 = {
205 | TestTargetID = 001DCC231898A40B004AEC43;
206 | };
207 | };
208 | };
209 | buildConfigurationList = 001DCC1F1898A40B004AEC43 /* Build configuration list for PBXProject "SquaresLoading" */;
210 | compatibilityVersion = "Xcode 3.2";
211 | developmentRegion = English;
212 | hasScannedForEncodings = 0;
213 | knownRegions = (
214 | en,
215 | );
216 | mainGroup = 001DCC1B1898A40B004AEC43;
217 | productRefGroup = 001DCC251898A40B004AEC43 /* Products */;
218 | projectDirPath = "";
219 | projectRoot = "";
220 | targets = (
221 | 001DCC231898A40B004AEC43 /* SquaresLoading */,
222 | 001DCC3E1898A40B004AEC43 /* SquaresLoadingTests */,
223 | );
224 | };
225 | /* End PBXProject section */
226 |
227 | /* Begin PBXResourcesBuildPhase section */
228 | 001DCC221898A40B004AEC43 /* Resources */ = {
229 | isa = PBXResourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | 001DCC321898A40B004AEC43 /* InfoPlist.strings in Resources */,
233 | 001DCC3A1898A40B004AEC43 /* Images.xcassets in Resources */,
234 | );
235 | runOnlyForDeploymentPostprocessing = 0;
236 | };
237 | 001DCC3D1898A40B004AEC43 /* Resources */ = {
238 | isa = PBXResourcesBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | 001DCC4B1898A40B004AEC43 /* InfoPlist.strings in Resources */,
242 | );
243 | runOnlyForDeploymentPostprocessing = 0;
244 | };
245 | /* End PBXResourcesBuildPhase section */
246 |
247 | /* Begin PBXSourcesBuildPhase section */
248 | 001DCC201898A40B004AEC43 /* Sources */ = {
249 | isa = PBXSourcesBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | 001DCC381898A40B004AEC43 /* AppDelegate.m in Sources */,
253 | 001DCC341898A40B004AEC43 /* main.m in Sources */,
254 | 001DCC621898A833004AEC43 /* DemoViewController.m in Sources */,
255 | 001DCC651898B75A004AEC43 /* RZSquaresLoading.m in Sources */,
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | 001DCC3B1898A40B004AEC43 /* Sources */ = {
260 | isa = PBXSourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 001DCC4D1898A40B004AEC43 /* SquaresLoadingTests.m in Sources */,
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | };
267 | /* End PBXSourcesBuildPhase section */
268 |
269 | /* Begin PBXTargetDependency section */
270 | 001DCC451898A40B004AEC43 /* PBXTargetDependency */ = {
271 | isa = PBXTargetDependency;
272 | target = 001DCC231898A40B004AEC43 /* SquaresLoading */;
273 | targetProxy = 001DCC441898A40B004AEC43 /* PBXContainerItemProxy */;
274 | };
275 | /* End PBXTargetDependency section */
276 |
277 | /* Begin PBXVariantGroup section */
278 | 001DCC301898A40B004AEC43 /* InfoPlist.strings */ = {
279 | isa = PBXVariantGroup;
280 | children = (
281 | 001DCC311898A40B004AEC43 /* en */,
282 | );
283 | name = InfoPlist.strings;
284 | sourceTree = "";
285 | };
286 | 001DCC491898A40B004AEC43 /* InfoPlist.strings */ = {
287 | isa = PBXVariantGroup;
288 | children = (
289 | 001DCC4A1898A40B004AEC43 /* en */,
290 | );
291 | name = InfoPlist.strings;
292 | sourceTree = "";
293 | };
294 | /* End PBXVariantGroup section */
295 |
296 | /* Begin XCBuildConfiguration section */
297 | 001DCC4E1898A40B004AEC43 /* Debug */ = {
298 | isa = XCBuildConfiguration;
299 | buildSettings = {
300 | ALWAYS_SEARCH_USER_PATHS = NO;
301 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
302 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
303 | CLANG_CXX_LIBRARY = "libc++";
304 | CLANG_ENABLE_MODULES = YES;
305 | CLANG_ENABLE_OBJC_ARC = YES;
306 | CLANG_WARN_BOOL_CONVERSION = YES;
307 | CLANG_WARN_CONSTANT_CONVERSION = YES;
308 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
309 | CLANG_WARN_EMPTY_BODY = YES;
310 | CLANG_WARN_ENUM_CONVERSION = YES;
311 | CLANG_WARN_INT_CONVERSION = YES;
312 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
313 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
314 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
315 | COPY_PHASE_STRIP = NO;
316 | GCC_C_LANGUAGE_STANDARD = gnu99;
317 | GCC_DYNAMIC_NO_PIC = NO;
318 | GCC_OPTIMIZATION_LEVEL = 0;
319 | GCC_PREPROCESSOR_DEFINITIONS = (
320 | "DEBUG=1",
321 | "$(inherited)",
322 | );
323 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
324 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
325 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
326 | GCC_WARN_UNDECLARED_SELECTOR = YES;
327 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
328 | GCC_WARN_UNUSED_FUNCTION = YES;
329 | GCC_WARN_UNUSED_VARIABLE = YES;
330 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
331 | ONLY_ACTIVE_ARCH = YES;
332 | SDKROOT = iphoneos;
333 | };
334 | name = Debug;
335 | };
336 | 001DCC4F1898A40B004AEC43 /* Release */ = {
337 | isa = XCBuildConfiguration;
338 | buildSettings = {
339 | ALWAYS_SEARCH_USER_PATHS = NO;
340 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
342 | CLANG_CXX_LIBRARY = "libc++";
343 | CLANG_ENABLE_MODULES = YES;
344 | CLANG_ENABLE_OBJC_ARC = YES;
345 | CLANG_WARN_BOOL_CONVERSION = YES;
346 | CLANG_WARN_CONSTANT_CONVERSION = YES;
347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
348 | CLANG_WARN_EMPTY_BODY = YES;
349 | CLANG_WARN_ENUM_CONVERSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
353 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
354 | COPY_PHASE_STRIP = YES;
355 | ENABLE_NS_ASSERTIONS = NO;
356 | GCC_C_LANGUAGE_STANDARD = gnu99;
357 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
358 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
359 | GCC_WARN_UNDECLARED_SELECTOR = YES;
360 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
361 | GCC_WARN_UNUSED_FUNCTION = YES;
362 | GCC_WARN_UNUSED_VARIABLE = YES;
363 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
364 | SDKROOT = iphoneos;
365 | VALIDATE_PRODUCT = YES;
366 | };
367 | name = Release;
368 | };
369 | 001DCC511898A40B004AEC43 /* Debug */ = {
370 | isa = XCBuildConfiguration;
371 | buildSettings = {
372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
373 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
374 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
375 | GCC_PREFIX_HEADER = "SquaresLoading/SquaresLoading-Prefix.pch";
376 | INFOPLIST_FILE = "SquaresLoading/SquaresLoading-Info.plist";
377 | PRODUCT_NAME = "$(TARGET_NAME)";
378 | WRAPPER_EXTENSION = app;
379 | };
380 | name = Debug;
381 | };
382 | 001DCC521898A40B004AEC43 /* Release */ = {
383 | isa = XCBuildConfiguration;
384 | buildSettings = {
385 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
386 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
387 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
388 | GCC_PREFIX_HEADER = "SquaresLoading/SquaresLoading-Prefix.pch";
389 | INFOPLIST_FILE = "SquaresLoading/SquaresLoading-Info.plist";
390 | PRODUCT_NAME = "$(TARGET_NAME)";
391 | WRAPPER_EXTENSION = app;
392 | };
393 | name = Release;
394 | };
395 | 001DCC541898A40B004AEC43 /* Debug */ = {
396 | isa = XCBuildConfiguration;
397 | buildSettings = {
398 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
399 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SquaresLoading.app/SquaresLoading";
400 | FRAMEWORK_SEARCH_PATHS = (
401 | "$(SDKROOT)/Developer/Library/Frameworks",
402 | "$(inherited)",
403 | "$(DEVELOPER_FRAMEWORKS_DIR)",
404 | );
405 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
406 | GCC_PREFIX_HEADER = "SquaresLoading/SquaresLoading-Prefix.pch";
407 | GCC_PREPROCESSOR_DEFINITIONS = (
408 | "DEBUG=1",
409 | "$(inherited)",
410 | );
411 | INFOPLIST_FILE = "SquaresLoadingTests/SquaresLoadingTests-Info.plist";
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | TEST_HOST = "$(BUNDLE_LOADER)";
414 | WRAPPER_EXTENSION = xctest;
415 | };
416 | name = Debug;
417 | };
418 | 001DCC551898A40B004AEC43 /* Release */ = {
419 | isa = XCBuildConfiguration;
420 | buildSettings = {
421 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
422 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SquaresLoading.app/SquaresLoading";
423 | FRAMEWORK_SEARCH_PATHS = (
424 | "$(SDKROOT)/Developer/Library/Frameworks",
425 | "$(inherited)",
426 | "$(DEVELOPER_FRAMEWORKS_DIR)",
427 | );
428 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
429 | GCC_PREFIX_HEADER = "SquaresLoading/SquaresLoading-Prefix.pch";
430 | INFOPLIST_FILE = "SquaresLoadingTests/SquaresLoadingTests-Info.plist";
431 | PRODUCT_NAME = "$(TARGET_NAME)";
432 | TEST_HOST = "$(BUNDLE_LOADER)";
433 | WRAPPER_EXTENSION = xctest;
434 | };
435 | name = Release;
436 | };
437 | /* End XCBuildConfiguration section */
438 |
439 | /* Begin XCConfigurationList section */
440 | 001DCC1F1898A40B004AEC43 /* Build configuration list for PBXProject "SquaresLoading" */ = {
441 | isa = XCConfigurationList;
442 | buildConfigurations = (
443 | 001DCC4E1898A40B004AEC43 /* Debug */,
444 | 001DCC4F1898A40B004AEC43 /* Release */,
445 | );
446 | defaultConfigurationIsVisible = 0;
447 | defaultConfigurationName = Release;
448 | };
449 | 001DCC501898A40B004AEC43 /* Build configuration list for PBXNativeTarget "SquaresLoading" */ = {
450 | isa = XCConfigurationList;
451 | buildConfigurations = (
452 | 001DCC511898A40B004AEC43 /* Debug */,
453 | 001DCC521898A40B004AEC43 /* Release */,
454 | );
455 | defaultConfigurationIsVisible = 0;
456 | defaultConfigurationName = Release;
457 | };
458 | 001DCC531898A40B004AEC43 /* Build configuration list for PBXNativeTarget "SquaresLoadingTests" */ = {
459 | isa = XCConfigurationList;
460 | buildConfigurations = (
461 | 001DCC541898A40B004AEC43 /* Debug */,
462 | 001DCC551898A40B004AEC43 /* Release */,
463 | );
464 | defaultConfigurationIsVisible = 0;
465 | defaultConfigurationName = Release;
466 | };
467 | /* End XCConfigurationList section */
468 | };
469 | rootObject = 001DCC1C1898A40B004AEC43 /* Project object */;
470 | }
471 |
--------------------------------------------------------------------------------