I am able to get a view with horizontal bar chart with per with the help of UIProgressBar
in a UITableView
,
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));
}
I want to append percentage values next to each of the bars of the graph as follows:
Desired Output
How can we add the progress percentage label at the end of the progress bars like this?