项目
在 GitHub 查看
JaviSoto/JSAnimatedImagesView
关于
UIView subclass to easily add a cool animated photo carrusel to your iOS app
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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:

Usage
- Using CocoaPods:
- Add
pod 'JSAnimatedImagesView', '~> 1.0.'to yourPodfile. - 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.hinto the controller where you want to use it. - Create a
JSAnimatedImagesViewinstance either via code, or in interface builder (by creating a UIView and changing its class toJSAnimatedImagesView). - Set the data source property on the view (probably on the
viewDidLoadmethod):
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
JSAnimatedImagesViewis compatible with iOS5.0+JSAnimatedImagesViewrequires 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.
探索相关项目
加载中…