Skip to content

Instantly share code, notes, and snippets.

@hitendradeveloper
Created May 24, 2018 19:44
Show Gist options
  • Save hitendradeveloper/942df0add0376e91a0a43bc31163b97b to your computer and use it in GitHub Desktop.
Save hitendradeveloper/942df0add0376e91a0a43bc31163b97b to your computer and use it in GitHub Desktop.
Protocol Example - 4 : Protocol Composition : Medium blog
import UIKit
typealias HSCompositeTableViewDatasourceDelegate = (UITableViewDataSource & UITableViewDelegate)
class ContactListViewController: UIViewController {
//ContactListViewController implementation
}
extension ContactListViewController: HSCompositeTableViewDatasourceDelegate {
//implementation of methods releated to UITableViewDataSource and UITableViewDelegate
}
@hitendradeveloper
Copy link
Author

This is just example of protocol composition - written for the medium blog - Protocol - The power of Swift

https://medium.com/p/45e97f6531f9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment