Latest 0.0.5
Homepage https://github.com/djangolee/JoGallery
License MIT
Platforms ios 8.0, requires ARC
Authors

License MIT
Build Status
CocoaPods
Support
Language

Example Project

Installation

CocoaPods

  1. Add pod 'JoGallery' to your Podfile.
  2. Run pod install or pod update.
  3. Import JoGallery

Usage

Init

let controller = JoGalleryController()
controller.register(JoGalleryCell.self, forCellWithReuseIdentifier: ...)
controller.delegate = ...
controller.dataSource = ...

Show

controller.present(from: VC, toItem: indexPath)

JoGalleryDataSource

func galleryController(_ galleryController: JoGalleryController, numberOfItemsInSection section: Int) -> Int {
    return ...
}

func galleryController(_ galleryController: JoGalleryController, cellForItemAt indexPath: IndexPath) -> JoGalleryCell{

    let cell = galleryController.dequeueReusableCell(withReuseIdentifier: ...), for: indexPath)
    ...
    return cell
}

JoGalleryDelegate

func presentForTransitioning(in galleryController: JoGalleryController, openAt indexPath: IndexPath) -> JoGalleryLocationAttributes? {
    ...
    return (view, content)
}

func dismissForTransitioning(in galleryController: JoGalleryController, closeAt indexPath: IndexPath) -> JoGalleryLocationAttributes? {
    ...
    return (view, content)
}

func galleryBeginTransforming(in galleryController: JoGalleryController, atIndex indexPath: IndexPath) -> UIView? {
    ...
    return locationView
}

func galleryDidEndTransforming(in galleryController: JoGalleryController, atIndex indexPath: IndexPath, with thresholdValue: CGFloat) -> UIView? {
    ...
    return locationView
}

func gallery(_ galleryController: JoGalleryController, scrolDidDisplay cell: JoGalleryCell, forItemAt indexPath: IndexPath, oldItemFrom oldIndexPath: IndexPath) {
    // scroll to location
    ...
}

Latest podspec

{
    "name": "JoGallery",
    "summary": "A iOS Photos UI components.",
    "version": "0.0.5",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "django": "[email protected]"
    },
    "homepage": "https://github.com/djangolee/JoGallery",
    "source": {
        "git": "https://github.com/djangolee/JoGallery.git",
        "tag": "0.0.5"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/**/*.{swift}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This