iOS*_*iOS 1 ios google-places-api swift3
let autocompleteController = GMSAutocompleteViewController()
autocompleteController.delegate = self
UINavigationBar.appearance().tintColor = UIColor.white
UISearchBar.appearance.textField.setTextColor = UIColor.red
UISearchBar.appearance().barStyle = UIBarStyle.default
self.present(autocompleteController, animated: true, completion:nil)
Run Code Online (Sandbox Code Playgroud)
试试这个.
if #available(iOS 9.0, *) {
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).defaultTextAttributes = [NSForegroundColorAttributeName: UIColor.green]
} else {
// Fallback on earlier versions
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
955 次 |
| 最近记录: |