Skip to content

Instantly share code, notes, and snippets.

@haitham-reda
Created September 19, 2017 13:37
Show Gist options
  • Save haitham-reda/41fd4e13225788cb63d493c7f8b0ac90 to your computer and use it in GitHub Desktop.
Save haitham-reda/41fd4e13225788cb63d493c7f8b0ac90 to your computer and use it in GitHub Desktop.
homescreen_adapter
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()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment