PBImageView 1.0.4

PBImageView 1.0.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Feb 2020
SPMSupports SPM

Maintained by Patrick.



  • By
  • patrickbdev

PBImageView

Version License Platform

A UIImageView alternative that allows for animations between contentModes.

Sample Animation

Usage

The API for PBImageView is exactly the same as a UIImageView. To animate the contentMode just wrap it in a UIView animation block.

let imageView = PBImageView(image: UIImage(named: "pineapple"))
imageView.contentMode = .scaleAspectFill

UIView.animate(withDuration: 1) {
    imageView.contentMode = .scaleAspectFit
}

Storyboard Use

PBImageView subclasses UIView, not UIImageView. To use it in a storyboard place a UIView and set the Class and Module to PBImageView

Storyboard Class/Module

Example

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

Requirements

  • iOS 8
  • Swift 3.0

Installation

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

pod "PBImageView"

Author

patrickbdev, [email protected]

License

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