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.
JXRollViewThe easiest way to create an infinite loop scroll view.
JXRollView TwitterInstallation 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
-
Download the latest version.
-
Open your project in Xcode, then drag and drop
JXRollView.h
andJXRollView.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. -
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.
网友评论