Latest 2.0.4
Homepage https://github.com/magicmon/TWImageBrowser
License MIT
Platforms ios 8.0
Dependencies AlamofireImage, FLAnimatedImage
Authors

Version
License
Platform
Support
Language

A simple image browser.
Add UIImage, URL, GIF type.

Demo

Demo

Demo

Usage

let viewer = TWImageBrowser(frame: self.view.bounds)
viewer.viewPadding = 10.0
viewer.browserType = .normal    // or .banner
viewer.delegate = self
viewer.dataSource = self
viewer.backgroundColor = UIColor.black
self.automaticallyAdjustsScrollViewInsets = false   // precondition
view.addSubview(viewer)

DataSource

func backgroundImage(_ imageBrowser : TWImageBrowser) -> UIImage? {
    return nil
}

func loadObjects(_ imageBrowser : TWImageBrowser) -> [Any]? {
    let imageList: [Any] = []
    imageList.append("image0.jpg")
    imageList.append("image1.jpg")

    return imageList
}

Delegate

func imageBrowserDidScroll(_ imageBrowser : TWImageBrowser) {

}

func imageBrowserDidEndScrollingAnimation(_ imageBrowser : TWImageBrowser) {

}

func imageBrowserDidSingleTap(_ imageBrowser: TWImageBrowser, page: Int) {

}

func imageBrowserDidDoubleTap(_ imageBrowser: TWImageBrowser, page: Int, currentZoomScale: CGFloat) {

}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

TWImageBrowser is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'TWImageBrowser'

If you are using swift2.x version, install it below.

pod 'TWImageBrowser', :branch => 'swift2.3'

Author

magicmon, http://magicmon.tistory.com

License

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

Latest podspec

{
    "name": "TWImageBrowser",
    "version": "2.0.4",
    "summary": "Simple image browser or banner.",
    "description": "Simple image browser or banner. written in swift.",
    "homepage": "https://github.com/magicmon/TWImageBrowser",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "magicmon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/magicmon/TWImageBrowser.git",
        "tag": "2.0.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "TWImageBrowser/Classes/**/*",
    "dependencies": {
        "AlamofireImage": [],
        "FLAnimatedImage": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This