Trait UITabBarControllerDelegate

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

unsafe 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.

Return YES if the specified tab can be selected by the user. Otherwise, return NO.

Source

unsafe 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.

Called when the selected tab has changed in the tab bar controller. The specified selected tab is either a root tab or its decendants.

Source

unsafe 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.

Determines if items from the specified drop session 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

unsafe 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.

Receive the drop from into the tab using the specified session. This is only called if the drop operation returned from tabBarController:tab:operationForAcceptingItemsFromDropSession is valid for a drop.

Source

unsafe 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

unsafe 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

unsafe 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

unsafe 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 deleagte that the display order for the specified tab has been changed by the user.

Source

unsafe 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 propoesd 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 (leafmost) 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

unsafe 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

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

Available on crate features UIResponder and UIViewController only.
Source

unsafe 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

unsafe 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

unsafe 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

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

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

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

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

unsafe 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

unsafe 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§