Skip to content

Instantly share code, notes, and snippets.

@haitham-reda
Created September 19, 2017 13:37
Show Gist options
  • Save haitham-reda/ec5577b0e4069758a585197432c995a6 to your computer and use it in GitHub Desktop.
Save haitham-reda/ec5577b0e4069758a585197432c995a6 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