Skip to content

jithinpala/JBImageViewTransition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

JBImageViewTransition is for ios on Swift. It's an awesome utility for UIImage transition

Installation

CocoaPods

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

pod 'JBImageViewTransition'

Usage

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()
    }
    

Manually

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.

Attributes you can set

    // 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

Author

Jithin B made this with ❤️.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages