Skip to content

Instantly share code, notes, and snippets.

@cardoso
Last active July 6, 2020 19:07
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/42bf4a77aca6b6efddcad963c6d839ec to your computer and use it in GitHub Desktop.
Save cardoso/42bf4a77aca6b6efddcad963c6d839ec to your computer and use it in GitHub Desktop.
import StreamChat
extension JoinViewController {
func setupHandlers() {
studentButton.addTarget(self, action: #selector(handleStudentButtonPress), for: .touchUpInside)
teacherButton.addTarget(self, action: #selector(handleTeacherButtonPress), for: .touchUpInside)
}
@objc func handleStudentButtonPress() {
let classVC = ClassViewController()
classVC.setupStudent()
navigationController?.pushViewController(classVC, animated: true)
}
@objc func handleTeacherButtonPress() {
let classVC = ClassViewController()
classVC.setupTeacher()
navigationController?.pushViewController(classVC, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment