Latest 1.1.1
Homepage https://github.com/nixzhu/Navi
License MIT
Platforms ios 8.0, requires ARC
Authors


Navi is designed for avatar caching, with style.

The name of Navi from movie Avatar.

Requirements

Swift 3.1, iOS 8.0

  • Swift 2.3, use version 0.5.0
  • Swift 3.0, use version 1.1.0

Usage

  1. Make your User conform Avatar protocol.

    protocol Avatar {
    
        var url: URL? { get }
        var style: AvatarStyle { get }
        var placeholderImage: UIImage? { get }
        var localOriginalImage: UIImage? { get }
        var localStyledImage: UIImage? { get }
    
        func save(originalImage: UIImage, styledImage: UIImage)
    }
  2. And, set avatar for your avatarImageView

    avatarImageView.navi_setAvatar(userAvatar)

Check the demo for more information.

另有中文介绍

Installation

Carthage

github "nixzhu/Navi"

CocoaPods

pod 'Navi'

Contact

NIX @nixzhu

License

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

Latest podspec

{
    "name": "Navi",
    "version": "1.1.1",
    "summary": "Focus on avatar caching.",
    "description": "Navi is designed for avatar caching, with style.",
    "homepage": "https://github.com/nixzhu/Navi",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "nixzhu": "[email protected]"
    },
    "social_media_url": "https://twitter.com/nixzhu",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/nixzhu/Navi.git",
        "tag": "1.1.1"
    },
    "source_files": "Navi/*.swift",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This