├── Image
├── 1.gif
└── explain.png
├── README.md
└── XLTieBarLoadingDemo
├── XLTieBarLoading
├── Images
│ ├── 1.png
│ └── 2.png
├── XLTieBarLoading.h
└── XLTieBarLoading.m
├── XLTieBarLoadingDemo.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── MengXianLiang.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── MengXianLiang.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── XLTieBarLoadingDemo.xcscheme
│ └── xcschememanagement.plist
└── XLTieBarLoadingDemo
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── ViewController.h
├── ViewController.m
└── main.m
/Image/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mengxianliang/XLTieBaLoading/d7d78e5f9e357402c0627dffeec576bf79631676/Image/1.gif
--------------------------------------------------------------------------------
/Image/explain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mengxianliang/XLTieBaLoading/d7d78e5f9e357402c0627dffeec576bf79631676/Image/explain.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # XLTieBaLoading
2 |
3 | ### 显示效果
4 |
5 |
6 |
7 | ### 实现原理
8 |
9 |
10 |
11 | 如图所示:第一张图为底图,第二、三张图用于显示波浪效果,在第二张图前添加一个半透明遮罩,这样就得到了带阴影波浪分层的效果;然后在波浪移动时第二张图和第三张图的波浪设置一定的相位差,就得到了最终的效果。
12 |
13 |
14 |
15 | ### 使用方法
16 | * 显示方法:
17 |
18 | ```objc
19 | [XLTieBarLoading showInView:self.view];
20 | ```
21 | * 隐藏方法:
22 |
23 | ```objc
24 | [XLTieBarLoading hideInView:self.view];
25 | ```
26 |
27 | ### 波浪效果的实现原理请参考:[我的博文](http://blog.csdn.net/u013282507/article/details/53121556)
28 |
29 | ### 个人开发过的UI工具集合 [XLUIKit](https://github.com/mengxianliang/XLUIKit)
30 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoading/Images/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mengxianliang/XLTieBaLoading/d7d78e5f9e357402c0627dffeec576bf79631676/XLTieBarLoadingDemo/XLTieBarLoading/Images/1.png
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoading/Images/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mengxianliang/XLTieBaLoading/d7d78e5f9e357402c0627dffeec576bf79631676/XLTieBarLoadingDemo/XLTieBarLoading/Images/2.png
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoading/XLTieBarLoading.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLTieBarLoading.h
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface XLTieBarLoading : UIView
12 |
13 | -(void)show;
14 |
15 | -(void)hide;
16 |
17 | /**
18 | * 显示方法
19 | */
20 | +(void)showInView:(UIView*)view;
21 |
22 | /**
23 | * 隐藏方法
24 | */
25 | +(void)hideInView:(UIView*)view;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoading/XLTieBarLoading.m:
--------------------------------------------------------------------------------
1 | //
2 | // XLTieBarLoading.m
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import "XLTieBarLoading.h"
10 |
11 | @interface XLTieBarLoading ()
12 | {
13 | CADisplayLink *_disPlayLink;
14 | /**
15 | 曲线的振幅
16 | */
17 | CGFloat _waveAmplitude;
18 | /**
19 | 曲线角速度
20 | */
21 | CGFloat _wavePalstance;
22 | /**
23 | 曲线初相
24 | */
25 | CGFloat _waveX;
26 | /**
27 | 曲线偏距
28 | */
29 | CGFloat _waveY;
30 | /**
31 | 曲线移动速度
32 | */
33 | CGFloat _waveMoveSpeed;
34 |
35 | //背景发暗的图片 蓝底白字
36 | UIImageView *_imageView1;
37 |
38 | //前面正常显示的图片 蓝底白字
39 | UIImageView *_imageView2;
40 |
41 | //动画的容器
42 | UIView *_container;
43 | }
44 | @end
45 |
46 | @implementation XLTieBarLoading
47 |
48 | -(instancetype)initWithFrame:(CGRect)frame
49 | {
50 | if (self = [super initWithFrame:frame]) {
51 | [self buildUI];
52 | [self buildData];
53 | }
54 | return self;
55 | }
56 |
57 | -(void)buildUI
58 | {
59 | //画了个圆
60 | _container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
61 | _container.center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);
62 | _container.layer.cornerRadius = _container.bounds.size.width/2.0f;
63 | _container.layer.masksToBounds = true;
64 | [self addSubview:_container];
65 |
66 |
67 |
68 | //底部图片白底蓝字
69 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:_container.bounds];
70 | imageView.image = [UIImage imageNamed:@"1"];
71 | [_container addSubview:imageView];
72 |
73 | //上层图片蓝底白字
74 | _imageView1 = [[UIImageView alloc] initWithFrame:_container.bounds];
75 | _imageView1.image = [UIImage imageNamed:@"2"];
76 | _imageView1.backgroundColor = [UIColor colorWithRed:51/255.0f green:170/255.0f blue:255/255.0f alpha:1];
77 | [_container addSubview:_imageView1];
78 |
79 | UIView *view = [[UIView alloc] initWithFrame:_imageView1.bounds];
80 | view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
81 | [_imageView1 addSubview:view];
82 |
83 |
84 | //下层图片白底蓝字
85 | _imageView2 = [[UIImageView alloc] initWithFrame:_container.bounds];
86 | _imageView2.image = [UIImage imageNamed:@"2"];
87 | _imageView2.backgroundColor = [UIColor colorWithRed:51/255.0f green:170/255.0f blue:255/255.0f alpha:1];
88 | [_container addSubview:_imageView2];
89 | }
90 |
91 | //初始化数据
92 | -(void)buildData
93 | {
94 | //振幅
95 | _waveAmplitude = 3;
96 | //角速度
97 | _wavePalstance = 0.12;
98 | //偏距
99 | _waveY = _container.bounds.size.height;
100 | //初相
101 | _waveX = 0;
102 | //x轴移动速度
103 | _waveMoveSpeed = 0.15;
104 | //y轴偏移量
105 | _waveY = _container.bounds.size.height/2.0f;
106 | //以屏幕刷新速度为周期刷新曲线的位置
107 | _disPlayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateWave)];
108 | [_disPlayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
109 | _disPlayLink.paused = true;
110 | }
111 |
112 | -(void)updateWave
113 | {
114 | _waveX -= _waveMoveSpeed;
115 | [self updateWave1];
116 | [self updateWave2];
117 | }
118 |
119 | -(void)updateWave1
120 | {
121 | //波浪宽度
122 | CGFloat waterWaveWidth = _container.bounds.size.width;
123 | //初始化运动路径
124 | CGMutablePathRef path = CGPathCreateMutable();
125 | //设置起始位置
126 | CGPathMoveToPoint(path, nil, 0, _waveY);
127 | //初始化波浪其实Y为偏距
128 | CGFloat y = _waveY;
129 | //正弦曲线公式为: y=Asin(ωx+φ)+k;
130 | for (float x = 0.0f; x <= waterWaveWidth ; x++) {
131 | y = _waveAmplitude * sin(_wavePalstance * x + _waveX + 1) + _waveY;
132 | CGPathAddLineToPoint(path, nil, x, y);
133 | }
134 | //填充底部颜色
135 | CGPathAddLineToPoint(path, nil, waterWaveWidth, _container.bounds.size.height);
136 | CGPathAddLineToPoint(path, nil, 0, _container.bounds.size.height);
137 | CGPathCloseSubpath(path);
138 | CAShapeLayer *layer = [CAShapeLayer layer];
139 | layer.path = path;
140 | _imageView1.layer.mask = layer;
141 | CGPathRelease(path);
142 | }
143 |
144 | -(void)updateWave2
145 | {
146 | //波浪宽度
147 | CGFloat waterWaveWidth = _container.bounds.size.width;
148 | //初始化运动路径
149 | CGMutablePathRef path = CGPathCreateMutable();
150 | //设置起始位置
151 | CGPathMoveToPoint(path, nil, 0, _waveY);
152 | //初始化波浪其实Y为偏距
153 | CGFloat y = _waveY;
154 | //正弦曲线公式为: y=Asin(ωx+φ)+k;
155 | for (float x = 0.0f; x <= waterWaveWidth ; x++) {
156 | y = _waveAmplitude * sin(_wavePalstance * x + _waveX) + _waveY;
157 | CGPathAddLineToPoint(path, nil, x, y);
158 | }
159 | //添加终点路径、填充底部颜色
160 | CGPathAddLineToPoint(path, nil, waterWaveWidth, _container.bounds.size.height);
161 | CGPathAddLineToPoint(path, nil, 0, _container.bounds.size.height);
162 | CGPathCloseSubpath(path);
163 | CAShapeLayer *layer = [CAShapeLayer layer];
164 | layer.path = path;
165 | _imageView2.layer.mask = layer;
166 | CGPathRelease(path);
167 | }
168 |
169 | #pragma mark -
170 | #pragma mark 显示/隐藏方法
171 |
172 | -(void)show{
173 | _disPlayLink.paused = false;
174 | }
175 |
176 | -(void)hide{
177 | _disPlayLink.paused = true;
178 | }
179 |
180 | +(void)showInView:(UIView *)view{
181 |
182 | XLTieBarLoading *loading = [[XLTieBarLoading alloc] initWithFrame:view.bounds];
183 | [view addSubview:loading];
184 | [loading show];
185 | }
186 |
187 | +(void)hideInView:(UIView *)view{
188 | for (XLTieBarLoading *loading in view.subviews) {
189 | if ([loading isKindOfClass:[XLTieBarLoading class]]) {
190 | [loading hide];
191 | [loading removeFromSuperview];
192 | }
193 | }
194 | }
195 |
196 | -(void)dealloc
197 | {
198 | if (_disPlayLink) {
199 | [_disPlayLink invalidate];
200 | _disPlayLink = nil;
201 | }
202 |
203 | if (_imageView1) {
204 | [_imageView1 removeFromSuperview];
205 | _imageView1 = nil;
206 | }
207 | if (_imageView2) {
208 | [_imageView2 removeFromSuperview];
209 | _imageView2 = nil;
210 | }
211 | }
212 |
213 | @end
214 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5E09E22E1E6EB12F00ABF3E6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E09E22D1E6EB12F00ABF3E6 /* main.m */; };
11 | 5E09E2311E6EB12F00ABF3E6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E09E2301E6EB12F00ABF3E6 /* AppDelegate.m */; };
12 | 5E09E2341E6EB12F00ABF3E6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E09E2331E6EB12F00ABF3E6 /* ViewController.m */; };
13 | 5E09E2371E6EB12F00ABF3E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E09E2351E6EB12F00ABF3E6 /* Main.storyboard */; };
14 | 5E09E2391E6EB12F00ABF3E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E09E2381E6EB12F00ABF3E6 /* Assets.xcassets */; };
15 | 5E09E23C1E6EB12F00ABF3E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E09E23A1E6EB12F00ABF3E6 /* LaunchScreen.storyboard */; };
16 | 5E09E2461E6EB15900ABF3E6 /* XLTieBarLoading.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E09E2451E6EB15900ABF3E6 /* XLTieBarLoading.m */; };
17 | 5E09E24A1E6EB32A00ABF3E6 /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = 5E09E2481E6EB32A00ABF3E6 /* 1.png */; };
18 | 5E09E24B1E6EB32A00ABF3E6 /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = 5E09E2491E6EB32A00ABF3E6 /* 2.png */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | 5E09E2291E6EB12F00ABF3E6 /* XLTieBarLoadingDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XLTieBarLoadingDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 5E09E22D1E6EB12F00ABF3E6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
24 | 5E09E22F1E6EB12F00ABF3E6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
25 | 5E09E2301E6EB12F00ABF3E6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
26 | 5E09E2321E6EB12F00ABF3E6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
27 | 5E09E2331E6EB12F00ABF3E6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
28 | 5E09E2361E6EB12F00ABF3E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
29 | 5E09E2381E6EB12F00ABF3E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
30 | 5E09E23B1E6EB12F00ABF3E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
31 | 5E09E23D1E6EB12F00ABF3E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 5E09E2441E6EB15900ABF3E6 /* XLTieBarLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLTieBarLoading.h; sourceTree = ""; };
33 | 5E09E2451E6EB15900ABF3E6 /* XLTieBarLoading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLTieBarLoading.m; sourceTree = ""; };
34 | 5E09E2481E6EB32A00ABF3E6 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; };
35 | 5E09E2491E6EB32A00ABF3E6 /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 5E09E2261E6EB12F00ABF3E6 /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | );
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | /* End PBXFrameworksBuildPhase section */
47 |
48 | /* Begin PBXGroup section */
49 | 5E09E2201E6EB12F00ABF3E6 = {
50 | isa = PBXGroup;
51 | children = (
52 | 5E09E2431E6EB14900ABF3E6 /* XLTieBarLoading */,
53 | 5E09E22B1E6EB12F00ABF3E6 /* XLTieBarLoadingDemo */,
54 | 5E09E22A1E6EB12F00ABF3E6 /* Products */,
55 | );
56 | sourceTree = "";
57 | };
58 | 5E09E22A1E6EB12F00ABF3E6 /* Products */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 5E09E2291E6EB12F00ABF3E6 /* XLTieBarLoadingDemo.app */,
62 | );
63 | name = Products;
64 | sourceTree = "";
65 | };
66 | 5E09E22B1E6EB12F00ABF3E6 /* XLTieBarLoadingDemo */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 5E09E22F1E6EB12F00ABF3E6 /* AppDelegate.h */,
70 | 5E09E2301E6EB12F00ABF3E6 /* AppDelegate.m */,
71 | 5E09E2321E6EB12F00ABF3E6 /* ViewController.h */,
72 | 5E09E2331E6EB12F00ABF3E6 /* ViewController.m */,
73 | 5E09E2351E6EB12F00ABF3E6 /* Main.storyboard */,
74 | 5E09E2381E6EB12F00ABF3E6 /* Assets.xcassets */,
75 | 5E09E23A1E6EB12F00ABF3E6 /* LaunchScreen.storyboard */,
76 | 5E09E23D1E6EB12F00ABF3E6 /* Info.plist */,
77 | 5E09E22C1E6EB12F00ABF3E6 /* Supporting Files */,
78 | );
79 | path = XLTieBarLoadingDemo;
80 | sourceTree = "";
81 | };
82 | 5E09E22C1E6EB12F00ABF3E6 /* Supporting Files */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 5E09E22D1E6EB12F00ABF3E6 /* main.m */,
86 | );
87 | name = "Supporting Files";
88 | sourceTree = "";
89 | };
90 | 5E09E2431E6EB14900ABF3E6 /* XLTieBarLoading */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 5E09E2471E6EB31800ABF3E6 /* Images */,
94 | 5E09E2441E6EB15900ABF3E6 /* XLTieBarLoading.h */,
95 | 5E09E2451E6EB15900ABF3E6 /* XLTieBarLoading.m */,
96 | );
97 | path = XLTieBarLoading;
98 | sourceTree = "";
99 | };
100 | 5E09E2471E6EB31800ABF3E6 /* Images */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 5E09E2481E6EB32A00ABF3E6 /* 1.png */,
104 | 5E09E2491E6EB32A00ABF3E6 /* 2.png */,
105 | );
106 | path = Images;
107 | sourceTree = "";
108 | };
109 | /* End PBXGroup section */
110 |
111 | /* Begin PBXNativeTarget section */
112 | 5E09E2281E6EB12F00ABF3E6 /* XLTieBarLoadingDemo */ = {
113 | isa = PBXNativeTarget;
114 | buildConfigurationList = 5E09E2401E6EB12F00ABF3E6 /* Build configuration list for PBXNativeTarget "XLTieBarLoadingDemo" */;
115 | buildPhases = (
116 | 5E09E2251E6EB12F00ABF3E6 /* Sources */,
117 | 5E09E2261E6EB12F00ABF3E6 /* Frameworks */,
118 | 5E09E2271E6EB12F00ABF3E6 /* Resources */,
119 | );
120 | buildRules = (
121 | );
122 | dependencies = (
123 | );
124 | name = XLTieBarLoadingDemo;
125 | productName = XLTieBarLoadingDemo;
126 | productReference = 5E09E2291E6EB12F00ABF3E6 /* XLTieBarLoadingDemo.app */;
127 | productType = "com.apple.product-type.application";
128 | };
129 | /* End PBXNativeTarget section */
130 |
131 | /* Begin PBXProject section */
132 | 5E09E2211E6EB12F00ABF3E6 /* Project object */ = {
133 | isa = PBXProject;
134 | attributes = {
135 | LastUpgradeCheck = 0820;
136 | ORGANIZATIONNAME = MengXianLiang;
137 | TargetAttributes = {
138 | 5E09E2281E6EB12F00ABF3E6 = {
139 | CreatedOnToolsVersion = 8.2.1;
140 | DevelopmentTeam = X496RVQDTB;
141 | ProvisioningStyle = Automatic;
142 | };
143 | };
144 | };
145 | buildConfigurationList = 5E09E2241E6EB12F00ABF3E6 /* Build configuration list for PBXProject "XLTieBarLoadingDemo" */;
146 | compatibilityVersion = "Xcode 3.2";
147 | developmentRegion = English;
148 | hasScannedForEncodings = 0;
149 | knownRegions = (
150 | en,
151 | Base,
152 | );
153 | mainGroup = 5E09E2201E6EB12F00ABF3E6;
154 | productRefGroup = 5E09E22A1E6EB12F00ABF3E6 /* Products */;
155 | projectDirPath = "";
156 | projectRoot = "";
157 | targets = (
158 | 5E09E2281E6EB12F00ABF3E6 /* XLTieBarLoadingDemo */,
159 | );
160 | };
161 | /* End PBXProject section */
162 |
163 | /* Begin PBXResourcesBuildPhase section */
164 | 5E09E2271E6EB12F00ABF3E6 /* Resources */ = {
165 | isa = PBXResourcesBuildPhase;
166 | buildActionMask = 2147483647;
167 | files = (
168 | 5E09E23C1E6EB12F00ABF3E6 /* LaunchScreen.storyboard in Resources */,
169 | 5E09E24A1E6EB32A00ABF3E6 /* 1.png in Resources */,
170 | 5E09E24B1E6EB32A00ABF3E6 /* 2.png in Resources */,
171 | 5E09E2391E6EB12F00ABF3E6 /* Assets.xcassets in Resources */,
172 | 5E09E2371E6EB12F00ABF3E6 /* Main.storyboard in Resources */,
173 | );
174 | runOnlyForDeploymentPostprocessing = 0;
175 | };
176 | /* End PBXResourcesBuildPhase section */
177 |
178 | /* Begin PBXSourcesBuildPhase section */
179 | 5E09E2251E6EB12F00ABF3E6 /* Sources */ = {
180 | isa = PBXSourcesBuildPhase;
181 | buildActionMask = 2147483647;
182 | files = (
183 | 5E09E2341E6EB12F00ABF3E6 /* ViewController.m in Sources */,
184 | 5E09E2461E6EB15900ABF3E6 /* XLTieBarLoading.m in Sources */,
185 | 5E09E2311E6EB12F00ABF3E6 /* AppDelegate.m in Sources */,
186 | 5E09E22E1E6EB12F00ABF3E6 /* main.m in Sources */,
187 | );
188 | runOnlyForDeploymentPostprocessing = 0;
189 | };
190 | /* End PBXSourcesBuildPhase section */
191 |
192 | /* Begin PBXVariantGroup section */
193 | 5E09E2351E6EB12F00ABF3E6 /* Main.storyboard */ = {
194 | isa = PBXVariantGroup;
195 | children = (
196 | 5E09E2361E6EB12F00ABF3E6 /* Base */,
197 | );
198 | name = Main.storyboard;
199 | sourceTree = "";
200 | };
201 | 5E09E23A1E6EB12F00ABF3E6 /* LaunchScreen.storyboard */ = {
202 | isa = PBXVariantGroup;
203 | children = (
204 | 5E09E23B1E6EB12F00ABF3E6 /* Base */,
205 | );
206 | name = LaunchScreen.storyboard;
207 | sourceTree = "";
208 | };
209 | /* End PBXVariantGroup section */
210 |
211 | /* Begin XCBuildConfiguration section */
212 | 5E09E23E1E6EB12F00ABF3E6 /* Debug */ = {
213 | isa = XCBuildConfiguration;
214 | buildSettings = {
215 | ALWAYS_SEARCH_USER_PATHS = NO;
216 | CLANG_ANALYZER_NONNULL = YES;
217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
218 | CLANG_CXX_LIBRARY = "libc++";
219 | CLANG_ENABLE_MODULES = YES;
220 | CLANG_ENABLE_OBJC_ARC = YES;
221 | CLANG_WARN_BOOL_CONVERSION = YES;
222 | CLANG_WARN_CONSTANT_CONVERSION = YES;
223 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
224 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
225 | CLANG_WARN_EMPTY_BODY = YES;
226 | CLANG_WARN_ENUM_CONVERSION = YES;
227 | CLANG_WARN_INFINITE_RECURSION = YES;
228 | CLANG_WARN_INT_CONVERSION = YES;
229 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
230 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
231 | CLANG_WARN_UNREACHABLE_CODE = YES;
232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
234 | COPY_PHASE_STRIP = NO;
235 | DEBUG_INFORMATION_FORMAT = dwarf;
236 | ENABLE_STRICT_OBJC_MSGSEND = YES;
237 | ENABLE_TESTABILITY = YES;
238 | GCC_C_LANGUAGE_STANDARD = gnu99;
239 | GCC_DYNAMIC_NO_PIC = NO;
240 | GCC_NO_COMMON_BLOCKS = YES;
241 | GCC_OPTIMIZATION_LEVEL = 0;
242 | GCC_PREPROCESSOR_DEFINITIONS = (
243 | "DEBUG=1",
244 | "$(inherited)",
245 | );
246 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248 | GCC_WARN_UNDECLARED_SELECTOR = YES;
249 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250 | GCC_WARN_UNUSED_FUNCTION = YES;
251 | GCC_WARN_UNUSED_VARIABLE = YES;
252 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
253 | MTL_ENABLE_DEBUG_INFO = YES;
254 | ONLY_ACTIVE_ARCH = YES;
255 | SDKROOT = iphoneos;
256 | };
257 | name = Debug;
258 | };
259 | 5E09E23F1E6EB12F00ABF3E6 /* Release */ = {
260 | isa = XCBuildConfiguration;
261 | buildSettings = {
262 | ALWAYS_SEARCH_USER_PATHS = NO;
263 | CLANG_ANALYZER_NONNULL = YES;
264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
265 | CLANG_CXX_LIBRARY = "libc++";
266 | CLANG_ENABLE_MODULES = YES;
267 | CLANG_ENABLE_OBJC_ARC = YES;
268 | CLANG_WARN_BOOL_CONVERSION = YES;
269 | CLANG_WARN_CONSTANT_CONVERSION = YES;
270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
271 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
272 | CLANG_WARN_EMPTY_BODY = YES;
273 | CLANG_WARN_ENUM_CONVERSION = YES;
274 | CLANG_WARN_INFINITE_RECURSION = YES;
275 | CLANG_WARN_INT_CONVERSION = YES;
276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
277 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
278 | CLANG_WARN_UNREACHABLE_CODE = YES;
279 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
280 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
281 | COPY_PHASE_STRIP = NO;
282 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
283 | ENABLE_NS_ASSERTIONS = NO;
284 | ENABLE_STRICT_OBJC_MSGSEND = YES;
285 | GCC_C_LANGUAGE_STANDARD = gnu99;
286 | GCC_NO_COMMON_BLOCKS = YES;
287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
289 | GCC_WARN_UNDECLARED_SELECTOR = YES;
290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
291 | GCC_WARN_UNUSED_FUNCTION = YES;
292 | GCC_WARN_UNUSED_VARIABLE = YES;
293 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
294 | MTL_ENABLE_DEBUG_INFO = NO;
295 | SDKROOT = iphoneos;
296 | VALIDATE_PRODUCT = YES;
297 | };
298 | name = Release;
299 | };
300 | 5E09E2411E6EB12F00ABF3E6 /* Debug */ = {
301 | isa = XCBuildConfiguration;
302 | buildSettings = {
303 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
304 | DEVELOPMENT_TEAM = X496RVQDTB;
305 | INFOPLIST_FILE = XLTieBarLoadingDemo/Info.plist;
306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
307 | PRODUCT_BUNDLE_IDENTIFIER = mxl.XLTieBarLoadingDemo;
308 | PRODUCT_NAME = "$(TARGET_NAME)";
309 | };
310 | name = Debug;
311 | };
312 | 5E09E2421E6EB12F00ABF3E6 /* Release */ = {
313 | isa = XCBuildConfiguration;
314 | buildSettings = {
315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
316 | DEVELOPMENT_TEAM = X496RVQDTB;
317 | INFOPLIST_FILE = XLTieBarLoadingDemo/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | PRODUCT_BUNDLE_IDENTIFIER = mxl.XLTieBarLoadingDemo;
320 | PRODUCT_NAME = "$(TARGET_NAME)";
321 | };
322 | name = Release;
323 | };
324 | /* End XCBuildConfiguration section */
325 |
326 | /* Begin XCConfigurationList section */
327 | 5E09E2241E6EB12F00ABF3E6 /* Build configuration list for PBXProject "XLTieBarLoadingDemo" */ = {
328 | isa = XCConfigurationList;
329 | buildConfigurations = (
330 | 5E09E23E1E6EB12F00ABF3E6 /* Debug */,
331 | 5E09E23F1E6EB12F00ABF3E6 /* Release */,
332 | );
333 | defaultConfigurationIsVisible = 0;
334 | defaultConfigurationName = Release;
335 | };
336 | 5E09E2401E6EB12F00ABF3E6 /* Build configuration list for PBXNativeTarget "XLTieBarLoadingDemo" */ = {
337 | isa = XCConfigurationList;
338 | buildConfigurations = (
339 | 5E09E2411E6EB12F00ABF3E6 /* Debug */,
340 | 5E09E2421E6EB12F00ABF3E6 /* Release */,
341 | );
342 | defaultConfigurationIsVisible = 0;
343 | };
344 | /* End XCConfigurationList section */
345 | };
346 | rootObject = 5E09E2211E6EB12F00ABF3E6 /* Project object */;
347 | }
348 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/project.xcworkspace/xcuserdata/MengXianLiang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mengxianliang/XLTieBaLoading/d7d78e5f9e357402c0627dffeec576bf79631676/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/project.xcworkspace/xcuserdata/MengXianLiang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcschemes/XLTieBarLoadingDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XLTieBarLoadingDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 5E09E2281E6EB12F00ABF3E6
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "XLTieBarLoading.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 |
21 | [XLTieBarLoading showInView:self.view];
22 |
23 | }
24 |
25 |
26 | - (void)didReceiveMemoryWarning {
27 | [super didReceiveMemoryWarning];
28 | // Dispose of any resources that can be recreated.
29 | }
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/XLTieBarLoadingDemo/XLTieBarLoadingDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // XLTieBarLoadingDemo
4 | //
5 | // Created by MengXianLiang on 2017/3/7.
6 | // Copyright © 2017年 MengXianLiang. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------