Latest 1.1.1
Homepage https://github.com/yuppiu/YCSlideShowImageView
License MIT
Platforms ios 6.0, requires ARC
Authors

Pod Version
Pod Platform
Pod License
Dependency Status

A very simple subclass of UIImageView with the option to animate like a Slide Show between 2+ images.

alt tag

Usage

MyExample.m

@interface MyExample ()

@property (nonatomic, weak) IBOutlet YCSlideShowImageView *imageView;

@end

@implementation MyExample

- (void)aMethod {

    /// Run in a loop of image URLs OR in a loop of stored images.
    for (NSString *imageURL in _imageURLs) {

        /// Here we start the download using AFNetworking (just an example). You can use any downloader.
        NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:imageURL]];
        AFHTTPRequestOperation *requestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
        requestOperation.responseSerializer = [AFImageResponseSerializer serializer];
        [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {

            /// Here we add each downloaded image to the Slide Show.
            [_imageView addImage:image];

        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            NSLog(@"Image error: %@", error);
        }];
        [requestOperation start];
    }
}

@end

If you want to reset the animation, just call:

[_imageView emptyImageArray];

There are 3 public properties that you can use to customize the animation duration (animationDurationTime), the delay between the transitions (animationDelay) and also the options of the animation (animationOptions).

CGFloat animationDurationTime;
CGFloat animationDelay;
UIViewAnimationOptions animationOptions;

Support


Runs fine in iOS6+ and supports ARC.

Contributors

Made in Berlin

Latest podspec

{
    "name": "YCSlideShowImageView",
    "version": "1.1.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/yuppiu/YCSlideShowImageView",
    "authors": {
        "Fabio Knoedt": "[email protected]ail.com"
    },
    "summary": "A very simple subclass of UIImageView with the option to animate like a Slide Show between 2+ images.",
    "source": {
        "git": "https://github.com/yuppiu/YCSlideShowImageView.git",
        "tag": "1.1.1"
    },
    "source_files": "YCSlideShowImageView.{h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0"
    }
}

Pin It on Pinterest

Share This