Skip to content

A UIImageView alternative that allows for animations between contentModes.

License

Notifications You must be signed in to change notification settings

pju-dawn/PBImageView

 
 

Repository files navigation

Forked from patrickbdev/PBImageView v. 1.0.3.

PBImageView

Version Carthage compatible 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 and Carthage.

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

pod "PBImageView"

To install it using Carthage, add the following line to your Cartfile:

github "pju-trifork/PBImageView" == 1.0.4

Then run carthage update command.

Authors

patrickbdev, [email protected]

pju-trifork, [email protected]

License

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

About

A UIImageView alternative that allows for animations between contentModes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 85.6%
  • Ruby 10.3%
  • Objective-C 4.1%