首页 > 编程语言 > 详细

swift - UIProgressView的用法

时间:2016-07-21 19:20:58      阅读:214      评论:0      收藏:0      [点我收藏+]

1、创建进度条

  progressView.frame = CGRectMake(50, 80, SCREEN_WIDTH - 100, 30)
  progressView.progressViewStyle = UIProgressViewStyle.Default
  progressView.center = self.view.cente、
progressView.progress
= 0.5 //默认进度50% self.view.addSubview(progressView)

2、设置进度,同时又动画效果

 progressView.setProgress(0.8, animated: true)

3、改变进度条的颜色

progressView.progressTintColor = UIColor.redColor()
progressView.trackTintColor = UIColor.greenColor()

 

swift - UIProgressView的用法

原文:http://www.cnblogs.com/hero11223/p/5692664.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!