- April 27, 2024
- Mins Read
Read more about latest 11.0 release and integration with SwiftUI!
If you need Xcode 11 support or Swift 4…Swift 5.2, or iOS 8…iOS 10 support, you can use 7.x releases.
Add package into Xcode Project settings -> Swift Packages
pod ‘DTTableViewManager’, ‘~> 11.0.0’
Let’s say you have an array of Posts you want to display in UITableView. To quickly show them using DTTableViewManager, here’s what you need to do:
ModelTransfer
protocol:
class PostCell : UITableViewCell, ModelTransfer {
func update(with model: Post) {
// Fill your cell with actual data
}
}
class PostsViewController: UITableViewController, DTTableViewManageable {
override func viewDidLoad() {
super.viewDidLoad()
// Register PostCell to be used with this controller’s table view
manager.register(PostCell.self)
// Populate datasource
manager.memoryStorage.setItems(posts)
}
}
Make sure your UITableView outlet is wired to your class (or use UITableViewController subclass). If you have a PostCell.xib file, it will be automatically used for dequeueing PostCell.
Of course, cool stuff does not stop there, framework supports all datasource and delegate methods as closures, conditional mappings and much much more! Choose what interests you in the next section of readme.
Horizon SDK is a state of the art real-time video recording / photo shooting iOS library. Some of the features ...