Skip to content

Instantly share code, notes, and snippets.

@cardoso
Last active July 6, 2020 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardoso/bde9cc1ac83598313e4f2b6cd45c2fbf to your computer and use it in GitHub Desktop.
Save cardoso/bde9cc1ac83598313e4f2b6cd45c2fbf to your computer and use it in GitHub Desktop.
import Foundation
extension JoinViewController {
func setupViews() {
setupStudentButton()
setupTeacherButton()
}
func setupStudentButton() {
studentButton.translatesAutoresizingMaskIntoConstraints = false
studentButton.setTitleColor(.systemBlue, for: .normal)
studentButton.setTitle("Student 👨‍🎓", for: .normal)
studentButton.titleLabel?.font = .systemFont(ofSize: 32)
view.addSubview(studentButton)
}
func setupTeacherButton() {
teacherButton.translatesAutoresizingMaskIntoConstraints = false
teacherButton.setTitleColor(.systemBlue, for: .normal)
teacherButton.setTitle("Teacher 👩‍🏫", for: .normal)
teacherButton.titleLabel?.font = .systemFont(ofSize: 32)
view.addSubview(teacherButton)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment