美文网首页
JXRollView (无限轮播)

JXRollView (无限轮播)

作者: CoderSun | 来源:发表于2016-05-05 20:45 被阅读0次

    JXRollView is an infinite carousel view, or call it AD view.

    JXRollView different from the general idea of the switching carousel, the worst is no switch, the general is in a page after the end of the rolling switch, the so-called a shift in the user did not feel, this line of thinking realize if rapid slide in first and last item often stuck and even slip past. But JXRollView's idea is that when the first and last page is rolling more than half(middle) to switch the page, there will be no edge effect.

    JXRollView can be installed through CocoaPods. Really so simple.

    pod 'JXRollView'
    

    View detail in GitHub, or Download immediately.

    JXRollViewJXRollView

    The easiest way to create an infinite loop scroll view.

    JXRollViewJXRollView

    TwitterTwitter

    Installation with CocoaPods

    CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like JXRollView in your projects.You can install it with the following command:

    pod 'JXRollView'
    

    Installation through manually

    1. Download the latest version.

    2. Open your project in Xcode, then drag and drop JXRollView.h and JXRollView.m onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.

    3. Include JXRollView wherever you need it with #import "JXRollView.h".

    How To Get Started

    1. Create JXRollView.

    - (instancetype)initWithFrame:(CGRect)frame;
    
    or outlet from (IB)Xib.
    @property (weak, nonatomic) IBOutlet JXRollView *rollViewInstance;
    

    2. Implement the method of JXRollViewDelegate.

    @protocol JXRollViewDelegate <NSObject>
    
    @required
    - (NSInteger)numberOfItemsInRollView:(nonnull JXRollView *)rollView;
    - (void)rollView:(nonnull JXRollView *)rollView setImageForImageView:(nonnull UIImageView *)imageView atIndex:(NSInteger)index;
    
    @optional
    - (void)rollView:(nonnull JXRollView *)rollView didTapItemAtIndex:(NSInteger)index;
    
    @end
    

    3. It reload data.

    - (void)reloadData;
    

    License

    JXRollView is distributed under the terms and conditions of the MIT LICENSE.

    相关文章

      网友评论

          本文标题:JXRollView (无限轮播)

          本文链接:https://www.haomeiwen.com/subject/snahrttx.html