enum PhotosDataSourceFactory: PagedDataSourceFactory { case photos(order: GetPhotosRequest.Order) case trending case search(query: String) case collection(identifier: String, curated: Bool) }
data source: var dataSource: PagedDataSource<Photo> Which is set as easily as this: photosViewController.dataSource = PhotosDataSourceFactory.search(query:”summer").dataSource