swift UIProgressView
发布时间:2020-12-14 06:29:25 所属栏目:百科 来源:网络整理
导读:进度条的使用 //创建进度工具条 myprogressbar = UIProgressView(progressViewStyle:UIProgressViewStyle.Bar) // 设置UIProgressView的宽度。高度用这种方式控制不了,仍然会使用默认高度 myprogressbar.frame = CGRect(x: 0,y: 0,width: v.view.frame.widt
进度条的使用 //创建进度工具条 myprogressbar = UIProgressView(progressViewStyle:UIProgressViewStyle.Bar) // 设置UIProgressView的宽度。高度用这种方式控制不了,仍然会使用默认高度 myprogressbar.frame = CGRect(x: 0,y: 0,width: v.view.frame.width,height: 2) //通过变形改变进度条高度( 横向宽度不变,纵向高度变成默认的1.1倍) myprogressbar.transform = CGAffineTransformMakeScale(1.0,1.1) myprogressbar.progressTintColor = UIColor.greenColor() //已有进度颜色 myprogressbar.trackTintColor = UIColor.blackColor() //剩余进度颜色(即进度槽颜色) v.view.addSubview(myprogressbar) // 设置该进度条的初始进度为0 myprogressbar.progress = 0 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 向Printing.PrintDocument(.Net 2.0)添加页眉和页脚的最简单
- react-native 模仿原生 实现下拉刷新/上拉加载更多(Refres
- c – 函数本地静态函数 – 由lambda初始化的对象,线程安全与
- 无法在启用的cpu上使用SSSE3
- ruby-on-rails – 尝试仅显示重复值
- c# – string.Join奇怪的行为
- Solr 配置文件之core.properties、solr.xml和Config Sets
- configure: error: xml2-config not found. Please check y
- 我可以使用Flex而不使用Flex构建器吗?
- Flex AIR应用GPS定位功能(Android和IOS)