LLACircularProgressView 是一个令人愉悦的 iOS7 风格圆形进度条,带有一个停止按钮。
打开包含的 Xcode 项目以查看示例应用程序。
// Initialize the progress view
LLACircularProgressView *circularProgressView = [[LLACircularProgressView alloc] init];
// Optionally set the current progress
circularProgressView.progress = 0.5f;
// Optionally change the tint color
circulerProgressView.tintColor = [UIColor redColor];
// Optionally hook up the stop action
[circularProgressView addTarget:self action:@selector(stop:) forControlEvents:UIControlEventTouchUpInside];
// Add it as a subview
[self.view addSubview:circularProgressView];
...
// Animate progress changes
[circularProgressView setProgress:0.8f animated:YES];
查看 头文件以获取完整文档。
CocoaPods 是推荐安装 LLACircularProgressView 的方法。只需将以下行添加到您的 Podfile
pod 'LLACircularProgressView'
否则,您只需将 LLACircularProgressView.h
和 LLACircularProgressView.m
添加到您的项目中。
LLACircularProgressView 在 iOS6 和 iOS7 上进行了测试并需要 ARC。
Lukas Lipka
LLACircularProgressView 在 MIT 许可证 之下可用。有关更多信息,请参阅 LICENSE 文件。