更改GMSPlacePickerViewController中导航栏的按钮颜色

时间:2019-05-07 09:46:20

标签: ios swift gmsplacepicker

我想更改GMSPlacePickerViewController导航栏中的取消和搜索图标的颜色。我尝试更改背景色进行测试,但无法正常工作。

func textFieldDidBeginEditing(_ textField: UITextField) {
    let config = GMSPlacePickerConfig(viewport: nil)
    let placePicker = GMSPlacePickerViewController(config: config)
    placePicker.delegate = self
    placePicker.navigationController?.navigationBar.backgroundColor = UIColor.black
    placePicker.navigationController?.navigationBar.isTranslucent = false
    present(placePicker, animated: true, completion: nil)

}

Current Screenshot

0 个答案:

没有答案