一,效果图。
二,工程图。
三,代码。
class="cnblogs_code_copy" style="font-size: 18px">#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];
}