diff --git a/ZYBannerView/ZYBannerView.m b/ZYBannerView/ZYBannerView.m index be91e42..311ec79 100644 --- a/ZYBannerView/ZYBannerView.m +++ b/ZYBannerView/ZYBannerView.m @@ -479,6 +479,9 @@ - (UICollectionView *)collectionView _collectionView.backgroundColor = [UIColor groupTableViewBackgroundColor]; _collectionView.delegate = self; _collectionView.dataSource = self; + if (@available(iOS 11, *)) { + _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } // 注册cell [_collectionView registerClass:[ZYBannerCell class] forCellWithReuseIdentifier:banner_item];