Created
May 24, 2018 19:44
-
-
Save hitendradeveloper/942df0add0376e91a0a43bc31163b97b to your computer and use it in GitHub Desktop.
Protocol Example - 4 : Protocol Composition : Medium blog
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
import UIKit | |
typealias HSCompositeTableViewDatasourceDelegate = (UITableViewDataSource & UITableViewDelegate) | |
class ContactListViewController: UIViewController { | |
//ContactListViewController implementation | |
} | |
extension ContactListViewController: HSCompositeTableViewDatasourceDelegate { | |
//implementation of methods releated to UITableViewDataSource and UITableViewDelegate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just example of protocol composition - written for the medium blog - Protocol - The power of Swift
https://medium.com/p/45e97f6531f9