JTMaterialSpinner 是基于material design 的 iOS spinner 视图。
基本用法:
#import#import @interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet JTMaterialSpinner *spinnerView; @end
@implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Customize the line width _spinnerView.circleLayer.lineWidth = 2.0; // Change the color of the line _spinnerView.circleLayer.strokeColor = [UIColor orangeColor].CGColor; } - (void)loadSomething { [_spinnerView beginRefreshing]; [MyService loadSomeData:^(){ [_spinnerView endRefreshing]; }]; }