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

When I was in the use of the library you, found a bug, the iPhone 6 +, the location of the image will move to the left 10 px, cause you can see the next uiimageview content, but the bug, I have repaired. I do so. #10

Open
Joanlove526 opened this issue Dec 9, 2015 · 1 comment

Comments

@Joanlove526
Copy link

if (_datasourceImages.count == 0) {
if ([self.datasource respondsToSelector:@selector(placeHolderImageOfZeroBannerView)]) {
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(_scrollView.frame), CGRectGetHeight(_scrollView.frame))];
imageView.contentMode = UIViewContentModeScaleAspectFill;
// Add
imageView.layer.masksToBounds = YES;
imageView.backgroundColor = [UIColor clearColor];
imageView.image = [self.datasource placeHolderImageOfZeroBannerView];
[_scrollView addSubview:imageView];
}
return;
}

Add

for (NSInteger i = 0; i < _datasourceImages.count; i++) {
CGRect imgRect = CGRectMake(contentWidth * i, 0, contentWidth, contentHeight);
UIImageView *imageView = [[UIImageView alloc] initWithFrame:imgRect];
imageView.backgroundColor = [UIColor clearColor];
// Add
imageView.layer.masksToBounds = YES;
imageView.contentMode = [_datasource contentModeForImageIndex:i];

Hope to be able to change to update your files.

@kingiol
Copy link
Owner

kingiol commented Dec 9, 2015

Thx, you can use pull request, then i merge your code to the library.

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