源代码地址:http://url.cn/PSQqVB
效果图:
工程图:
注意此代码要加入第三方库ETActivityIndicatorView。
RootViewController.m
//点击任何处,弹出提示 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { etActivity = [[ETActivityIndicatorView alloc] initWithFrame:CGRectMake(120, 150, 60, 60)]; etActivity.color = [UIColor blueColor]; [etActivity startAnimating]; [self.view addSubview:etActivity]; }