JSAnimatedImagesView

by JaviSoto

UIView subclass to easily add a cool animated photo carrusel to your iOS app

420 Stars 64 Forks Last release: about 7 years ago (1.0.0) MIT License 41 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Description:

Easy to use UIView subclass to quickly add a cool animated carrousel of pictures to your app.

Documentation: http://cocoadocs.org/docsets/JSAnimatedImagesView/

Sample:

Video

http://jsoto.es/xmKcLb

Usage

  • Using CocoaPods:
  • Add
    pod 'JSAnimatedImagesView', '~> 1.0.'
    to your
    Podfile
    .
  • You're done!

-- or --

  • Clone the repository:
$ git clone [email protected]:JaviSoto/JSAnimatedImagesView.git
  • Update the submodules:
$ git submodule update --init
  • Check out the sample project.
  • Drag the two files
    JSAnimatedImagesView.(h/m)
    onto your project.
  • Drag
    Dependencies/MSWeakTimer/MSWeakTimer.(h/m)
    onto your project.
  • Include the header file
    JSAnimatedImagesView.h
    into the controller where you want to use it.
  • Create a
    JSAnimatedImagesView
    instance either via code, or in interface builder (by creating a UIView and changing its class to
    JSAnimatedImagesView
    ).
  • Set the data source property on the view (probably on the
    viewDidLoad
    method):
self.animatedImagesView.dataSource = self;
  • Implement the data source methods:
@interface MyViewController ()  // Conform to the protocol

@end

@implementation MyViewController

  • (NSUInteger)animatedImagesNumberOfImages:(JSAnimatedImagesView *)animatedImagesView { return self.myImageNames.count; }

  • (UIImage *)animatedImagesView:(JSAnimatedImagesView *)animatedImagesView imageAtIndex:(NSUInteger)index { return [UIImage imageNamed:[self.myImageNames objectAtIndex:index]]; }

@end

Configuration

@property (nonatomic, assign) NSTimeInterval timePerImage;

Specifies the time each image is viewed until the next image is faded in.

@property (nonatomic, assign) NSTimeInterval transitionDuration;

Specifies the duration of the transition (fade-out/fade-in) animation.

Compatibility

  • JSAnimatedImagesView
    is compatible with iOS5.0+
  • JSAnimatedImagesView
    requires ARC.

Attributions (Creative Commons Images)

  • http://www.flickr.com/photos/blmiers2/
  • http://www.flickr.com/photos/niamor/
  • http://www.flickr.com/photos/macieklew/

License

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.