Tapptitude Swift is a Xcode library to speed up iOS development for usual scenario. Dispaying a scrollable list with multiple kinds of cells, handling loading more data for you. Support for empty view and reloading data is also present.
CocoaPods is a dependency manager for Cocoa projects. To integrate tapptitude-swift into your Xcode project using CocoaPods, specify it in your Podfile
use_frameworks!
pod 'Tapptitude', :git => 'https://github.com/tapptitude/tapptitude-swift'
- CollectionFeedController
- CollectionCellController
- TableFeedController
- TableCellController
- DataSource
- SectionedDataSource
- GroupedByDataSource
- FilteredDataSource
- SwipeToEditOnCollection
Create Model class and UICollectionViewCell
class MyCell: UICollectionViewCell {
//code
}
class MyClass {
//parameters
}
Create Cell Controller
import Tapptitude
class MyCellController: CollectionCellController<MyClass, MyCell> {
init() {
//create cell with full width and height = 100
super.init(cellSize: CGSize(width: -1, height: 100))
}
override func configureCell(_ cell: MyCell, for content: MyClass, at indexPath: IndexPath) {
//configure your cell with given content
}
}
Setup your ViewController screen with UICollectionView
import Tapptitude
class MyScreenViewController: CollectionFeedController {
override func viewDidLoad() {
super.viewDidLoad()
cellController = MyCellController()
dataSource = DataSource([MyClass()])
}
}
Create Model class and UITableViewCell
class MyCell: UITableViewCell {
//code
}
class MyClass {
//parameters
}
Create Cell Controller
import Tapptitude
class MyCellController: TableCellController<MyClass, MyCell> {
init() {
super.init(rowEstimatedHeight: 44)
}
override func configureCell(_ cell: MyCell, for content: MyClass, at indexPath: IndexPath) {
//configure your cell with given content
}
}
Setup your ViewController screen with UITableView
import Tapptitude
class MyScreenViewController: TableFeedController {
override func viewDidLoad() {
super.viewDidLoad()
cellController = MyCellController()
dataSource = DataSource([MyClass()])
}
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
tapptitude-swift is released under the MIT License.