How can I programmatically change the selected item in a UITabBar?
相关问题
- 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
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Enum with associated value conforming to CaseItera
- Swift - hide pickerView after value selected
- Is there a Github markdown language identifier for
Swift 3 and later
As of Swift 3, you can also use
(Thank you, @nidomiro.)
Swift 2.2 and earlier
Try the following
Assuming you have access to the
UITabBarController
that owns theUITabBar
, you can do the followingThe above line of code should be put somewhere inside of the
UITabBarController
subclass.But if you have access to the tab bar controller from "outside," do the following