Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raonivaladares/30a1e90553c9d46fd53f70a6e6cbfa0d to your computer and use it in GitHub Desktop.
Save raonivaladares/30a1e90553c9d46fd53f70a6e6cbfa0d to your computer and use it in GitHub Desktop.
private let topicLabel: UILabel = {
let label = UILabel()
label.text = "Topic"
label.textAlignment = .center //textAlignment count = 1
label.font = label.font.withSize(36)
label.translatesAutoresizingMaskIntoConstraints = false //translatesAutoresizingMaskIntoConstraints count = 1
return label
}()
private let subTopicLabel: UILabel = {
let label = UILabel()
label.text = "subTopic"
label.textAlignment = .center //textAlignment count = 2
label.font = label.font.withSize(20)
label.translatesAutoresizingMaskIntoConstraints = false //translatesAutoresizingMaskIntoConstraints count = 2
return label
}()
private let profileImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "UserProfilePlaceHolder")
imageView.contentMode = .center
imageView.backgroundColor = .blue
imageView.translatesAutoresizingMaskIntoConstraints = false //translatesAutoresizingMaskIntoConstraints count = 2
return imageView
}()
private let miniDescriptionLabel: UILabel = {
let label = UILabel()
label.text = "Lore lore lore ip ip ip Lore lore lore ip ip ip Lore lore lore ip ip ip Lore lore lore ip ip ip Lore lore lore ip ip ip "
label.textAlignment = .center //textAlignment count = 3
label.font = label.font.withSize(18)
label.numberOfLines = 3
label.translatesAutoresizingMaskIntoConstraints = false //translatesAutoresizingMaskIntoConstraints count = 3
return label
}()
private let nextButton: UIButton = {
let button = UIButton()
button.setTitle("next", for: .normal)
button.backgroundColor = .blue
button.addTarget(self, action: #selector(nextButtonActionHandler(_:)), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false //translatesAutoresizingMaskIntoConstraints count = 4
return button
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment