Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui.git into feature/ACT-192-YearInReview
This commit is contained in:
commit
62f4c55a8f
@ -107,15 +107,15 @@ import UIKit
|
||||
// configure attributed string for progress percentage.
|
||||
let attributedString = NSMutableAttributedString(string: String(percent) + "%")
|
||||
// percent value
|
||||
attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontBoldTitleLarge()], range: NSMakeRange(0, percentLen))
|
||||
attributedString.setAttributes([NSAttributedString.Key.font: Styler.Font.BoldTitleXLarge], range: NSMakeRange(0, percentLen))
|
||||
// % symbol
|
||||
attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontBoldBodyLarge()], range: NSMakeRange(percentLen, 1))
|
||||
attributedString.setAttributes([NSAttributedString.Key.font: Styler.Font.RegularMicro], range: NSMakeRange(percentLen, 1))
|
||||
|
||||
// show progress percentage in a text layer
|
||||
let width = viewWidth
|
||||
let height = width
|
||||
labelLayer.string = attributedString
|
||||
labelLayer.frame = CGRectMake((width - CGFloat(percentLen * 20))/2, (height - 30)/2, 60, 30)
|
||||
labelLayer.frame = CGRectMake((width - CGFloat(percentLen * 20))/2, (height - 40)/2, 80, 40)
|
||||
self.layer.addSublayer(labelLayer)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user