我曾尝试在 Swift4 上的 GooglePlacePicker 中自定义 NavigationController,但没有达到我想要的效果。
有谁知道如何在 Swift4 上的 placePicker 中更改导航 UI?谢谢您阅读此篇!
@IBAction func pickPlaceBtn(_ sender: Any) {
let config:GMSPlacePickerConfig = GMSPlacePickerConfig(viewport: nil)
print(config.viewport)
let placePicker:GMSPlacePickerViewController = GMSPlacePickerViewController(config: config)
placePicker.delegate = self
present(placePicker, animated: true, completion: nil)
//Does not work.
placePicker.navigationController?.navigationBar.backgroundColor = UIColor.black
}