Skip to content

Instantly share code, notes, and snippets.

@zontan
Created July 9, 2020 19:01
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 zontan/0461f60b9a5545c22f445f4fb0cfe72f to your computer and use it in GitHub Desktop.
Save zontan/0461f60b9a5545c22f445f4fb0cfe72f to your computer and use it in GitHub Desktop.
@IBAction func didTapChat(_ sender: Any) {
let storyboard = UIStoryboard(name: "ChatViewController", bundle: nil)
let chatVC = storyboard.instantiateInitialViewController()!
// Use the popover presentation style for your view controller.
chatVC.modalPresentationStyle = .popover
if let chatVC = chatVC as? ChatViewController {
chatVC.channelName = channelName
chatVC.agoraRtm = agoraRtm
}
// Present the view controller (in a popover).
self.present(chatVC, animated: true) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment