CocoaPods trunk is moving to be read-only. Read more on the blog, there are 7 months to go.

DTImageScrollView 0.0.7

DTImageScrollView 0.0.7

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Daron Tancharoen.



  • By
  • Daron Tancharoen

DTImageScrollView

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

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

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.

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.