Skip to content

Instantly share code, notes, and snippets.

@cardoso
Last active July 2, 2020 02:12
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/f43793f739991392d28a67ce399705ab to your computer and use it in GitHub Desktop.
Save cardoso/f43793f739991392d28a67ce399705ab to your computer and use it in GitHub Desktop.
import StreamChat
extension JoinViewController {
func setupHandlers() {
patientButton.addTarget(self, action: #selector(handlePatientButtonPress), for: .touchUpInside)
doctorButton.addTarget(self, action: #selector(handleDoctorButtonPress), for: .touchUpInside)
}
@objc func handlePatientButtonPress() {
let consultVC = ConsultViewController()
consultVC.setupPatient()
navigationController?.pushViewController(consultVC, animated: true)
}
@objc func handleDoctorButtonPress() {
let consultVC = ConsultViewController()
consultVC.setupDoctor()
navigationController?.pushViewController(consultVC, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment