|
|
@ -30,8 +30,8 @@ struct BalanceViewModel { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var amount: Double { |
|
|
|
var amount: Double { |
|
|
|
guard let balance = balance, let amount = Double(balance.amount) else { return 0.00 } |
|
|
|
guard let balance = balance else { return 0.00 } |
|
|
|
return amount |
|
|
|
return balance.amount.doubleValue |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var amountString: String { |
|
|
|
var amountString: String { |
|
|
@ -75,16 +75,22 @@ struct BalanceViewModel { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var largeLabelAttributed: [String: AnyObject] { |
|
|
|
var largeLabelAttributed: [String: AnyObject] { |
|
|
|
|
|
|
|
let style = NSMutableParagraphStyle() |
|
|
|
|
|
|
|
style.alignment = NSTextAlignment.center |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
NSFontAttributeName: UIFont.systemFont(ofSize: 18, weight: UIFontWeightSemibold), |
|
|
|
NSFontAttributeName: UIFont.systemFont(ofSize: 18, weight: UIFontWeightSemibold), |
|
|
|
NSForegroundColorAttributeName: Colors.lightBlack, |
|
|
|
NSForegroundColorAttributeName: Colors.lightBlack, |
|
|
|
|
|
|
|
NSParagraphStyleAttributeName: style, |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var smallLabelAttributes: [String: AnyObject] { |
|
|
|
var smallLabelAttributes: [String: AnyObject] { |
|
|
|
|
|
|
|
let style = NSMutableParagraphStyle() |
|
|
|
|
|
|
|
style.alignment = NSTextAlignment.center |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
NSFontAttributeName: UIFont.systemFont(ofSize: 13, weight: UIFontWeightRegular), |
|
|
|
NSFontAttributeName: UIFont.systemFont(ofSize: 13, weight: UIFontWeightRegular), |
|
|
|
NSForegroundColorAttributeName: Colors.darkGray, |
|
|
|
NSForegroundColorAttributeName: Colors.darkGray, |
|
|
|
|
|
|
|
NSParagraphStyleAttributeName: style, |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|