Created
January 3, 2020 10:54
-
-
Save Krishna21Soni13/31abbc73c6eb0304de15cb377c255a39 to your computer and use it in GitHub Desktop.
Configure chat list table view.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func configureTableView() { | |
guard let tblChatList = tblChatList else { | |
return | |
} | |
tblChatList.onDidSelect = { [weak self] (user: User) in | |
guard let self = self, | |
let name = self.nickName else { | |
return | |
} | |
let storyboard = UIStoryboard(name: "chat", bundle: nil) | |
guard let chatDetailViewController = storyboard.instantiateViewController(withIdentifier: "ChatDetailViewController") as? ChatDetailViewController else{ | |
return | |
} | |
chatDetailViewController.user = user | |
chatDetailViewController.nickName = name | |
self.navigationController?.pushViewController(chatDetailViewController, animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment