Repository: xhzengAIB/XHAmazingLoading
Branch: master
Commit: 65d6fcfee2a5
Files: 40
Total size: 75.3 KB
Directory structure:
gitextract_eegexy5s/
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── XHAmazingLoading/
│ ├── Animations/
│ │ ├── XHAmazingLoadingMusicsAnimation.h
│ │ ├── XHAmazingLoadingMusicsAnimation.m
│ │ ├── XHAmazingLoadingSkypeAnimation.h
│ │ ├── XHAmazingLoadingSkypeAnimation.m
│ │ ├── XHAmazingLoadingStarAnimation.h
│ │ └── XHAmazingLoadingStarAnimation.m
│ ├── Helpers/
│ │ ├── XHLayerHelper.h
│ │ └── XHLayerHelper.m
│ ├── Protocol/
│ │ └── XHAmazingLoadingAnimationProtocol.h
│ └── View/
│ ├── XHAmazingLoadingView.h
│ └── XHAmazingLoadingView.m
├── XHAmazingLoading.podspec
└── XHAmazingLoadingExample/
├── XHAmazingLoadingExample/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── BaseAnimationViewController.h
│ ├── BaseAnimationViewController.m
│ ├── DemoItem.h
│ ├── DemoItem.m
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── MusicsAnimationExample.h
│ ├── MusicsAnimationExample.m
│ ├── RootTableViewController.h
│ ├── RootTableViewController.m
│ ├── SkypeAnimationExample.h
│ ├── SkypeAnimationExample.m
│ ├── StarAnimationExample.h
│ ├── StarAnimationExample.m
│ └── main.m
├── XHAmazingLoadingExample.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── xcshareddata/
│ └── xcschemes/
│ └── XHAmazingLoadingExample.xcscheme
└── XHAmazingLoadingExampleTests/
├── Info.plist
└── XHAmazingLoadingExampleTests.m
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#Pods/
================================================
FILE: .travis.yml
================================================
osx_image: xcode7
language: objective-c
xcode_project: XHAmazingLoadingExample/XHRefreshControlExample.xcodeproj
xcode_schemes: XHAmazingLoadingExample
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Jack
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================

## XHAmazingLoading
XHAmazingLoading indicators or load view based on CAReplicatorLayer class and CoreAnimation, like skype / music.
## Podfile
[CocosPods](http://cocosPods.org) is the recommended method to install XHAmazingLoading, just add the following line to `Podfile`
```
pod 'XHAmazingLoading'
```
and run `pod install`, then you're all done!
## Requirements
* Xcode6 or later
* iOS 6.0+
* ARC
## How to use
```objc
#import "XHAmazingLoadingView.h"
XHAmazingLoadingView *amazingLoadingView = [[XHAmazingLoadingView alloc] initWithType:XHAmazingLoadingAnimationTypeMusic];
amazingLoadingView.loadingTintColor = [UIColor redColor];
amazingLoadingView.backgroundTintColor = [UIColor whiteColor];
amazingLoadingView.frame = self.view.bounds;
[self.view addSubview:amazingLoadingView];
[amazingLoadingView startAnimating];
loading data after that call stopAnimating method.
```
## License
XHAmazingLoading is available under the MIT license, see the LICENSE file for more information.
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingMusicsAnimation.h
================================================
//
// XHAmazingLoadingMusicsAnimation.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "XHAmazingLoadingAnimationProtocol.h"
@interface XHAmazingLoadingMusicsAnimation : NSObject <XHAmazingLoadingAnimationProtocol>
@end
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingMusicsAnimation.m
================================================
//
// XHAmazingLoadingMusicsAnimation.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "XHAmazingLoadingMusicsAnimation.h"
#import "XHLayerHelper.h"
@implementation XHAmazingLoadingMusicsAnimation
- (void)configureAnimationInLayer:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)tintColor {
// 1.我们先初始化CAReplicatorLayer,添加到View的layer上
// 2.再给CAReplicatorLayer添加一个上下移动的矩形layer
// 3.然后根据CAReplicatorLayer的特性,可以进行复制、延迟动画、以什么形式进行复制
// 这个动画的来源:http://www.ios-animations-by-emails.com/posts/2015-march#tutorial
CGRect replicatorLayerFrame = [XHLayerHelper initializerFrameWithSize:size];
CAReplicatorLayer *replicatorLayer = [XHLayerHelper addReplicatorLayerWithFrame:replicatorLayerFrame atLayer:layer];
// 核心代码
[self addAnimationRectangleLayerAtLayer:replicatorLayer withSize:size tintColor:tintColor];
replicatorLayer.instanceCount = 3;
replicatorLayer.instanceTransform = CATransform3DMakeTranslation(20.0, 0.0, .0);
replicatorLayer.instanceDelay = 0.2;
replicatorLayer.masksToBounds = YES;
}
- (void)addAnimationRectangleLayerAtLayer:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)tintColor {
CGFloat width = 8.0;
CGFloat height = 40.0;
CALayer *animationRectangleLayer = [CALayer layer];
animationRectangleLayer.bounds = CGRectMake(0, 0, width, height);
animationRectangleLayer.position = CGPointMake((size.width - 16 - (width * 3)) / 2.0, size.height + 15);
animationRectangleLayer.cornerRadius = 2.0;
animationRectangleLayer.backgroundColor = tintColor.CGColor;
[layer addSublayer:animationRectangleLayer];
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position.y"];
animation.toValue = @(animationRectangleLayer.position.y - 35);
animation.duration = 0.4;
animation.autoreverses = YES;
animation.repeatCount = CGFLOAT_MAX;
[animationRectangleLayer addAnimation:animation forKey:nil];
}
@end
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingSkypeAnimation.h
================================================
//
// XHAmazingLoadingSkypeAnimation.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
#import "XHAmazingLoadingAnimationProtocol.h"
@interface XHAmazingLoadingSkypeAnimation : NSObject <XHAmazingLoadingAnimationProtocol>
@end
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingSkypeAnimation.m
================================================
//
// XHAmazingLoadingSkypeAnimation.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "XHAmazingLoadingSkypeAnimation.h"
@interface XHAmazingLoadingSkypeAnimation ()
@property (nonatomic, assign) CGSize bubbleSize;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, strong) CALayer *layer;
@property (nonatomic, assign) NSTimeInterval timeInterval;
@end
@implementation XHAmazingLoadingSkypeAnimation
- (void)configureAnimationInLayer:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)tintColor {
// 动画效果来源:https://github.com/stefanceriu/SCSkypeActivityIndicatorView
self.layer = layer;
self.size = size;
for (NSUInteger i = 0; i < 5; i++) {
CGFloat x = i * (1.0f / 5);
[self bubbleWithTimingFunction:[CAMediaTimingFunction functionWithControlPoints:0.5f :(0.1f + x) :0.25f :1.0f]
initialScale:1.0f - x
finalScale:0.2f + x
tintColor:tintColor
atLayer:layer];
}
}
- (NSTimeInterval)timeInterval {
return 1.5f;
}
- (CGSize)bubbleSize {
return CGSizeMake(self.size.width / 10.0f, self.size.width / 10.0f);
}
- (CALayer *)bubbleWithTimingFunction:(CAMediaTimingFunction *)timingFunction initialScale:(CGFloat)initialScale finalScale:(CGFloat)finalScale tintColor:(UIColor *)tintColor atLayer:(CALayer *)layer {
CALayer *bubbleLayer = [CALayer layer];
bubbleLayer.frame = CGRectMake(0, 0, self.bubbleSize.width, self.bubbleSize.height);
bubbleLayer.cornerRadius = CGRectGetMidX(bubbleLayer.frame);
bubbleLayer.masksToBounds = YES;
bubbleLayer.backgroundColor = tintColor.CGColor;
[layer addSublayer:bubbleLayer];
CAKeyframeAnimation *pathAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
pathAnimation.duration = self.timeInterval;
pathAnimation.repeatCount = CGFLOAT_MAX;
pathAnimation.timingFunction = timingFunction;
pathAnimation.path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.layer.frame.size.width/2, self.layer.frame.size.height/2)
radius:MIN(self.size.width - bubbleLayer.bounds.size.width, self.size.width - bubbleLayer.bounds.size.height)/2
startAngle:3 * M_PI / 2
endAngle:3 * M_PI / 2 + 2 * M_PI
clockwise:YES].CGPath;
[bubbleLayer addAnimation:pathAnimation forKey:nil];
CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnimation.duration = self.timeInterval;
scaleAnimation.repeatCount = CGFLOAT_MAX;
scaleAnimation.fromValue = @(initialScale);
scaleAnimation.toValue = @(finalScale);
if(initialScale > finalScale) {
scaleAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
} else {
scaleAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
}
[bubbleLayer addAnimation:scaleAnimation forKey:nil];
return bubbleLayer;
}
@end
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingStarAnimation.h
================================================
//
// XHAmazingLoadingStarAnimation.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "XHAmazingLoadingAnimationProtocol.h"
@interface XHAmazingLoadingStarAnimation : NSObject <XHAmazingLoadingAnimationProtocol>
@end
================================================
FILE: XHAmazingLoading/Animations/XHAmazingLoadingStarAnimation.m
================================================
//
// XHAmazingLoadingStarAnimation.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "XHAmazingLoadingStarAnimation.h"
#import "XHLayerHelper.h"
#define kXHAmazingLoadingDuration 4.0f
#define kXHAmazingLoadingDotNumber 29
@implementation XHAmazingLoadingStarAnimation
- (void)configureAnimationInLayer:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)tintColor {
// 这个动画基于这个来源的:http://www.ios-animations-by-emails.com/posts/2015-march#tutorial
CGRect replicatorLayerFrame = [XHLayerHelper initializerFrameWithSize:size];
CAReplicatorLayer *replicatorLayer = [XHLayerHelper addReplicatorLayerWithFrame:replicatorLayerFrame atLayer:layer];
[self addAnimationDotLayerAtLayer:replicatorLayer tintColor:tintColor];
[XHLayerHelper addTextLayerWithText:@"曾宪华" atLayer:replicatorLayer];
// 核心代码
replicatorLayer.instanceCount = kXHAmazingLoadingDotNumber;
replicatorLayer.instanceDelay = kXHAmazingLoadingDuration / kXHAmazingLoadingDotNumber;
replicatorLayer.instanceColor = tintColor.CGColor;
}
- (void)addAnimationDotLayerAtLayer:(CALayer *)layer tintColor:(UIColor *)tintColor {
CALayer *dotLayer = [CALayer layer];
dotLayer.bounds = CGRectMake(0, 0, 10, 10);
dotLayer.backgroundColor = tintColor.CGColor;
dotLayer.cornerRadius = CGRectGetMidX(dotLayer.bounds);
dotLayer.shouldRasterize = YES;
dotLayer.opacity = 0.0;
dotLayer.rasterizationScale = [[UIScreen mainScreen] scale];
[layer addSublayer:dotLayer];
CAKeyframeAnimation *keyframeAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
keyframeAnimation.path = [self initializerStarBezierPath];
keyframeAnimation.duration = 4.0;
keyframeAnimation.repeatCount = CGFLOAT_MAX;
CABasicAnimation *scaleAnim = [CABasicAnimation animationWithKeyPath:@"transform"];
scaleAnim.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
scaleAnim.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.15, 0.15, 1.0)];
scaleAnim.duration = 0.8;
scaleAnim.repeatCount = CGFLOAT_MAX;
CABasicAnimation *opacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
opacityAnimation.duration = 0.1;
opacityAnimation.toValue = @(1.0);
opacityAnimation.fillMode = kCAFillModeForwards;
CAAnimationGroup *animationGrop = [CAAnimationGroup animation];
animationGrop.animations = @[keyframeAnimation, scaleAnim, opacityAnimation];
animationGrop.duration = kXHAmazingLoadingDuration;
animationGrop.repeatCount = CGFLOAT_MAX;
[dotLayer addAnimation:animationGrop forKey:nil];
}
- (CGPathRef)initializerStarBezierPath {
UIBezierPath *starPath = UIBezierPath.bezierPath;
[starPath moveToPoint: CGPointMake(98, 16)];
[starPath addLineToPoint: CGPointMake(129.74, 62.31)];
[starPath addLineToPoint: CGPointMake(183.6, 78.19)];
[starPath addLineToPoint: CGPointMake(149.36, 122.69)];
[starPath addLineToPoint: CGPointMake(150.9, 178.81)];
[starPath addLineToPoint: CGPointMake(98, 160)];
[starPath addLineToPoint: CGPointMake(45.1, 178.81)];
[starPath addLineToPoint: CGPointMake(46.64, 122.69)];
[starPath addLineToPoint: CGPointMake(12.4, 78.19)];
[starPath addLineToPoint: CGPointMake(66.26, 62.31)];
[starPath closePath];
CGAffineTransform transform = CGAffineTransformMakeScale(1.0, 1.0);
CGPathRef path = CGPathCreateCopyByTransformingPath(starPath.CGPath, &transform);
return CFBridgingRetain(CFBridgingRelease(path));
}
@end
================================================
FILE: XHAmazingLoading/Helpers/XHLayerHelper.h
================================================
//
// XHLayerHelper.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface XHLayerHelper : NSObject
+ (void)addTextLayerWithText:(NSString *)text atLayer:(CALayer *)layer;
+ (CAReplicatorLayer *)addReplicatorLayerWithFrame:(CGRect)frame atLayer:(CALayer *)layer;
+ (CGRect)initializerFrameWithSize:(CGSize)size;
@end
================================================
FILE: XHAmazingLoading/Helpers/XHLayerHelper.m
================================================
//
// XHLayerHelper.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "XHLayerHelper.h"
@implementation XHLayerHelper
+ (void)addTextLayerWithText:(NSString *)text atLayer:(CALayer *)layer {
CGRect textRect = CGRectMake(47, 85, 100, 40);
CATextLayer *labelLayer = [[CATextLayer alloc] init];
labelLayer.contentsScale = [[UIScreen mainScreen] scale];
labelLayer.font = (__bridge CFStringRef)@"Arial-ItalicMT";
[labelLayer setFontSize:28];
[labelLayer setFrame:textRect];
[labelLayer setString:text];
[labelLayer setAlignmentMode:kCAAlignmentCenter];
[labelLayer setForegroundColor:[[UIColor blackColor] CGColor]];
[layer addSublayer:labelLayer];
}
+ (CAReplicatorLayer *)addReplicatorLayerWithFrame:(CGRect)frame atLayer:(CALayer *)layer {
CAReplicatorLayer *replicatorLayer = [CAReplicatorLayer layer];
replicatorLayer.frame = frame;
[layer addSublayer:replicatorLayer];
return replicatorLayer;
}
+ (CGRect)initializerFrameWithSize:(CGSize)size {
CGFloat mainHeight = CGRectGetHeight([[UIScreen mainScreen] bounds]);
CGFloat mainWdiht = CGRectGetWidth([[UIScreen mainScreen] bounds]);
CGRect frame = CGRectMake((mainWdiht - size.width) / 2.0,
(mainHeight - size.height) / 2.0,
size.width, size.height);
return frame;
}
@end
================================================
FILE: XHAmazingLoading/Protocol/XHAmazingLoadingAnimationProtocol.h
================================================
//
// XHAmazingLoadingAnimationProtocol.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol XHAmazingLoadingAnimationProtocol <NSObject>
// 抽象协议
- (void)configureAnimationInLayer:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)tintColor;
@end
================================================
FILE: XHAmazingLoading/View/XHAmazingLoadingView.h
================================================
//
// XHAmazingLoadingView.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, XHAmazingLoadingAnimationType) {
XHAmazingLoadingAnimationTypeStar,
XHAmazingLoadingAnimationTypeMusic,
XHAmazingLoadingAnimationTypeSkype,
};
@interface XHAmazingLoadingView : UIView
@property (nonatomic, assign) XHAmazingLoadingAnimationType type;\
@property (nonatomic, strong) UIColor *backgroundTintColor;
@property (nonatomic, strong) UIColor *loadingTintColor;
@property (nonatomic, assign) CGFloat size;
@property (nonatomic, readonly) BOOL animating;
- (id)initWithType:(XHAmazingLoadingAnimationType)type;
- (id)initWithType:(XHAmazingLoadingAnimationType)type
loadingTintColor:(UIColor *)tintColor;
- (id)initWithType:(XHAmazingLoadingAnimationType)type
loadingTintColor:(UIColor *)tintColor
size:(CGFloat)size;
- (void)startAnimating;
- (void)stopAnimating;
@end
================================================
FILE: XHAmazingLoading/View/XHAmazingLoadingView.m
================================================
//
// XHAmazingLoadingView.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "XHAmazingLoadingView.h"
#import "XHAmazingLoadingMusicsAnimation.h"
#import "XHAmazingLoadingStarAnimation.h"
#import "XHAmazingLoadingSkypeAnimation.h"
#define kXHAmazingLoadingDefaultSize 60.0f
#define kXHAmazingLoadingDefaultTintColor [UIColor colorWithRed:0.049 green:0.849 blue:1.000 alpha:1.000]
@interface XHAmazingLoadingView ()
@property (nonatomic, strong) CABasicAnimation *fadeOutAnimation;
@end
@implementation XHAmazingLoadingView
#pragma mark - Life Cycle
- (id)initWithType:(XHAmazingLoadingAnimationType)type {
return [self initWithType:type loadingTintColor:kXHAmazingLoadingDefaultTintColor size:kXHAmazingLoadingDefaultSize];
}
- (id)initWithType:(XHAmazingLoadingAnimationType)type loadingTintColor:(UIColor *)loadingTintColor {
return [self initWithType:type loadingTintColor:loadingTintColor size:kXHAmazingLoadingDefaultSize];
}
- (id)initWithType:(XHAmazingLoadingAnimationType)type loadingTintColor:(UIColor *)loadingTintColor size:(CGFloat)size {
self = [super init];
if (self) {
_type = type;
_size = size;
_loadingTintColor = loadingTintColor;
_backgroundTintColor = [UIColor whiteColor];
}
return self;
}
#pragma mark - Setup Methods
- (void)setupAnimation {
self.layer.sublayers = nil;
id <XHAmazingLoadingAnimationProtocol> animation = [XHAmazingLoadingView amazingLoadingAnimationForAnimationType:self.type];
[self setupAmazingLoadingSizeWithAnimationType:self.type];
// 检验遵守协议的对象是否实现了协议方法
if ([animation respondsToSelector:@selector(configureAnimationInLayer:withSize:tintColor:)]) {
[self setupFadeOutState];
[animation configureAnimationInLayer:self.layer withSize:CGSizeMake(self.size, self.size) tintColor:self.loadingTintColor];
}
}
- (void)setupNormalState {
self.layer.backgroundColor = self.backgroundTintColor.CGColor;
self.layer.speed = 1.0f;
self.layer.opacity = 1.0;
}
- (void)setupFadeOutState {
self.layer.backgroundColor = [UIColor clearColor].CGColor;
self.layer.sublayers = nil;
self.layer.speed = 0.0;
}
- (void)setupAmazingLoadingSizeWithAnimationType:(XHAmazingLoadingAnimationType)type {
switch (type) {
case XHAmazingLoadingAnimationTypeMusic:
self.size = kXHAmazingLoadingDefaultSize;
break;
case XHAmazingLoadingAnimationTypeStar:
self.size = 200;
break;
case XHAmazingLoadingAnimationTypeSkype:
self.size = 150;
break;
default:
break;
}
}
#pragma mark - Public Methods
- (void)startAnimating {
if (_animating) {
return;
}
if (!self.layer.sublayers) {
[self setupAnimation];
}
[self setupNormalState];
_animating = YES;
}
- (void)stopAnimating {
if (!_animating) {
return;
}
[self.layer addAnimation:self.fadeOutAnimation forKey:@"fadeOutAnimation"];
_animating = NO;
}
#pragma mark - Propertys
#pragma mark - Setters
- (void)setBackgroundColor:(UIColor *)backgroundColor {
NSAssert(NO, @"请不要设置View的背景颜色,请使用setBackgroundTintColor:方法");
}
#pragma mark Getters
- (CABasicAnimation *)fadeAnimationWithOpacity:(CGFloat)opacity {
CABasicAnimation *fadeAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
fadeAnimation.beginTime = CACurrentMediaTime();
fadeAnimation.duration = 0.35;
fadeAnimation.toValue = @(opacity);
return fadeAnimation;
}
- (CABasicAnimation *)fadeOutAnimation {
if (!_fadeOutAnimation) {
_fadeOutAnimation = [self fadeAnimationWithOpacity:0.0];
_fadeOutAnimation.delegate = self;
}
return _fadeOutAnimation;
}
+ (id <XHAmazingLoadingAnimationProtocol>)amazingLoadingAnimationForAnimationType:(XHAmazingLoadingAnimationType)type {
switch (type) {
case XHAmazingLoadingAnimationTypeStar:
return [[XHAmazingLoadingStarAnimation alloc] init];
case XHAmazingLoadingAnimationTypeMusic:
return [[XHAmazingLoadingMusicsAnimation alloc] init];
case XHAmazingLoadingAnimationTypeSkype:
return [[XHAmazingLoadingSkypeAnimation alloc] init];
}
return nil;
}
#pragma mark - CAAnimationDelegate
- (void)animationDidStop:(CABasicAnimation *)animation finished:(BOOL)flag {
[self setupFadeOutState];
}
@end
================================================
FILE: XHAmazingLoading.podspec
================================================
Pod::Spec.new do |s|
s.name = "XHAmazingLoading"
s.version = "0.2"
s.summary = "XHAmazingLoading indicators or load view based on CAReplicatorLayer class and CoreAnimation"
s.homepage = "https://github.com/xhzengAIB/XHAmazingLoading"
s.license = "MIT"
s.authors = { "Jack" => "xhzengAIB@gmail.com" }
s.source = { :git => "https://github.com/xhzengAIB/XHAmazingLoading.git", :tag => "0.2" }
s.frameworks = 'Foundation', 'CoreGraphics', 'UIKit'
s.platform = :ios, '6.0'
s.source_files = 'XHAmazingLoading/*/*.{h,m}'
s.requires_arc = true
end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/AppDelegate.h
================================================
//
// AppDelegate.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/AppDelegate.m
================================================
//
// AppDelegate.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// 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.
// 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.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// 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.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// 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.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 com.HUAJIE. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="XHAmazingLoadingExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0At-nw-NWQ">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--Root Table View Controller-->
<scene sceneID="oMb-vX-DFQ">
<objects>
<tableViewController id="4OL-21-Lpp" customClass="RootTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="ADG-vX-RKj">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="wCd-V5-duS">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wCd-V5-duS" id="eG1-oq-bvn">
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="4OL-21-Lpp" id="76o-zI-1nW"/>
<outlet property="delegate" destination="4OL-21-Lpp" id="v5U-9i-UFK"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="HYD-5M-utf"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="KFQ-Pu-neu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1279" y="-93"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="vrx-w9-PUp">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="0At-nw-NWQ" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="v8f-Ww-dGG">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="4OL-21-Lpp" kind="relationship" relationship="rootViewController" id="lCM-kH-VdE"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="O9h-Em-1sD" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="467" y="-93"/>
</scene>
</scenes>
</document>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/BaseAnimationViewController.h
================================================
//
// BaseAnimationViewController.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XHAmazingLoadingView.h"
@interface BaseAnimationViewController : UIViewController
@property (nonatomic, assign) XHAmazingLoadingAnimationType amazingLoadingAnimationType;
@property (nonatomic, strong) UIColor *backgroundTintColor;
@property (nonatomic, strong) UIColor *loadingTintColor;
@property (nonatomic, assign) NSTimeInterval delayTime;
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/BaseAnimationViewController.m
================================================
//
// BaseAnimationViewController.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "BaseAnimationViewController.h"
@interface BaseAnimationViewController ()
@end
@implementation BaseAnimationViewController
- (instancetype)init {
self = [super init];
if (self) {
[self setup];
}
return self;
}
- (void)setup {
self.loadingTintColor = [UIColor redColor];
self.backgroundTintColor = [UIColor whiteColor];
self.delayTime = 2;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor lightGrayColor];
XHAmazingLoadingView *amazingLoadingView = [[XHAmazingLoadingView alloc] initWithType:self.amazingLoadingAnimationType];
amazingLoadingView.loadingTintColor = self.loadingTintColor;
amazingLoadingView.backgroundTintColor = self.backgroundTintColor;
amazingLoadingView.frame = self.view.bounds;
[self.view addSubview:amazingLoadingView];
[amazingLoadingView startAnimating];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.delayTime * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[amazingLoadingView stopAnimating];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[amazingLoadingView startAnimating];
});
});
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/DemoItem.h
================================================
//
// DemoItem.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DemoItem : NSObject
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *className;
+ (instancetype)initalizerWithTitle:(NSString *)title
className:(NSString *)className;
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/DemoItem.m
================================================
//
// DemoItem.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "DemoItem.h"
@implementation DemoItem
+ (instancetype)initalizerWithTitle:(NSString *)title
className:(NSString *)className {
DemoItem *item = [[DemoItem alloc] init];
item.title = title;
item.className = className;
return item;
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>疯狂Loading</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/MusicsAnimationExample.h
================================================
//
// MusicsAnimationExample.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "BaseAnimationViewController.h"
@interface MusicsAnimationExample : BaseAnimationViewController
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/MusicsAnimationExample.m
================================================
//
// MusicsAnimationExample.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "MusicsAnimationExample.h"
@implementation MusicsAnimationExample
- (instancetype)init {
self = [super init];
if (self) {
self.amazingLoadingAnimationType = XHAmazingLoadingAnimationTypeMusic;
}
return self;
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/RootTableViewController.h
================================================
//
// RootTableViewController.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
@interface RootTableViewController : UITableViewController
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/RootTableViewController.m
================================================
//
// RootTableViewController.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "RootTableViewController.h"
#import "DemoItem.h"
#define kRootItems \
@[ \
@{@"title" : @"Skype", @"className" : @"SkypeAnimationExample"}, \
@{@"title" : @"音乐跳动", @"className" : @"MusicsAnimationExample"}, \
@{@"title" : @"星星", @"className" : @"StarAnimationExample"}, \
]
@interface RootTableViewController ()
@property (nonatomic, strong) NSArray *dataSource;
@end
@implementation RootTableViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"疯狂Loading";
NSMutableArray *dataSource = [[NSMutableArray alloc] init];
[kRootItems enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL *stop) {
[dataSource addObject:[DemoItem initalizerWithTitle:obj[@"title"] className:obj[@"className"]]];
}];
self.dataSource = dataSource;
}
#pragma mark - UITableView DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataSource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
DemoItem *item = self.dataSource[indexPath.row];
cell.textLabel.text = item.title;
return cell;
}
#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
DemoItem *item = self.dataSource[indexPath.row];
Class currentClass = NSClassFromString(item.className);
UIViewController *viewController = [[currentClass alloc] init];
viewController.title = item.title;
if (viewController) {
[self.navigationController pushViewController:viewController animated:YES];
}
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/SkypeAnimationExample.h
================================================
//
// SkypeAnimationExample.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "BaseAnimationViewController.h"
@interface SkypeAnimationExample : BaseAnimationViewController
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/SkypeAnimationExample.m
================================================
//
// SkypeAnimationExample.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/8.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "SkypeAnimationExample.h"
@interface SkypeAnimationExample ()
@end
@implementation SkypeAnimationExample
- (instancetype)init {
self = [super init];
if (self) {
self.amazingLoadingAnimationType = XHAmazingLoadingAnimationTypeSkype;
self.loadingTintColor = [UIColor whiteColor];
self.backgroundTintColor = [UIColor colorWithRed:0.108 green:0.658 blue:0.906 alpha:1.000];
}
return self;
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/StarAnimationExample.h
================================================
//
// StarAnimationExample.h
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "BaseAnimationViewController.h"
@interface StarAnimationExample : BaseAnimationViewController
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/StarAnimationExample.m
================================================
//
// StarAnimationExample.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import "StarAnimationExample.h"
#import "XHAmazingLoadingView.h"
@implementation StarAnimationExample
- (instancetype)init {
self = [super init];
if (self) {
self.amazingLoadingAnimationType = XHAmazingLoadingAnimationTypeStar;
self.delayTime = 4;
}
return self;
}
@end
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample/main.m
================================================
//
// main.m
// XHAmazingLoadingExample
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
E46759161B4A559100BBA51E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759151B4A559100BBA51E /* main.m */; };
E46759191B4A559100BBA51E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759181B4A559100BBA51E /* AppDelegate.m */; };
E467591F1B4A559100BBA51E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E467591D1B4A559100BBA51E /* Main.storyboard */; };
E46759211B4A559100BBA51E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E46759201B4A559100BBA51E /* Images.xcassets */; };
E46759241B4A559100BBA51E /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E46759221B4A559100BBA51E /* LaunchScreen.xib */; };
E46759301B4A559100BBA51E /* XHAmazingLoadingExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E467592F1B4A559100BBA51E /* XHAmazingLoadingExampleTests.m */; };
E467594A1B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759441B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.m */; };
E467594B1B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759461B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.m */; };
E467594E1B4A562600BBA51E /* XHAmazingLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = E467594D1B4A562600BBA51E /* XHAmazingLoadingView.m */; };
E46759521B4A578600BBA51E /* XHLayerHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759511B4A578600BBA51E /* XHLayerHelper.m */; };
E46759551B4A598600BBA51E /* RootTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759541B4A598600BBA51E /* RootTableViewController.m */; };
E46759581B4A5A2600BBA51E /* DemoItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E46759571B4A5A2600BBA51E /* DemoItem.m */; };
E467595B1B4A5A9600BBA51E /* MusicsAnimationExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E467595A1B4A5A9600BBA51E /* MusicsAnimationExample.m */; };
E467595E1B4A5AA300BBA51E /* StarAnimationExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E467595D1B4A5AA300BBA51E /* StarAnimationExample.m */; };
E4EABE131B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = E4EABE121B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.m */; };
E4EABE161B4D216600408810 /* BaseAnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E4EABE151B4D216600408810 /* BaseAnimationViewController.m */; };
E4EABE191B4D219E00408810 /* SkypeAnimationExample.m in Sources */ = {isa = PBXBuildFile; fileRef = E4EABE181B4D219E00408810 /* SkypeAnimationExample.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
E467592A1B4A559100BBA51E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = E46759081B4A559100BBA51E /* Project object */;
proxyType = 1;
remoteGlobalIDString = E467590F1B4A559100BBA51E;
remoteInfo = XHAmazingLoadingExample;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
E46759101B4A559100BBA51E /* XHAmazingLoadingExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XHAmazingLoadingExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
E46759141B4A559100BBA51E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E46759151B4A559100BBA51E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
E46759171B4A559100BBA51E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
E46759181B4A559100BBA51E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
E467591E1B4A559100BBA51E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
E46759201B4A559100BBA51E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
E46759231B4A559100BBA51E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
E46759291B4A559100BBA51E /* XHAmazingLoadingExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XHAmazingLoadingExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E467592E1B4A559100BBA51E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E467592F1B4A559100BBA51E /* XHAmazingLoadingExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XHAmazingLoadingExampleTests.m; sourceTree = "<group>"; };
E46759431B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHAmazingLoadingMusicsAnimation.h; sourceTree = "<group>"; };
E46759441B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHAmazingLoadingMusicsAnimation.m; sourceTree = "<group>"; };
E46759451B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHAmazingLoadingStarAnimation.h; sourceTree = "<group>"; };
E46759461B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHAmazingLoadingStarAnimation.m; sourceTree = "<group>"; };
E46759481B4A561A00BBA51E /* XHAmazingLoadingAnimationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHAmazingLoadingAnimationProtocol.h; sourceTree = "<group>"; };
E467594C1B4A562600BBA51E /* XHAmazingLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHAmazingLoadingView.h; sourceTree = "<group>"; };
E467594D1B4A562600BBA51E /* XHAmazingLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHAmazingLoadingView.m; sourceTree = "<group>"; };
E46759501B4A578600BBA51E /* XHLayerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHLayerHelper.h; sourceTree = "<group>"; };
E46759511B4A578600BBA51E /* XHLayerHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHLayerHelper.m; sourceTree = "<group>"; };
E46759531B4A598600BBA51E /* RootTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootTableViewController.h; sourceTree = "<group>"; };
E46759541B4A598600BBA51E /* RootTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootTableViewController.m; sourceTree = "<group>"; };
E46759561B4A5A2600BBA51E /* DemoItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoItem.h; sourceTree = "<group>"; };
E46759571B4A5A2600BBA51E /* DemoItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoItem.m; sourceTree = "<group>"; };
E46759591B4A5A9600BBA51E /* MusicsAnimationExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MusicsAnimationExample.h; sourceTree = "<group>"; };
E467595A1B4A5A9600BBA51E /* MusicsAnimationExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MusicsAnimationExample.m; sourceTree = "<group>"; };
E467595C1B4A5AA300BBA51E /* StarAnimationExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StarAnimationExample.h; sourceTree = "<group>"; };
E467595D1B4A5AA300BBA51E /* StarAnimationExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StarAnimationExample.m; sourceTree = "<group>"; };
E4EABE111B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XHAmazingLoadingSkypeAnimation.h; sourceTree = "<group>"; };
E4EABE121B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XHAmazingLoadingSkypeAnimation.m; sourceTree = "<group>"; };
E4EABE141B4D216600408810 /* BaseAnimationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseAnimationViewController.h; sourceTree = "<group>"; };
E4EABE151B4D216600408810 /* BaseAnimationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseAnimationViewController.m; sourceTree = "<group>"; };
E4EABE171B4D219E00408810 /* SkypeAnimationExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkypeAnimationExample.h; sourceTree = "<group>"; };
E4EABE181B4D219E00408810 /* SkypeAnimationExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SkypeAnimationExample.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
E467590D1B4A559100BBA51E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
E46759261B4A559100BBA51E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
E46759071B4A559100BBA51E = {
isa = PBXGroup;
children = (
E46759411B4A561A00BBA51E /* XHAmazingLoading */,
E46759121B4A559100BBA51E /* XHAmazingLoadingExample */,
E467592C1B4A559100BBA51E /* XHAmazingLoadingExampleTests */,
E46759111B4A559100BBA51E /* Products */,
);
sourceTree = "<group>";
};
E46759111B4A559100BBA51E /* Products */ = {
isa = PBXGroup;
children = (
E46759101B4A559100BBA51E /* XHAmazingLoadingExample.app */,
E46759291B4A559100BBA51E /* XHAmazingLoadingExampleTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
E46759121B4A559100BBA51E /* XHAmazingLoadingExample */ = {
isa = PBXGroup;
children = (
E46759171B4A559100BBA51E /* AppDelegate.h */,
E46759181B4A559100BBA51E /* AppDelegate.m */,
E46759561B4A5A2600BBA51E /* DemoItem.h */,
E46759571B4A5A2600BBA51E /* DemoItem.m */,
E46759531B4A598600BBA51E /* RootTableViewController.h */,
E46759541B4A598600BBA51E /* RootTableViewController.m */,
E4EABE141B4D216600408810 /* BaseAnimationViewController.h */,
E4EABE151B4D216600408810 /* BaseAnimationViewController.m */,
E46759591B4A5A9600BBA51E /* MusicsAnimationExample.h */,
E467595A1B4A5A9600BBA51E /* MusicsAnimationExample.m */,
E467595C1B4A5AA300BBA51E /* StarAnimationExample.h */,
E467595D1B4A5AA300BBA51E /* StarAnimationExample.m */,
E4EABE171B4D219E00408810 /* SkypeAnimationExample.h */,
E4EABE181B4D219E00408810 /* SkypeAnimationExample.m */,
E467591D1B4A559100BBA51E /* Main.storyboard */,
E46759201B4A559100BBA51E /* Images.xcassets */,
E46759221B4A559100BBA51E /* LaunchScreen.xib */,
E46759131B4A559100BBA51E /* Supporting Files */,
);
path = XHAmazingLoadingExample;
sourceTree = "<group>";
};
E46759131B4A559100BBA51E /* Supporting Files */ = {
isa = PBXGroup;
children = (
E46759141B4A559100BBA51E /* Info.plist */,
E46759151B4A559100BBA51E /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
E467592C1B4A559100BBA51E /* XHAmazingLoadingExampleTests */ = {
isa = PBXGroup;
children = (
E467592F1B4A559100BBA51E /* XHAmazingLoadingExampleTests.m */,
E467592D1B4A559100BBA51E /* Supporting Files */,
);
path = XHAmazingLoadingExampleTests;
sourceTree = "<group>";
};
E467592D1B4A559100BBA51E /* Supporting Files */ = {
isa = PBXGroup;
children = (
E467592E1B4A559100BBA51E /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
E46759411B4A561A00BBA51E /* XHAmazingLoading */ = {
isa = PBXGroup;
children = (
E467594F1B4A577300BBA51E /* Helpers */,
E46759421B4A561A00BBA51E /* Animations */,
E46759471B4A561A00BBA51E /* Protocol */,
E46759491B4A561A00BBA51E /* View */,
);
name = XHAmazingLoading;
path = ../XHAmazingLoading;
sourceTree = "<group>";
};
E46759421B4A561A00BBA51E /* Animations */ = {
isa = PBXGroup;
children = (
E46759431B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.h */,
E46759441B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.m */,
E46759451B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.h */,
E46759461B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.m */,
E4EABE111B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.h */,
E4EABE121B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.m */,
);
path = Animations;
sourceTree = "<group>";
};
E46759471B4A561A00BBA51E /* Protocol */ = {
isa = PBXGroup;
children = (
E46759481B4A561A00BBA51E /* XHAmazingLoadingAnimationProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
};
E46759491B4A561A00BBA51E /* View */ = {
isa = PBXGroup;
children = (
E467594C1B4A562600BBA51E /* XHAmazingLoadingView.h */,
E467594D1B4A562600BBA51E /* XHAmazingLoadingView.m */,
);
path = View;
sourceTree = "<group>";
};
E467594F1B4A577300BBA51E /* Helpers */ = {
isa = PBXGroup;
children = (
E46759501B4A578600BBA51E /* XHLayerHelper.h */,
E46759511B4A578600BBA51E /* XHLayerHelper.m */,
);
path = Helpers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
E467590F1B4A559100BBA51E /* XHAmazingLoadingExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = E46759331B4A559100BBA51E /* Build configuration list for PBXNativeTarget "XHAmazingLoadingExample" */;
buildPhases = (
E467590C1B4A559100BBA51E /* Sources */,
E467590D1B4A559100BBA51E /* Frameworks */,
E467590E1B4A559100BBA51E /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = XHAmazingLoadingExample;
productName = XHAmazingLoadingExample;
productReference = E46759101B4A559100BBA51E /* XHAmazingLoadingExample.app */;
productType = "com.apple.product-type.application";
};
E46759281B4A559100BBA51E /* XHAmazingLoadingExampleTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = E46759361B4A559100BBA51E /* Build configuration list for PBXNativeTarget "XHAmazingLoadingExampleTests" */;
buildPhases = (
E46759251B4A559100BBA51E /* Sources */,
E46759261B4A559100BBA51E /* Frameworks */,
E46759271B4A559100BBA51E /* Resources */,
);
buildRules = (
);
dependencies = (
E467592B1B4A559100BBA51E /* PBXTargetDependency */,
);
name = XHAmazingLoadingExampleTests;
productName = XHAmazingLoadingExampleTests;
productReference = E46759291B4A559100BBA51E /* XHAmazingLoadingExampleTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
E46759081B4A559100BBA51E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0640;
ORGANIZATIONNAME = com.HUAJIE;
TargetAttributes = {
E467590F1B4A559100BBA51E = {
CreatedOnToolsVersion = 6.4;
};
E46759281B4A559100BBA51E = {
CreatedOnToolsVersion = 6.4;
TestTargetID = E467590F1B4A559100BBA51E;
};
};
};
buildConfigurationList = E467590B1B4A559100BBA51E /* Build configuration list for PBXProject "XHAmazingLoadingExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = E46759071B4A559100BBA51E;
productRefGroup = E46759111B4A559100BBA51E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
E467590F1B4A559100BBA51E /* XHAmazingLoadingExample */,
E46759281B4A559100BBA51E /* XHAmazingLoadingExampleTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
E467590E1B4A559100BBA51E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E467591F1B4A559100BBA51E /* Main.storyboard in Resources */,
E46759241B4A559100BBA51E /* LaunchScreen.xib in Resources */,
E46759211B4A559100BBA51E /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E46759271B4A559100BBA51E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
E467590C1B4A559100BBA51E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E467594B1B4A561A00BBA51E /* XHAmazingLoadingStarAnimation.m in Sources */,
E467595E1B4A5AA300BBA51E /* StarAnimationExample.m in Sources */,
E46759581B4A5A2600BBA51E /* DemoItem.m in Sources */,
E4EABE191B4D219E00408810 /* SkypeAnimationExample.m in Sources */,
E46759521B4A578600BBA51E /* XHLayerHelper.m in Sources */,
E46759191B4A559100BBA51E /* AppDelegate.m in Sources */,
E46759161B4A559100BBA51E /* main.m in Sources */,
E4EABE131B4D1B2900408810 /* XHAmazingLoadingSkypeAnimation.m in Sources */,
E467595B1B4A5A9600BBA51E /* MusicsAnimationExample.m in Sources */,
E467594A1B4A561A00BBA51E /* XHAmazingLoadingMusicsAnimation.m in Sources */,
E46759551B4A598600BBA51E /* RootTableViewController.m in Sources */,
E4EABE161B4D216600408810 /* BaseAnimationViewController.m in Sources */,
E467594E1B4A562600BBA51E /* XHAmazingLoadingView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E46759251B4A559100BBA51E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E46759301B4A559100BBA51E /* XHAmazingLoadingExampleTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
E467592B1B4A559100BBA51E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = E467590F1B4A559100BBA51E /* XHAmazingLoadingExample */;
targetProxy = E467592A1B4A559100BBA51E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
E467591D1B4A559100BBA51E /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
E467591E1B4A559100BBA51E /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
E46759221B4A559100BBA51E /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
E46759231B4A559100BBA51E /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
E46759311B4A559100BBA51E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
E46759321B4A559100BBA51E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
E46759341B4A559100BBA51E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = XHAmazingLoadingExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.HUAJIE.XHAmazingLoadingExample;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
E46759351B4A559100BBA51E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = XHAmazingLoadingExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.HUAJIE.XHAmazingLoadingExample;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
E46759371B4A559100BBA51E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = XHAmazingLoadingExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XHAmazingLoadingExample.app/XHAmazingLoadingExample";
};
name = Debug;
};
E46759381B4A559100BBA51E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = XHAmazingLoadingExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XHAmazingLoadingExample.app/XHAmazingLoadingExample";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
E467590B1B4A559100BBA51E /* Build configuration list for PBXProject "XHAmazingLoadingExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E46759311B4A559100BBA51E /* Debug */,
E46759321B4A559100BBA51E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E46759331B4A559100BBA51E /* Build configuration list for PBXNativeTarget "XHAmazingLoadingExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E46759341B4A559100BBA51E /* Debug */,
E46759351B4A559100BBA51E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E46759361B4A559100BBA51E /* Build configuration list for PBXNativeTarget "XHAmazingLoadingExampleTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E46759371B4A559100BBA51E /* Debug */,
E46759381B4A559100BBA51E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = E46759081B4A559100BBA51E /* Project object */;
}
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:XHAmazingLoadingExample.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/xcshareddata/xcschemes/XHAmazingLoadingExample.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E467590F1B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExample.app"
BlueprintName = "XHAmazingLoadingExample"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E46759281B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExampleTests.xctest"
BlueprintName = "XHAmazingLoadingExampleTests"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E46759281B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExampleTests.xctest"
BlueprintName = "XHAmazingLoadingExampleTests"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E467590F1B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExample.app"
BlueprintName = "XHAmazingLoadingExample"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E467590F1B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExample.app"
BlueprintName = "XHAmazingLoadingExample"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E467590F1B4A559100BBA51E"
BuildableName = "XHAmazingLoadingExample.app"
BlueprintName = "XHAmazingLoadingExample"
ReferencedContainer = "container:XHAmazingLoadingExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExampleTests/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>iOS------------------UI-QQ-543413507-http---www.pailixiu.com-blog---http---www.pailixiu.com-Jack-personal..$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: XHAmazingLoadingExample/XHAmazingLoadingExampleTests/XHAmazingLoadingExampleTests.m
================================================
//
// XHAmazingLoadingExampleTests.m
// XHAmazingLoadingExampleTests
//
// Created by Jack_iMac on 15/7/6.
// Copyright (c) 2015年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@interface XHAmazingLoadingExampleTests : XCTestCase
@end
@implementation XHAmazingLoadingExampleTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
gitextract_eegexy5s/
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── XHAmazingLoading/
│ ├── Animations/
│ │ ├── XHAmazingLoadingMusicsAnimation.h
│ │ ├── XHAmazingLoadingMusicsAnimation.m
│ │ ├── XHAmazingLoadingSkypeAnimation.h
│ │ ├── XHAmazingLoadingSkypeAnimation.m
│ │ ├── XHAmazingLoadingStarAnimation.h
│ │ └── XHAmazingLoadingStarAnimation.m
│ ├── Helpers/
│ │ ├── XHLayerHelper.h
│ │ └── XHLayerHelper.m
│ ├── Protocol/
│ │ └── XHAmazingLoadingAnimationProtocol.h
│ └── View/
│ ├── XHAmazingLoadingView.h
│ └── XHAmazingLoadingView.m
├── XHAmazingLoading.podspec
└── XHAmazingLoadingExample/
├── XHAmazingLoadingExample/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── BaseAnimationViewController.h
│ ├── BaseAnimationViewController.m
│ ├── DemoItem.h
│ ├── DemoItem.m
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── MusicsAnimationExample.h
│ ├── MusicsAnimationExample.m
│ ├── RootTableViewController.h
│ ├── RootTableViewController.m
│ ├── SkypeAnimationExample.h
│ ├── SkypeAnimationExample.m
│ ├── StarAnimationExample.h
│ ├── StarAnimationExample.m
│ └── main.m
├── XHAmazingLoadingExample.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── xcshareddata/
│ └── xcschemes/
│ └── XHAmazingLoadingExample.xcscheme
└── XHAmazingLoadingExampleTests/
├── Info.plist
└── XHAmazingLoadingExampleTests.m
SYMBOL INDEX (1 symbols across 1 files)
FILE: XHAmazingLoading/View/XHAmazingLoadingView.h
type XHAmazingLoadingAnimationTypeStar (line 11) | typedef NS_ENUM(NSUInteger, XHAmazingLoadingAnimationType) {
Condensed preview — 40 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (88K chars).
[
{
"path": ".gitignore",
"chars": 494,
"preview": "# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!defau"
},
{
"path": ".travis.yml",
"chars": 152,
"preview": "osx_image: xcode7\nlanguage: objective-c\nxcode_project: XHAmazingLoadingExample/XHRefreshControlExample.xcodeproj\nxcode_s"
},
{
"path": "LICENSE",
"chars": 1072,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Jack\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "README.md",
"chars": 1112,
"preview": "\n\n## XHAmazingLoading\nXHA"
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingMusicsAnimation.h",
"chars": 467,
"preview": "//\n// XHAmazingLoadingMusicsAnimation.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyrigh"
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingMusicsAnimation.m",
"chars": 2164,
"preview": "//\n// XHAmazingLoadingMusicsAnimation.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyrigh"
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingSkypeAnimation.h",
"chars": 441,
"preview": "//\n// XHAmazingLoadingSkypeAnimation.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright"
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingSkypeAnimation.m",
"chars": 3461,
"preview": "//\n// XHAmazingLoadingSkypeAnimation.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright"
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingStarAnimation.h",
"chars": 463,
"preview": "//\n// XHAmazingLoadingStarAnimation.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright "
},
{
"path": "XHAmazingLoading/Animations/XHAmazingLoadingStarAnimation.m",
"chars": 3759,
"preview": "//\n// XHAmazingLoadingStarAnimation.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright "
},
{
"path": "XHAmazingLoading/Helpers/XHLayerHelper.h",
"chars": 563,
"preview": "//\n// XHLayerHelper.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪"
},
{
"path": "XHAmazingLoading/Helpers/XHLayerHelper.m",
"chars": 1561,
"preview": "//\n// XHLayerHelper.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪"
},
{
"path": "XHAmazingLoading/Protocol/XHAmazingLoadingAnimationProtocol.h",
"chars": 501,
"preview": "//\n// XHAmazingLoadingAnimationProtocol.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyri"
},
{
"path": "XHAmazingLoading/View/XHAmazingLoadingView.h",
"chars": 1120,
"preview": "//\n// XHAmazingLoadingView.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年"
},
{
"path": "XHAmazingLoading/View/XHAmazingLoadingView.m",
"chars": 4639,
"preview": "//\n// XHAmazingLoadingView.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年"
},
{
"path": "XHAmazingLoading.podspec",
"chars": 606,
"preview": "Pod::Spec.new do |s|\n s.name = \"XHAmazingLoading\"\n s.version = \"0.2\"\n s.summary = \"XHAmazingLoading"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/AppDelegate.h",
"chars": 388,
"preview": "//\n// AppDelegate.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪华("
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/AppDelegate.m",
"chars": 2142,
"preview": "//\n// AppDelegate.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪华("
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/Base.lproj/LaunchScreen.xib",
"chars": 3719,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/Base.lproj/Main.storyboard",
"chars": 3710,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/BaseAnimationViewController.h",
"chars": 647,
"preview": "//\n// BaseAnimationViewController.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright (c"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/BaseAnimationViewController.m",
"chars": 1721,
"preview": "//\n// BaseAnimationViewController.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright (c"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/DemoItem.h",
"chars": 523,
"preview": "//\n// DemoItem.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪华(@xh"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/DemoItem.m",
"chars": 536,
"preview": "//\n// DemoItem.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪华(@xh"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1077,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/Info.plist",
"chars": 1489,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/MusicsAnimationExample.h",
"chars": 391,
"preview": "//\n// MusicsAnimationExample.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 201"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/MusicsAnimationExample.m",
"chars": 506,
"preview": "//\n// MusicsAnimationExample.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 201"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/RootTableViewController.h",
"chars": 347,
"preview": "//\n// RootTableViewController.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 20"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/RootTableViewController.m",
"chars": 2119,
"preview": "//\n// RootTableViewController.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 20"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/SkypeAnimationExample.h",
"chars": 365,
"preview": "//\n// SkypeAnimationExample.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright (c) 2015"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/SkypeAnimationExample.m",
"chars": 710,
"preview": "//\n// SkypeAnimationExample.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/8.\n// Copyright (c) 2015"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/StarAnimationExample.h",
"chars": 387,
"preview": "//\n// StarAnimationExample.h\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/StarAnimationExample.m",
"chars": 569,
"preview": "//\n// StarAnimationExample.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample/main.m",
"chars": 445,
"preview": "//\n// main.m\n// XHAmazingLoadingExample\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyright (c) 2015年 嗨,我是曾宪华(@xhzeng"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/project.pbxproj",
"chars": 26122,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 168,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:XHAmazingLoadin"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExample.xcodeproj/xcshareddata/xcschemes/XHAmazingLoadingExample.xcscheme",
"chars": 4606,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0640\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExampleTests/Info.plist",
"chars": 845,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "XHAmazingLoadingExample/XHAmazingLoadingExampleTests/XHAmazingLoadingExampleTests.m",
"chars": 1018,
"preview": "//\n// XHAmazingLoadingExampleTests.m\n// XHAmazingLoadingExampleTests\n//\n// Created by Jack_iMac on 15/7/6.\n// Copyri"
}
]
About this extraction
This page contains the full source code of the xhzengAIB/XHAmazingLoading GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 40 files (75.3 KB), approximately 24.0k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.