iOS7 UIProgressView

####iOS7 Programming Cookbook 第一章学习笔记 UIProgressView

####Displaying Progress with UIProgressView

#####ViewController.m

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@interface ViewController ()
//private
@property (nonatomic, strong) UIProgressView *progressView;
@end

@implementation ViewController

- (void)viewDidLoad{

[super viewDidLoad];
//创建progressView
//UIProgressViewStyleBar用于工具栏的风格
self.progressView = [[UIProgressView alloc]
initWithProgressViewStyle:UIProgressViewStyleBar];
self.progressView.center = self.view.center;
//进度
self.progressView.progress = 20.0f / 100.0f;
//显示总进度条
self.progressView.backgroundColor = [UIColor greenColor];
//添加到view
[self.view addSubview:self.progressView];

}

@end

Reference

坚持原创技术分享,您的支持将鼓励我继续创作!
0%