GoAutoSlideView
extends UIScrollView
by featuring infinitely and automatically slide.
###CocoaPods
pod 'GoAutoSlideView', '~> 0.7'
###Manually
- Downloads the source files in directory
GoAutoSlideView/Classes
. - Add the source files to your project.
- import
"GoAutoSlideView.h"
in your files.
GoAutoSlideView *slideView = [[GoAutoSlideView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 250)];
slideView.slideDuration = 5;
slideView.slideDelegate = self;
slideView.slideDataSource = self;
slideView.currentPageIndicatorColor = [UIColor blueColor];
[self.view addSubView:slideView];
[slideView reloadData];
- (NSInteger)numberOfPagesInGoAutoSlideView:(GoAutoSlideView *)goAutoSlideView{
return 5;
}
- (UIView *)goAutoSlideView:(GoAutoSlideView *)goAutoSlideView viewAtPage:(NSInteger)page{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 250)];
[image setImage:[UIImage imageNamed:images[page]]]
return imageView;
}
- (void)goAutoSlideView:(GoAutoSlideView *)goAutoSlideView didTapViewPage:(NSInteger)page{
NSLog(@"didTapViewPage at index: %@", @(page));
}
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- zjmdp
MIT license