Closed Grauju closed 3 years ago
This is just a protocol, you should implement it in your object and pass it to CardSliderViewController, so it will know what it should display.
public protocol CardSliderDataSource: class {
/// CardSliderItem for the card at given index, counting from the top.
func item(for index: Int) -> CardSliderItem
/// Total number of cards.
func numberOfItems() -> Int
}
Please take a look at example project for mo details
Hi, im new to Xcode. And I'm asking me what the DataSource object is.
` guard let dataSource = test as? CardSliderDataSource else { return } let cardSlider = CardSliderViewController.with(dataSource: dataSource)