Created
January 19, 2018 09:51
-
-
Save Otbivnoe/83f25ba8ed5efb4ccb5b341506ea86ac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
protocol ProfileRoute { | |
func openProfile(for user: User) | |
} | |
extension ProfileRoute where Self: UIViewController { | |
func openProfile(for user: User) { | |
let profileViewController = ProfileViewController(user: user) | |
present(profileViewController, animated: true, completion: nil) | |
} | |
} | |
final class FriendsViewController: UIViewController, ProfileRoute {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment