iOS 修改UIProgressView的高度,自定义UIProgressView
高仿系统UIProgressView,支持调节高度
初始化
首先去GitHub下载GGProgressView
#import "GGProgressView.h"
//初始化
//高度就是frame设定的高度,自由设置
GGProgressView *progressView=[[GGProgressView alloc]initWithFrame:CGRectMake(10, 100, self.view.bounds.size.width-20, 30)];
//设置
progressView.progressTintColor=[UIColor blueColor];
progressView.trackTintColor=[UIColor redColor];
progressView.progress=0.5;
//添加
[self.view addSubview:progressView];
效果图
//更改样式,圆角
progressView.progressViewStyle=GGProgressViewStyleAllFillet;
效果图
progressView.progressViewStyle=GGProgressViewStyleTrackFillet;
效果图
//设置图片 可以设定填充方式
progressView.progressImage=[UIImage imageNamed:@"111"];
本文介绍了如何在iOS中修改UIProgressView的高度并实现自定义,提供了一款GitHub上的GGProgressView库,支持高度调节,同时展示了使用后的效果。
2859

被折叠的 条评论
为什么被折叠?



