The view controller associated with the currently selected tab item.
- iOS 2.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
This view controller is the one whose custom view is currently displayed by the tab bar interface. The specified view controller must be in the
view array. Assigning a new view controller to this property changes the currently displayed view and also selects an appropriate tab in the tab bar. Changing the view controller also updates the
selected property accordingly. The default value of this property is
In iOS 3.0 and later, you can use this property to select any of the view controllers in the
view property. This includes view controllers that are managed by the More navigation controller and whose tab bar items are not visible in the tab bar. You can also use it to select the More navigation controller itself, which is available from the
more property. Prior to iOS 3.0, you could select only the More navigation controller and the subset of view controllers whose tab bar item was visible. Attempting to set this property to a view controller whose tab bar item was not visible had no effect.