Displaying and Updating Currency in a UILabel

1 · Andrew Bancroft · June 1, 2019, 4:31 a.m.
Resources Right-click -> Save as… Swift Playground Setup 1import UIKit 2import PlaygroundSupport 3 4class MyViewController : UIViewController { 5 6 var currencyLabel = UILabel() 7 override func loadView() { 8 let view = UIView() 9 view.backgroundColor = .white 10 11 currencyLabel.frame = CGRect(x: 150, y: 200, width: 200, height: 20) 12 currencyLabel.text = "$0.00" 13 currencyLabel.textColor = .black 14 15 view.addSubview(currencyLabel) 16 self....