【问题标题】:Changing NavigationBar Title of UIImagePickerController in iOS13在 iOS 13 中更改 UIImagePickerController 的导航栏标题
【发布时间】:2019-12-11 02:38:24
【问题描述】:

在 iOS 12 之前,我可以在下面自定义相册的第一页标题。

func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
    viewController.title = "customized title!!"
}

但它不再适用于 iOS 13。 有人可以帮我定制吗?

【问题讨论】:

  • 您找到解决方案了吗?
  • 不,我逃脱了。
  • 有什么解决办法吗?他们一定在 iOS13 中改变了一些东西。打开的“UIImagePickerController”实际上是一个“PUPhotoPickerHostViewController”,但我也找不到任何相关信息。

标签: swift ios13 albumart


【解决方案1】:

您可以使用此代码:-

 func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
        viewController.navigationItem.title = "customized title"
    }

【讨论】:

    【解决方案2】:

    你可以试试下面的代码:

    func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
            self.navigationItem.title = "customized title"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-09
      • 1970-01-01
      • 2019-11-13
      相关资源
      最近更新 更多