I would like a different background color when the user selects a tab bar item than when it is unselected.
相关问题
- CALayer - backgroundColor flipped?
- 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
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
Please refer below URL's.
Changing Tint / Background color of UITabBar
How To Change Tab bar color in Xcode
hope this will help you..
try this to change tabbar item color but it only work in ios5.
Currently in Xcode 8.3.2 you can do it inside the storyboard using an image that will represent the actual background.
Select the tab bar inside your tab bar controller:
Inside the Utilities choose the Attributes Inspector and change the selection background image:
if you use a storyboard or xibs, click "Tab Bar" and add "selectedImageTintColor" path into the Key Path Attributes tag. Like this :
In Swift
with an image
tabSelected@2x.png
of size 98x98 pixelsPut this in the
Appdelegate.m
inapplication didFinishLaunchingWithOptions
Put this in your AppDelegate.m file: