Skip to content

Instantly share code, notes, and snippets.

View haitham-reda's full-sized avatar

Haitham Reda haitham-reda

  • Berlin, Germany
View GitHub Profile
func listAdapter(_: ListAdapter, sectionControllerFor object: Any) -> ListSectionController {
if object is PropertyModel {
return PropertyGallerySectionController()
} else if object is LoadMoreModel {
return LoadMoreSectionController()
} else if object is SectionErrorModel {
return ErrorSectionController()
} else {
return ListSectionController()
}
func listAdapter(_: ListAdapter, sectionControllerFor object: Any) -> ListSectionController {
if object is PropertyModel {
return PropertyGallerySectionController()
} else if object is LoadMoreModel {
return LoadMoreSectionController()
} else if object is SectionErrorModel {
return ErrorSectionController()
} else {
return ListSectionController()
}