从 swift3 升级到 swift4 时出现此错误:Value of type ImageSlideshow?
has no memberpageControlBottomPadding
我使用xcode10.1,swift4,目标ios9.0及以上。ImageSlideshow
版本是 1.7.0。
还有warnings: 'pageControl' is deprecated: Use pageIndicator.view instead
我认为这可能是因为成员名称在 swift4 中更改,不再使用 pageControl 及其成员,并尝试更改pageControl
为pageIndicator
or pageIndicator.view
,
currentPageIndicatorTintColor
但是我搜索并没有找到andpageIndicatorTintColor
和的对应成员名 pageControlBottomPadding
这是我的代码:
import ImageSlideshow
...
@IBOutlet weak var imageSliderView: ImageSlideshow!
...
imageSliderView.pageControl.currentPageIndicatorTintColor = Color.Laser.instance()
imageSliderView.pageControl.pageIndicatorTintColor = UIColor.white
imageSliderView.pageControlBottomPadding = 30.0
知道我应该使用什么新名称吗?或者有没有办法我仍然可以在 swift4 中使用“pageControl”?非常感谢。