How do I make the bottom bar with dots of a UIPageViewController translucent?

前端 未结 12 1901
逝去的感伤
逝去的感伤 2020-12-04 07:37

I\'m in the process of making a tutorial, and I\'m trying to emulate the style of Path\'s tutorial like so:

http://www.appcoda.com/wp-content/uploads/2013/06/UIPageV

12条回答
  •  情话喂你
    2020-12-04 08:02

    this code is in Swift Add following in your UIPageViewController

    override func viewDidLayoutSubviews() {
            super.viewDidLayoutSubviews()
    
        for view in self.view.subviews {
            if view.isKindOfClass(UIScrollView) {
                view.frame = UIScreen.mainScreen().bounds
            } else if view.isKindOfClass(UIPageControl) {
                view.backgroundColor = UIColor.clearColor()
            }
        }
    }
    

提交回复
热议问题