LvJianfeng / LLCycleScrollView

Swift - 轮播图,文本轮播,支持左右箭头
MIT License
371 stars 66 forks source link

版本1.6.0 使用图片PageControl,在iOS 13正常,在iOS 14不显示 #86

Open maguoxi opened 3 years ago

maguoxi commented 3 years ago

lazy var cycleScrollView: LLCycleScrollView = { let cycleScrollView = LLCycleScrollView() cycleScrollView.imageViewContentMode = .scaleAspectFill cycleScrollView.scrollDirection = .horizontal cycleScrollView.customPageControlStyle = .image cycleScrollView.pageControlPosition = .center cycleScrollView.pageControlActiveImage = UIImage(named: "banner_unselect") cycleScrollView.pageControlInActiveImage = UIImage(named: "banner_selected_black") cycleScrollView.placeHolderImage = UIImage(named: "banner_placeholder") return cycleScrollView }() iOS 13 iOS 14

Liaoworking commented 3 years ago

我的pageControl在iOS14上也显示异常。

Liaoworking commented 3 years ago

刚刚看了看原因是之前是遍历的pageControl的subViews来布局image的frame。 iOS14 pageControl的视图层级发生了改变 增加了contentView 和indicatorContentView。 所以布局会有问题。

maguoxi commented 3 years ago

刚刚看了看原因是之前是遍历的pageControl的subViews来布局image的frame。 iOS14 pageControl的视图层级发生了改变 增加了contentView 和indicatorContentView。 所以布局会有问题。

好的,谢谢答疑

lixuan123 commented 2 years ago

大神,要怎么改才能解决呢?才初学,不会改

lixuan123 commented 2 years ago

@Liaoworking @maguoxi 大神,要怎么改才能解决呢?才初学,不会改

Liaoworking commented 1 year ago

@Liaoworking @maguoxi 大神,要怎么改才能解决呢?才初学,不会改

https://www.cnblogs.com/4zjq/archive/2020/11/25/14034333.html 这里有个帖子你可以看看

我打算自己自定义pageControl了。