Ultra-basic slideshow for iOS (ARC only).
Ultra-basic slideshow for iOS (ARC only). Support manual or automatic slideshow, with fade and slide transitions.
Simply copy into your project folder :
add this line to your Podfile :
pod 'KASlideShow'
_slideshow = [[KASlideShow alloc] initWithFrame:CGRectMake(0,0,320,250)];
[_slideshow setDelay:3]; // Delay between transitions
[_slideshow setTransitionDuration:1]; // Transition duration
[_slideshow setTransitionType:KASlideShowTransitionFade]; // Choose a transition type (fade or slide)
[_slideshow setImagesContentMode:UIViewContentModeScaleAspectFill]; // Choose a content mode for images to display
[_slideshow addImagesFromResources:@[@"test_1.jpeg",@"test_2.jpeg",@"test_3.jpeg"]]; // Add images from resources
[_slideshow setImages:myImagesMutableArray]; // Provide your own NSMutableArray of UIImage
[_slideshow addImage:[UIImage imageNamed:@"myImage.jpeg"]]; // Transition duration
[_slideshow next]; // Go to the next image
[_slideshow previous]; // Got to the previous image
[_slideshow start]; // Start automatic slideshow
[_slideshow stop]; // Stop automatic slideshow
Don't forget to set the delegate !
_slideshow.delegate = self;
- (void)kaSlideShowDidNext
{
NSLog(@"Next image");
}
-(void)kaSlideShowDidPrevious
{
NSLog(@"Previous image");
}
Do not hesitate to report any bug/issues or missing functionalities. I'm also open to any pull request that can improve this project further !