Skip to content

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

@Joanlove526

Description

@Joanlove526

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions