JBImageViewTransition is for ios on Swift. It's an awesome utility for UIImage transition
JBImageViewTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JBImageViewTransition'
Using Storyboard / Interface Builder
- Drag a UIView to Storyboard or Interface Builder, change its class to JBTransitionView
- Create IBOutlet for JBTransitionView
@IBOutlet weak var imageTransitionView: JBTransitionView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//***** Configure image transition animation *****//
imageTransitionView.setAnimationImages(NSArray(objects: "image1.jpg","image2.jpg","image3.jpg","image4.jpg"))
imageTransitionView.animationFromAllSide = true
imageTransitionView.animationDuration = 3
imageTransitionView.startJNImageAnimation()
}
If you prefer not to use either of the aforementioned dependency managers, you can integrate JBImageViewTransition into your project manually. Drag the JBTransitionView.swift from source folder.
// This variable is used for animation duration
var animationDuration : NSTimeInterval = 2
// This variable is used for animation direction
var animationDirection : AnimationDirection = AnimationDirection.LeftToRight
// This variable is used for setting animation images
var animationImageArray : NSMutableArray = NSMutableArray()
// This variable is used for animation from all direction and variable type is Bool
var animationFromAllSide : Bool = false
Jithin B made this with ❤️.
JBImageViewTransition is available under the MIT license. See the LICENSE file for more info.