一,效果图。
二,工程图。
三,代码。
#import "ViewController.h"
#import "JQIndicatorView.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib. JQIndicatorView *indicator = [[JQIndicatorView alloc] initWithType:2 tintColor:[UIColor redColor]];
indicator.center = self.view.center;
[self.view addSubview:indicator];
[indicator startAnimating]; }