Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll even if only one image #3

Closed
ac1dpax opened this issue Mar 3, 2016 · 3 comments
Closed

Scroll even if only one image #3

ac1dpax opened this issue Mar 3, 2016 · 3 comments

Comments

@ac1dpax
Copy link

ac1dpax commented Mar 3, 2016

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.

@iTofu
Copy link
Owner

iTofu commented Mar 3, 2016

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;

@iTofu
Copy link
Owner

iTofu commented Mar 3, 2016

If you load image from internet, I suggest you do this:

if urls.count == 1 {
    bannerView!.notScrolling = true
}

@ac1dpax
Copy link
Author

ac1dpax commented Mar 3, 2016

Nice! Thank you!

@ac1dpax ac1dpax closed this as completed Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants