Latest 0.1.2
Homepage https://github.com/smalldu/PhotoBrowserKit
License MIT
Platforms ios 8.0
Dependencies Kingfisher
Authors

CI Status
Version
License
Platform

Introduction

This project is highly imitate from KSPhotoBrowser – an Objective-C project
, I just rewrite some feature use Swift

It’s smart and awesome !

demo

Example

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

Requirements

This library requires iOS 8.0+ and Xcode 8.0+

Installation

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

pod "PhotoBrowserKit"

Usage

var items: [ZYPhotoItem] = []
for i in 0..<urls.count {
  let cell = collectionView.cellForItem(at: IndexPath(row: i, section: 0)) as? PhotoCell
  // big url
  let bigUrl = urls[i].replacingOccurrences(of: "bmiddle", with: "large")
  let item = ZYPhotoItem()
  // imageView
  item.sourceView = cell?.imageView
  item.imageURL = URL(string: bigUrl)
  item.thunbImage = cell?.imageView.image
  items.append(item)
}
let browser = ZYPhotoBrowser(photoItems: items, selectedIndex: indexPath.row)
browser.showFromViewController(self)

Author

smalldu, 363958265@qq.com

License

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

Latest podspec

{
    "name": "PhotoBrowserKit",
    "version": "0.1.2",
    "summary": "A short description of PhotoBrowserKit.",
    "homepage": "https://github.com/smalldu/PhotoBrowserKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "smalldu": "363958265@qq.com"
    },
    "source": {
        "git": "https://github.com/smalldu/PhotoBrowserKit.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PhotoBrowserKit/Classes/**/*",
    "dependencies": {
        "Kingfisher": [
            "~> 3.1.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This