UINavigationBar.appearance().tintColor = .white // cancel button
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).attributedPlaceholder = NSAttributedString(
string: "Search",
attributes: [NSAttributedString.Key.foregroundColor: UIColor(hexString: "#4B4B4C").withAlphaComponent(0.8)]
) // placeholder
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).tintColor = .gray // cursor color
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.