UIPageViewController中的样式页面控件元素
答
您可以设置pageIndicatorTintColor
和currentPageIndicatorTintColor
属性。
self.pageControl.pageIndicatorTintColor = UIColor.blackColor()
self.pageControl.currentPageIndicatorTintColor = UIColor.redColor()
查看UIPageControl Class Reference了解更多信息。
答
我想你的意思是这样的,在你的UIPageViewController子类:
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.backgroundColor = UIColor.whiteColor()
UIPageControl.appearance().pageIndicatorTintColor = UIColor.lightGrayColor()
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor.blackColor()
}