Skip to content

Instantly share code, notes, and snippets.

@gonghao
Created September 10, 2016 16:29
Show Gist options
  • Save gonghao/84f83b22cb3d6ac98bd2881620a69602 to your computer and use it in GitHub Desktop.
Save gonghao/84f83b22cb3d6ac98bd2881620a69602 to your computer and use it in GitHub Desktop.
Customize lazy variable
private lazy var detailLabel:UILabel = {
let label = UILabel()
label.textColor = UIColor.blackColor()
label.font = UIFont(name: “KannadaSangamMN”, size: 14.0)
self.addSubview(label)
return label
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment