Has anyone any idea or code sample on how can I change the text color of the placeholder text of a UISearchBar?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- How to update placeholder text in ng2-smart-table?
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
for
iOS5+
use the appearance proxyHere is a Solution for Swift:
Swift 2
Swift 3
Try this and see: (I tested below code with Swift 4.1 - Xcode 9.3-beta4)
Here is result:
Swift 3
Try this:
You can also set this in storyboard, select search bar, add entry under User Defined Runtime Attributes:
of type Color and select the color you need.