使用 Unsplash Source 和 RxSwift 获取照片
RxUnsplashSource.random(size: UIScreen.mainScreen().bounds.size)
.bindTo(imageView.rx_image)
RxUnsplashSource
.random(
category: .Food,
size: UIScreen.mainScreen().bounds.size
)
.bindTo(imageView.rx_image)
Observable<Int>
.interval(60, scheduler: SerialDispatchQueueScheduler(globalConcurrentQueueQOS: .Default))
.startWith(0)
.flatMap { _ in RxUnsplashSource.random(size: UIScreen.mainScreen().bounds.size) }
.bindTo(imageView.rx_image)
pod "RxUnsplashSource"
muukii,[email protected]
RxUnsplashSource 适用于 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。