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

前端 未结 12 1905
逝去的感伤
逝去的感伤 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:17

    Swift 3 snippet

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
    
        if let scrollView = view.subviews.filter({ $0 is UIScrollView }).first,
            let pageControl = view.subviews.filter({ $0 is UIPageControl }).first {
            scrollView.frame = view.bounds
            view.bringSubview(toFront:pageControl)
        }
    }
    

提交回复
热议问题