UITabBarControllerDelegate

Trait UITabBarControllerDelegate 

Source
pub unsafe trait UITabBarControllerDelegate: NSObjectProtocol + MainThreadOnly {
Show 18 methods // Provided methods fn tabBarController_shouldSelectTab( &self, tab_bar_controller: &UITabBarController, tab: &UITab, ) -> bool where Self: Sized + Message { ... } fn tabBarController_didSelectTab_previousTab( &self, tab_bar_controller: &UITabBarController, selected_tab: &UITab, previous_tab: Option<&UITab>, ) where Self: Sized + Message { ... } fn tabBarController_tab_operationForAcceptingItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, ) -> UIDropOperation where Self: Sized + Message { ... } fn tabBarController_tab_acceptItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, ) where Self: Sized + Message { ... } fn tabBarControllerWillBeginEditing( &self, tab_bar_controller: &UITabBarController, ) where Self: Sized + Message { ... } fn tabBarControllerDidEndEditing( &self, tab_bar_controller: &UITabBarController, ) where Self: Sized + Message { ... } fn tabBarController_visibilityDidChangeForTabs( &self, tab_bar_controller: &UITabBarController, tabs: &NSArray<UITab>, ) where Self: Sized + Message { ... } fn tabBarController_displayOrderDidChangeForGroup( &self, tab_bar_controller: &UITabBarController, group: &UITabGroup, ) where Self: Sized + Message { ... } fn tabBarController_displayedViewControllersForTab_proposedViewControllers( &self, tab_bar_controller: &UITabBarController, tab: &UITab, proposed_view_controllers: &NSArray<UIViewController>, ) -> Retained<NSArray<UIViewController>> where Self: Sized + Message { ... } fn tabBarController_shouldSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, ) -> bool where Self: Sized + Message { ... } fn tabBarController_didSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, ) where Self: Sized + Message { ... } fn tabBarController_willBeginCustomizingViewControllers( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, ) where Self: Sized + Message { ... } fn tabBarController_willEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, ) where Self: Sized + Message { ... } fn tabBarController_didEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, ) where Self: Sized + Message { ... } fn tabBarControllerSupportedInterfaceOrientations( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientationMask where Self: Sized + Message { ... } fn tabBarControllerPreferredInterfaceOrientationForPresentation( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientation where Self: Sized + Message { ... } fn tabBarController_interactionControllerForAnimationController( &self, tab_bar_controller: &UITabBarController, animation_controller: &ProtocolObject<dyn UIViewControllerAnimatedTransitioning>, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerInteractiveTransitioning>>> where Self: Sized + Message { ... } fn tabBarController_animationControllerForTransitionFromViewController_toViewController( &self, tab_bar_controller: &UITabBarController, from_vc: &UIViewController, to_vc: &UIViewController, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerAnimatedTransitioning>>> where Self: Sized + Message { ... }
}
Available on crate feature UITabBarController only.
Expand description

Provided Methods§

Source

fn tabBarController_shouldSelectTab( &self, tab_bar_controller: &UITabBarController, tab: &UITab, ) -> bool
where Self: Sized + Message,

Available on crate features UIResponder and UITab and UIViewController only.

Asks the delegate whether the specified tab should be made active.

Return YESif the specified tabcan be selected by the user. Otherwise, return NO

Source

fn tabBarController_didSelectTab_previousTab( &self, tab_bar_controller: &UITabBarController, selected_tab: &UITab, previous_tab: Option<&UITab>, )
where Self: Sized + Message,

Available on crate features UIResponder and UITab and UIViewController only.

Tells the delegate that the user selected the specified selectedTabin the tab bar controller.

This specified selectedTabis either a root tab or any of their descendants.

Source

fn tabBarController_tab_operationForAcceptingItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, ) -> UIDropOperation
where Self: Sized + Message,

Available on crate features UIDragSession and UIDropInteraction and UIResponder and UITab and UIViewController only.

Asks the delegate for a drop operation to determine if drag items can be dropped into the specified tab If the operation is either a .move or .copy, then the drop will proceed and tabBarController:tab:acceptItemsFromDropSession: is called. By default, the drop will be treated as a cancel operation if this is not implemented.

Source

fn tabBarController_tab_acceptItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, )
where Self: Sized + Message,

Available on crate features UIDragSession and UIResponder and UITab and UIViewController only.

Notifies the delegate to perform a drop into the specified tabfrom the specified session.

This is only called if the operation returned from tabBarController:tab:operationForAcceptingItemsFromDropSession is valid for a drop.

Source

fn tabBarControllerWillBeginEditing( &self, tab_bar_controller: &UITabBarController, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.

Notifies the delegate when the tab bar controller is about to begin editing.

Source

fn tabBarControllerDidEndEditing(&self, tab_bar_controller: &UITabBarController)
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.

Notifies the delegate when the tab bar controller’s current editing state has ended.

Source

fn tabBarController_visibilityDidChangeForTabs( &self, tab_bar_controller: &UITabBarController, tabs: &NSArray<UITab>, )
where Self: Sized + Message,

Available on crate features UIResponder and UITab and UIViewController only.

Notifies the delegate when editing has ended and the specified tabs have had their isHidden values changed by the user.

Source

fn tabBarController_displayOrderDidChangeForGroup( &self, tab_bar_controller: &UITabBarController, group: &UITabGroup, )
where Self: Sized + Message,

Available on crate features UIResponder and UITab and UITabGroup and UIViewController only.

Notifies the delegate that the display order for the specified tab has been changed by the user.

Source

fn tabBarController_displayedViewControllersForTab_proposedViewControllers( &self, tab_bar_controller: &UITabBarController, tab: &UITab, proposed_view_controllers: &NSArray<UIViewController>, ) -> Retained<NSArray<UIViewController>>
where Self: Sized + Message,

Available on crate features UIResponder and UITab and UIViewController only.

Used with UITabGroup.managingNavigationController, this method allows the delegate to customize the displayed view controllers within the navigation stack for each level of selected tab. This method is called by the system if the selected tab in the UITabBarController belongs to or is in the hierarchy of a managing tab group (i.e. a UITabGroup with a non-nil managingNavigationController). By default, if this method is not implemented, the system will build the navigation stack by adding each tab’s viewController into the hierarchy, if one exists. This is especially useful to hide certain view controllers when transitioning between compact and regular size classes.

Parameter tabBarController: The tab bar controller managed by the delegate.

Parameter tab: The tab for which the displayed view controllers is being requested for by its managingTabGroup. Each tab in the selection hierarchy will be called once.

Parameter proposedViewControllers: The proposed view controllers for the given tab. In general, the proposed view controller is a single-item array of the tab’s viewController. If other view controllers are pushed onto the navigation stack, they will be part of the last (leaf-most) tab’s proposedViewControllers such that they are preserved between updates.

Returns: A list of view controllers represented by the tab in the navigation stack.

Source

fn tabBarController_shouldSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, ) -> bool
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

fn tabBarController_didSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

fn tabBarController_willBeginCustomizingViewControllers( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

fn tabBarController_willEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

fn tabBarController_didEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

fn tabBarControllerSupportedInterfaceOrientations( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientationMask
where Self: Sized + Message,

Available on crate features UIOrientation and UIResponder and UIViewController only.
Source

fn tabBarControllerPreferredInterfaceOrientationForPresentation( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientation
where Self: Sized + Message,

Available on crate features UIOrientation and UIResponder and UIViewController only.
Source

fn tabBarController_interactionControllerForAnimationController( &self, tab_bar_controller: &UITabBarController, animation_controller: &ProtocolObject<dyn UIViewControllerAnimatedTransitioning>, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerInteractiveTransitioning>>>
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController and UIViewControllerTransitioning only.
Source

fn tabBarController_animationControllerForTransitionFromViewController_toViewController( &self, tab_bar_controller: &UITabBarController, from_vc: &UIViewController, to_vc: &UIViewController, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerAnimatedTransitioning>>>
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController and UIViewControllerTransitioning only.

Trait Implementations§

Source§

impl ProtocolType for dyn UITabBarControllerDelegate

Source§

const NAME: &'static str = "UITabBarControllerDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UITabBarControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> UITabBarControllerDelegate for ProtocolObject<T>

Implementors§