Last active
June 14, 2018 21:10
-
-
Save hitendradeveloper/ae4b6ca1a3e6975f30af9198f0f7d26a to your computer and use it in GitHub Desktop.
Protocol Example - 5 : Protocol Composition using new protocol - alternate way : 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 | |
protocol HSCombineTableViewDatasourceDelegate : UITableViewDataSource, UITableViewDelegate { } //empty protocol | |
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 using alternate way - written for the medium blog - Protocol - The power of Swift
https://medium.com/p/45e97f6531f9