Latest 0.0.7
Homepage https://github.com/daront/DTImageScrollView
License MIT
Platforms ios 8.0
Dependencies AlamofireImage
Authors

Badge w/ Version
License
Platform

An easy way to display multiple network images in a standard paging-scrollview style.

DTImageScrollView
DTImageScrollView

Features

  • Display images from specified URLs
  • Custom Placeholder image – while the image is loading
  • Show paging indicator while images are swiped
  • Automatically adjust images to fit the scrollview

System Requirements

iOS 8.0+, Swift 3.0

Installation

CocoaPods

Add into your Podfile.

“`:Podfile
pod "DTImageScrollView"


Then `$ pod install`

## How to use

Drag a new view to your storyboard or interface builder. Change its class to DTImageScrollView.
In `viewDidLoad()`, set the `datasource` and `placeholderImage`.

```swift
self.imageScrollView.datasource = self
self.imageScrollView.placeholderImage = UIImage(named: "placeholder")

Implement 2 datasource functions

func numberOfImages() -> Int {
    return 3
}

func imageURL(index: Int) -> URL {
    return NSURL(string: "http://www.boxzeed.com/wp-content/uploads/2015/09/1.1.3.jpg")!
}

Call show() to reload & display images

self.imageScrollView.show()

See more detail in the demo project

Customizations

You can directly access and modify the scrollview propeties – scrollView pageControl placeholderImage
For example,

self.photosScrollView.pageControl.currentPageIndicatorTintColor = Utility.MAIN_RED_COLOR
self.photosScrollView.pageControl.pageIndicatorTintColor = UIColor.whiteColor()

Author

Daron Tancharoen

License

DTImageScrollView is licensed under the MIT License, please see the LICENSE file.

Latest podspec

{
    "name": "DTImageScrollView",
    "version": "0.0.7",
    "summary": "An easy way to create a swipable set of images with paging indicator.",
    "homepage": "https://github.com/daront/DTImageScrollView",
    "license": "MIT",
    "authors": {
        "Daron Tancharoen": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/daront/DTImageScrollView.git",
        "tag": "0.0.7"
    },
    "source_files": "DTImageScrollView/*.{swift}",
    "exclude_files": "Classes/Exclude",
    "dependencies": {
        "AlamofireImage": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This