iOS--UIProgressView的使用方法详细
2014-11-29 09:55
471 查看
// UIProgressView的使用 常用于歌曲的和下载的进度条
UIProgressView *oneProgressView = [[UIProgressView alloc] init];
oneProgressView.frame = CGRectMake(0, 30, 320, 30); // 设置UIProgressView的位置和大小
oneProgressView.backgroundColor = [UIColor clearColor]; // 设置背景色
oneProgressView.alpha = 1.0; // 设置透明度 范围在0.0-1.0之间 0.0为全透明
oneProgressView.progressTintColor = [UIColor yellowColor]; // 设置已过进度部分的颜色
oneProgressView.trackTintColor = [UIColor blackColor]; // 设置未过进度部分的颜色
oneProgressView.progress = 0.2; // 设置初始值,范围在0.0-1.0之间,默认是0.0
// [oneProgressView setProgress:0.8 animated:YES]; // 设置初始值,可以看到动画效果
[oneProgressView setProgressViewStyle:UIProgressViewStyleDefault]; // 设置显示的样式
// 添加到View上,并释放内存
[self.view addSubview:oneProgressView];
[oneProgressView release], oneProgressView = nil;
UIProgressView *oneProgressView = [[UIProgressView alloc] init];
oneProgressView.frame = CGRectMake(0, 30, 320, 30); // 设置UIProgressView的位置和大小
oneProgressView.backgroundColor = [UIColor clearColor]; // 设置背景色
oneProgressView.alpha = 1.0; // 设置透明度 范围在0.0-1.0之间 0.0为全透明
oneProgressView.progressTintColor = [UIColor yellowColor]; // 设置已过进度部分的颜色
oneProgressView.trackTintColor = [UIColor blackColor]; // 设置未过进度部分的颜色
oneProgressView.progress = 0.2; // 设置初始值,范围在0.0-1.0之间,默认是0.0
// [oneProgressView setProgress:0.8 animated:YES]; // 设置初始值,可以看到动画效果
[oneProgressView setProgressViewStyle:UIProgressViewStyleDefault]; // 设置显示的样式
// 添加到View上,并释放内存
[self.view addSubview:oneProgressView];
[oneProgressView release], oneProgressView = nil;
相关文章推荐
- IOS--UIActivityIndicatorView的使用方法详细
- UIProgressView的使用方法详细
- iOS UISlider, UIProgressView, UIActivityIndicatorView使用方法和监听
- iOS--UIActivityIndicatorView的使用方法详细
- iOS--UIPageControl的使用方法详细
- UIScrollView的基本使用方法和注意事项 - iOS - UI基础知识总结10
- UIProgressView 进度条控件的使用方法
- iOS--UIAlertView的使用方法详细
- iOS 之 UIProgressView 使用详解
- Xamarin.iOS-UICollectionView详细使用说明【控件篇】
- iOS学习笔记—— UIActivityIndicatorView 和 UIProgressView 的使用
- iOS --------UIProgressView的使用
- IOS--UIDatePicker 时间选择器 的使用方法详细
- UIProgressView进度条的详细使用
- iOS--UISegmentedControl的使用方法详细
- IOS--UIAlertView的使用方法详细
- IOS--UIPageControl的使用方法详细
- iOS--UIDatePicker 时间选择器 的使用方法详细
- IOS UIProgressView控件的使用
- iOS系统UIPickerView的简单使用和方法属性介绍