CXTDT-626224

MVA/iOS: Progress section has visual defects that need to be corrected.
issue fixed :- Number size should be: (font-size: 32px / line-height: 36px and “%” symbol size should be: font-size: 11px / line-height: 16px
This commit is contained in:
rajani kumari Gupta 2024-10-17 17:47:24 +05:30
parent f3e97ecfd4
commit eb4f741f1a

View File

@ -107,15 +107,15 @@ import UIKit
// configure attributed string for progress percentage. // configure attributed string for progress percentage.
let attributedString = NSMutableAttributedString(string: String(percent) + "%") let attributedString = NSMutableAttributedString(string: String(percent) + "%")
// percent value // percent value
attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontBoldTitleLarge()], range: NSMakeRange(0, percentLen)) attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontForFeedCardTitle()], range: NSMakeRange(0, percentLen))
// % symbol // % symbol
attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontBoldBodyLarge()], range: NSMakeRange(percentLen, 1)) attributedString.setAttributes([NSAttributedString.Key.font: MFStyler.fontRegularMicro()], range: NSMakeRange(percentLen, 1))
// show progress percentage in a text layer // show progress percentage in a text layer
let width = viewWidth let width = viewWidth
let height = width let height = width
labelLayer.string = attributedString 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) self.layer.addSublayer(labelLayer)
} }