Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#swtws
final class HogeViewController: UIViewContoller {
override func viewDidLoad() {
super.viewDidLoad()
let titleLabel = UILabel()
titleLabel.font = UIFont.boldSystemFontOfSize(32)
titleLabel.textAlignment = .center
titleLabel.textColor = .grayColor()
let nextButton = UIButton()
nextButton.setTitle("Next", forState: .Normal)
nextButton.titleLabel?.font = UIFont.systemFontOfSize(13)
view.addSubview(titleLabel)
view.addSubview(nextButton)
titleLabel.snp_makeConstraints {
$0.top.equalToSuperview().offset(64)
$0.center.equalToSuperview()
$0.width.equalTo(100)
}
nextButton.snp_makeConstraints {
$0.bottom.right.equalToSuperview().offset(-16)
$0.width.height.equalTo(44)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.