- Paged scrollView with custom paging width and inset, e.g:
YAPageView *pageView = [[YAPageView alloc] initWithFrame:CGRectMake(0, 200, kScreenWidth, 200) controller:self pageWidth:300 pageInset:20];
pageView.imageArray = @[
[UIImage imageNamed:@"1"],
[UIImage imageNamed:@"2"],
[UIImage imageNamed:@"3"],
[UIImage imageNamed:@"4"],
];
// If you use SDWebImage, you can set it as follows:
pageView.configImageHandler = ^(UIImageView *imageView, NSURL *url) {
[imageView sd_setImageWithURL:url];
};
pageView.imageURLArray = @[
[NSURL URLWithString:@"https://picsum.photos/id/230/350/200"],
[NSURL URLWithString:@"https://picsum.photos/id/231/350/200"],
[NSURL URLWithString:@"https://picsum.photos/id/232/350/200"],
[NSURL URLWithString:@"https://picsum.photos/id/233/350/200"],
[NSURL URLWithString:@"https://picsum.photos/id/234/350/200"],
[NSURL URLWithString:@"https://picsum.photos/id/235/350/200"]
];
pageView.timeInterval = 3.f;
__weak typeof(self) weakSelf = self;
pageView.tapHandler = ^(NSUInteger idx, UIImage *img, NSURL *url) {
__strong typeof(weakSelf) self = weakSelf;
[self.navigationController popViewControllerAnimated:YES];
};
YAScrollPlaceView is available under the MIT license. See the LICENSE file for more info.