Latest 0.1.7
Homepage https://github.com/nferocious76/NFImageView
License MIT
Platforms ios 10.0
Dependencies Alamofire, AlamofireImage
Authors

[![CI Status](http://img.shields.io/travis/Neil Francis Ramirez Hipona/NFImageView.svg?style=flat)](https://travis-ci.org/Neil Francis Ramirez Hipona/NFImageView)
Version
License
Platform

NFImageView

  • [x] Realtime loading progress.
  • [x] Loading option with progress or spinner.
  • [x] Loading option with blur using thumbnail and a larger image.
  • [x] Prevent loading wrong image when on a table or collection view.
  • [x] Uses CoreGraphics to draw image in context.
  • [x] Supports ‘Content Fill Location’ : ‘.Top, .Left, .Right, .Bottom’

Requirements

  • iOS 10.0+
  • Xcode 8.0

Installation

CocoaPods

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

platform :ios, '10.0'
use_frameworks! # remove this if this will be used in ObjC code.

pod "NFImageView"

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/NFImageView.framework to an iOS project.

github "nferocious76/NFImageView"

Manually

  1. Download and drop /Pod/Classes folder in your project.
  2. Congratulations!

Usage example


// link of images
let thumbnail = "https://scontent.fmnl4-4.fna.fbcdn.net/v/t1.0-9/13529069_10202382982213334_6754953260473113193_n.jpg?oh=28c0f3e751a9177e5ca0afaf23be919e&oe=57F9EEF9"
let largeImage = "https://scontent.fmnl4-4.fna.fbcdn.net/t31.0-8/13584845_10202382982333337_2990050100601729771_o.jpg"

// NFImageView is like a regular UIImageView, you can either subclass a UIImageView in the IB, just set the module to `NFUIKitUtilities` for the IB to read the class.
// create an imageview
let imageview = NFImageView(frame: CGRectMake(0, 0, 100, 100))

// `loadingEnabled` flag is use to force disable any loading that should occur. This will make it load like normal. default to `true`
// imageView.loadingEnabled = false // set this to disable loading.

// set loading type
imageview.loadingType = .Spinner

// loading an image without blur effect.
imageView.setImageFromURLString(largeImage)

// loading an image with blur effect using thumbnail and large image.
imageview.setThumbImageAndLargeImageFromURLString(thumbURLString: thumbnail, largeURLString: largeImage)

// Set image aspect
imageView.contentViewMode = .Fill || .AspectFit || .AspectFill || .OriginalSize

// Set image fill location
imageView.contentViewFill = .Center || .Top || .Left || .Right || .Bottom

Contribute

We would love for you to contribute to NFImageView. See the LICENSE file for more info.

Author

Neil Francis Ramirez Hipona, [email protected]

License

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

Latest podspec

{
    "name": "NFImageView",
    "version": "0.1.7",
    "summary": "'NFImageView' is a subclass of a UIView that acts like a UIImageView. Uses CoreGraphics to draw image.",
    "description": ""NFImageView is a like UIImageView that has loading indicator built within it to indicate that there an active loading of an image. It has an option for loading style. A progress bar or a spinner."",
    "homepage": "https://github.com/nferocious76/NFImageView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Neil Francis Ramirez Hipona": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nferocious76/NFImageView.git",
        "tag": "0.1.7"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "NFImageView/Classes/**/*",
    "dependencies": {
        "Alamofire": [
            "~> 4.4"
        ],
        "AlamofireImage": [
            "~> 3.1"
        ]
    },
    "pushed_with_swift_version": "3.0-GM-CANDIDATE"
}

Pin It on Pinterest

Share This