Skip to content

Instantly share code, notes, and snippets.

@softauthor
Last active March 12, 2020 23:03
Show Gist options
  • Save softauthor/f1845a2fb1ebff8053d5ac4e71cfeaab to your computer and use it in GitHub Desktop.
Save softauthor/f1845a2fb1ebff8053d5ac4e71cfeaab to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController{
private let latLngLabel: UILabel = {
let label = UILabel()
label.backgroundColor = .systemFill
label.numberOfLines = 0
label.textAlignment = .center
label.font = .systemFont(ofSize: 26)
return label
}()
override func viewDidLoad() {
super.viewDidLoad()
latLngLabel.frame = CGRect(x: 20, y: view.bounds.height - 50, width: view.bounds.width - 40, height: 100)
view.addSubview(latLngLabel)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment