AppStore导航栏iOS 13

时间:2019-06-25 15:29:21

标签: ios swift

如何像AppStore应用程序一样自定义导航栏? 我已经尝试设置以下内容(它是UINavigationController的子类):

    self.navigationBar.setBackgroundImage(UIImage.with(color: UIColor.red), for: .default)
    self.navigationBar.shadowImage = UIImage()
    self.navigationBar.isTranslucent = true
    self.view.backgroundColor = .blue

然后,大的NavigationBar为蓝色,而小/折叠的NavigationBar为红色。但是,当NavigationBar折叠时,我需要调整以获得半透明的NavigationBar吗?

AppStore light large navigation bar [AppStore dark small navigation bar[2] AppStore dark large navigation bar AppStore light small navigation bar

0 个答案:

没有答案