Image View with content mode animations. Inspired by the Objective-C version VICMAImageView.
To run the example project, clone the repo, and run pod install
from the Example directory first.
let imageView = DZImageView(image: UIImage(named: "image.jpg")!, frame: CGRectMake(0, 0, 300, 300))
self.view.addSubview(imageView)
imageView.animationDuration = 0.3 // Optional, Default: 0.3
imageView.animateImageViewContentModeTo(.ScaleAspectFit) // Animate content mode
imageView.animateImageViewFrameTo(CGRectMake(0, 0, 300, 300)) // Animate frame
imageView.animateImageViewTo(.ScaleAspectFit, frame: CGRectMake(0, 0, 300, 300)) // Animate both content mode and frame
- iOS 8.0
- Swift 2
DZImageView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DZImageView"
To install DZImageView with Carthage add the following line to your cartfile
github "Fortyfox/DZImageView" ~> 0.1.1
DZImageView is available under the MIT license. See the LICENSE file for more info.