Scroll even if only one image
ac1dpax opened this issue · comments
Pavel Kaljunen commented
How to prevent scrolling if array have only one image? I load images from internet and sometimes there is only one image then I don't want to scroll it.
LΞO commented
Fisrt update your pods: pod update
LCBannerView *bannerView = [[LCBannerView alloc] initWithFrame:CGRectMake(0, 20.0f, [UIScreen mainScreen].bounds.size.width, 200.0f)
delegate:self
imageName:@"banner"
count:3
timerInterval:3.0f
currentPageIndicatorTintColor:[UIColor orangeColor]
pageIndicatorTintColor:[UIColor whiteColor]];
bannerView.pageDistance = 20.0f;
bannerView.notScrolling = YES; // THIS LINE ⬅️
bannerView;
LΞO commented
If you load image from internet, I suggest you do this:
if urls.count == 1 {
bannerView!.notScrolling = true
}
Pavel Kaljunen commented
Nice! Thank you!