Skip to content

Instantly share code, notes, and snippets.

@hassanvfx
Created September 30, 2019 04:21
Show Gist options
  • Save hassanvfx/8a553db254bf7506a5ab5d76e4ce9be8 to your computer and use it in GitHub Desktop.
Save hassanvfx/8a553db254bf7506a5ab5d76e4ce9be8 to your computer and use it in GitHub Desktop.
import UIKit
import RxDataSources
struct MoviesSection {
var header:String
var items:[Item]
var uniqueId: String = "Trending"
}
extension MoviesSection: AnimatableSectionModelType{
typealias Item = Movie
typealias Identity = String
init(header: String, items: [Item]) {
self.header = header
self.items = items
}
init(original: MoviesSection, items: [Item]) {
self = original
self.items = items
}
var identity: String {
return uniqueId
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment