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

前端 未结 12 1915
逝去的感伤
逝去的感伤 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 5.2

    you can use this code for your requirment

     override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
    
        if let myScrollView = view.subviews.filter({ $0 is UIScrollView }).first,
            let myPageControl = view.subviews.filter({ $0 is UIPageControl }).first {
            myScrollView.frame = view.bounds
            view.bringSubviewToFront(myPageControl)
        }
    }
    

提交回复
热议问题