How to set unsafe area background color for ios 11

后端 未结 3 1918
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 18:23

Creating some new view controllers with xcode 9 so now I have a few safe areas to deal with.

I am currently trying to do something fullproof, meaning keeping the uns

3条回答
  •  礼貌的吻别
    2020-12-28 18:50

        if #available(iOS 13.0, *) {
            let navBarAppearance = UINavigationBarAppearance()
            navBarAppearance.configureWithTransparentBackground()
            navBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
            navBarAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
            navBarAppearance.backgroundColor = .black
            navigationController?.navigationBar.standardAppearance = navBarAppearance
            navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
        }
    

提交回复
热议问题