Latest 0.1.1
Homepage https://github.com/muukii/RxUnsplashSource
License MIT
Platforms ios 8.0, tvos 9.0, watchos 2.0, requires ARC
Dependencies RxSwift
Authors

CI Status Version License Platform

Get photo form Unsplash Source with RxSwift

Basic Usage

  • Get random photo
RxUnsplashSource.random(size: UIScreen.mainScreen().bounds.size)
    .bindTo(imageView.rx_image)
  • Get random photo from category
RxUnsplashSource
    .random(
        category: .Food,     
        size: UIScreen.mainScreen().bounds.size
    )
    .bindTo(imageView.rx_image)

Advanced Usage

  • Change the image every minute

Observable<Int>
    .interval(60, scheduler: SerialDispatchQueueScheduler(globalConcurrentQueueQOS: .Default))
    .startWith(0)
    .flatMap { _ in RxUnsplashSource.random(size: UIScreen.mainScreen().bounds.size) }
    .bindTo(imageView.rx_image)

Installation

pod "RxUnsplashSource"

Author

muukii, [email protected]

License

RxUnsplashSource is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RxUnsplashSource",
    "version": "0.1.1",
    "summary": "Unsplash Source with RxSwift",
    "description": "Get high resolution image from Unsplash Source with RxSwift",
    "homepage": "https://github.com/muukii/RxUnsplashSource",
    "license": "MIT",
    "authors": {
        "muukii": "[email protected]"
    },
    "source": {
        "git": "https://github.com/muukii/RxUnsplashSource.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/muukii0803",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "source_files": "RxUnsplashSource/*.swift",
    "dependencies": {
        "RxSwift": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This