Skip to content

Instantly share code, notes, and snippets.

@vivek1794
Created December 23, 2018 06:55
Show Gist options
  • Save vivek1794/150c7faa2c6f1f92dad029e8bb2f898b to your computer and use it in GitHub Desktop.
Save vivek1794/150c7faa2c6f1f92dad029e8bb2f898b to your computer and use it in GitHub Desktop.
import UIKit
import shared
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 230, height: 21))
label.center = CGPoint(x: 160, y: 285)
label.textAlignment = .center
label.font = label.font.withSize(16)
//To display multiple lines in label
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.text = LibraryKt.getDate()
view.addSubview(label)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment