How can set the background image, or clear the background, of a search bar, like the note application?
相关问题
- 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
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用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
mj_ has the answer that i used. i was just going to comment as such but i can't yet. So i'll just post my own answer with my implementation where I add a search bar to the top of a table view with a semi-transparent BG.
searchBar.searchBarStyle = UISearchBarStyleMinimal;
This worked for me (ios4.2+)
You have two questions here:
1.UISearchBar clear background color:
See my answer here
2.Set background image Solution:(If you are in iOS 5.0 +)
NOTE: You can also try using a transparent image as a background.
Hope this helps.
A future-proof way:
I had problems w/ the answer above. I used the following.