Latest 0.8.2
Homepage https://github.com/sina-kh/Swift-Auto-Image-Flipper
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Swift-Auto-Image-Flipper (v0.8.2)

Show an array of images scequetially, with fade in, move and fade out effects, beautifully; like this:

alt tag

Installation


CocoaPods

use_frameworks!
pod 'AutoImageFlipper'

Manually

Just copy the AutoImageFlipper folder into your project !

Usage


I suggest you to just Open and Try the example project first

    1. Create the view

Create a UIView and set it’s class to AutoImageFlipper
If you are using CocoaPods, then just simply import AutoImageFlipper, too.

    1. Set images

After creating the outlet for your flipper view, just set the images like this

autoImageFlipper.addImage( UIImage(named: "image1")! )
    1. Play Next!

Start the play!

autoImageFlipper.playNext()

Now you should be able to see the beautiful AutoImageFlipper view !

Optional Features


Delegate!

Implement AutoImageFlipperDelegate in your UIViewController and then you can use these methods:

This one will be called when an image is going to fade in

optional func autoImageFlipper(autoImageFlipper: AutoImageFlipper, willPlayImage: UIImage, onImageView: UIImageView)

This one will be called when an image has been played and faded out completely

optional func autoImageFlipper(autoImageFlipper: AutoImageFlipper, didPlayImage: UIImage)

This one will be called when an image is going to fade out, and here you can return a UIImage based on which item of list is going to fade out, so the Flipper will play it instead of next item of list.

func autoImageFlipper(autoImageFlipper: AutoImageFlipper, lastPlayed: Int) -> UIImage?

Fading of the ImageViews

You can set it like this:

autoImageFlipper.imageViewAlpha = 0.7

and it will be available from next fade in effect!

Direction

You can set the direction like this:

autoImageFlipper.direction = .Left
autoImageFlipper.direction = .Right

Fading Times

You can set them like this ( Notice that you should set ShowTime first, otherwise it won’t be set if fading times don’t match the equation: ShowTime >= FadeInTime + FadeOutTime )

autoImageFlipper.showTime = 10
autoImageFlipper.fadeInTime = 3
autoImageFlipper.fadeOutTime = 3

Images’ Ratio

Use number 4/3 for 4:3 ratio for example

autoImageFlipper.ratio = 4/3
autoImageFlipper.playNext()   // needed, because setting new ratio stops the play

Latest podspec

{
    "name": "AutoImageFlipper",
    "version": "0.8.2",
    "summary": "Show an array of images scequetially, with fade in, move and fade out effects, beautifully.",
    "description": "Show an array of images scequetially, with fade in, move and fade out effects, beautifully.nIt can be used as the background of UIViewControllers with fade, like many many hit applications.",
    "homepage": "https://github.com/sina-kh/Swift-Auto-Image-Flipper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "SinaKH": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sina-kh/Swift-Auto-Image-Flipper.git",
        "tag": "0.8.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AutoImageFlipper/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This