Latest 0.1.0
Homepage https://github.com/shamshiranees/SRInstaImageView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

ScreenShot

ScreenShot
ScreenShot

Example

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

Requirements

Swift 3.0+
Xcode 8.0+

Installation

To install it, simply add the following line to your Podfile:

pod 'SRInstaImageView'

or add SRInstaImageView.swift file into your project directory.

Usage

SRInstaImageView is a subclass of UIImageView which popup a larger imageView on long press and removes it on release(as in instagram).
To use SRInstaImageView change your imageView class to SRInstaImageView.

If your using in CollectionView

Change the class of your image view inside collectionView cell to SRInstaImageView.Then inside cellForItemAt indexPath


 //Pass the image to ImageView
 cell.photoImageView.image = UIImage(named: "(indexPath.row-8)")

 //You should pass the collectionView and the indexPath.
 //Add these 2 line of code inside your cellForItemAt indexPath.
 cell.photoImageView.collectionView = collectionView
 cell.photoImageView.indexPathOFCell = indexPath

If your using in TableView

Change the class of your image view inside tableView cell to SRInstaImageView.Then inside cellForRowAt indexPath


 //Pass the image to ImageView
 cell.photoImageView.image = UIImage(named: "(indexPath.row-8)")

 //You should pass the tableView and the indexPath.
 //Add these 2 line of code inside your cellForRowAt indexPath.
 cell.photoImageView.tableView = tableView
 cell.photoImageView.indexPathOFCell = indexPath

Having any confusion please download the project and run the Example.

Author

[email protected]

License

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

Latest podspec

{
    "name": "SRInstaImageView",
    "version": "0.1.0",
    "summary": "SRInstaImageView is a subclass of UIImageView",
    "description": "TODO: SRInstaImageView is a subclass of UIImageView which popup a larger imageView on long press and removes it on release(as in instagram).",
    "homepage": "https://github.com/shamshiranees/SRInstaImageView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/shamshiranees/SRInstaImageView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SRInstaImageView/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This