在UIProgressView栏的末尾添加标签

时间:2018-11-13 08:48:05

标签: ios swift uiprogressview

借助UIProgressBarUITableView的帮助,我可以通过per获得水平条形图的视图,

当前输出

Current Output

//TEST DATA:
arrShareNames = ["Infosys","TCS","Reliance","Wipro"]
arrSharepercent = [30,40,21,10]

if let progressView = self.view.viewWithTag(101) as? UIProgressView {
    progressView.progress = 0.0
    progressView.progress =  Float(arrSharepercent[indexPath.row]/100)
    progressView.progressViewStyle = UIProgressViewStyle.bar
    progressView.transform = CGAffineTransform(rotationAngle: CGFloat(-Double.pi));
}

我要在图表的每个条形旁边添加百分比值,如下所示:

所需的输出

Desired Output

我们如何在进度条的末尾添加进度百分比标签?

0 个答案:

没有答案