进度条 UIProgressView 设置背景色及高度
来源:互联网 发布:韶关市始兴县网络问政 编辑:程序博客网 时间:2024/06/05 04:57
iOS6,7均可使用,iOS7下更改进度条高度即可
- CGRect rtTemp = CGRectMake(nSpaceX, nSpaceY * 2, popBgView.frame.size.width - 22 * nSpaceX, 20);
- if (isPad)
- {
- rtTemp.size.height = 30;
- }
- UIProgressView* progressView = [[UIProgressView alloc] initWithFrame:rtTemp];
- progressView.backgroundColor = [UIColor clearColor];
- [progressView setProgress:self.fPercent];
- //更改进度条高度
- progressView.transform = CGAffineTransformMakeScale(1.0f,3.0f);
- UIImage* imgTemp = [UIImage imageNamed:@"progress_off.png"];
- CGFloat width = imgTemp.size.width/2.0;
- CGFloat height = imgTemp.size.height/2.0;
- UIImage *imgTrack = [[UIImage imageNamed:@"progress_off.png"]resizableImageWithCapInsets:UIEdgeInsetsMake(height, width, height, width)];
- UIImage *imgProgress = [[UIImage imageNamed:@"progress_on.png"]resizableImageWithCapInsets:UIEdgeInsetsMake(height, width, height, width)];
- [progressView setProgressImage:imgProgress];
- [progressView setTrackImage:imgTrack];
- [popBgView addSubview:progressView];
- [progressView release];
0 0
- 进度条 UIProgressView 设置背景色及高度
- 进度条 UIProgressView 设置背景色及高度
- MFC对话框设置背景色及透明度
- android背景色及字体色设置
- MFC对话框设置背景色及透明度
- MFC对话框设置背景色及透明度
- MFC对话框设置背景色及透明度
- Eclipse设置护眼背景色及字体
- 进度条前景色和背景色改变
- 设置标题栏背景色,背景色是自定义背景色
- 设置背景色
- 设置对话框背景色
- 设置状态栏背景色
- OPENGL 设置背景色
- 设置Eclipse背景色
- notepad++设置背景色
- SecureCRT设置背景色
- 设置对话框背景色
- Gas Station
- Geohash算法
- Gson使用教程
- Oracle11gR2 安装 OWB 笔记(三)
- 数据结构——第二章线性表导图
- 进度条 UIProgressView 设置背景色及高度
- JQuery基础
- java 学习中的困惑和未来职位方向
- 红黑树系列之一:红黑树的概述
- hdu Acmsteps Moving tables解题报告
- DBA任务---确保统计信息准确性
- 错误代码
- Install the new caffe with support cuDNN library
- 【LeetCode】-Remove Duplicates from Sorted List II