iOS 应用加载动画

1,331 阅读1分钟

Introduction

This is a loading animation

Gif

the triangle has a rotate anmation,but the gif can't show it…you can run the demo see the effect.

how to use

add GCLoadingLayer in your view,and set the frame,then startAnimation

self.loadingLayer = [GCLoadingLayer layer];
self.loadingLayer.frame = CGRectMake(GCLoadingLayerCenterX, GCLoadingLayerCenterY, 100, 100);
[self.view.layer addSublayer:self.loadingLayer];
[self.loadingLayer startAnimation];