Coder Social home page Coder Social logo

cloudmetal / jsanimatedimagesview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from javisoto/jsanimatedimagesview

0.0 2.0 0.0 1.22 MB

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

Home Page: http://javisoto.github.com/JSAnimatedImagesView/

License: MIT License

jsanimatedimagesview's Introduction

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 () <JSAnimatedImagesViewDataSource> // 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)

License

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

jsanimatedimagesview's People

Contributors

javisoto avatar

Watchers

Travis James avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.