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 { ... }
}UITabBarController only.Expand description
Provided Methods§
Sourceunsafe fn tabBarController_shouldSelectTab(
&self,
tab_bar_controller: &UITabBarController,
tab: &UITab,
) -> bool
Available on crate features UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_shouldSelectTab( &self, tab_bar_controller: &UITabBarController, tab: &UITab, ) -> bool
UIResponder and UITab and UIViewController only.Return YES if the specified tab can be selected by the user. Otherwise, return NO.
Sourceunsafe fn tabBarController_didSelectTab_previousTab(
&self,
tab_bar_controller: &UITabBarController,
selected_tab: &UITab,
previous_tab: Option<&UITab>,
)
Available on crate features UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_didSelectTab_previousTab( &self, tab_bar_controller: &UITabBarController, selected_tab: &UITab, previous_tab: Option<&UITab>, )
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.
Sourceunsafe fn tabBarController_tab_operationForAcceptingItemsFromDropSession(
&self,
tab_bar_controller: &UITabBarController,
tab: &UITab,
session: &ProtocolObject<dyn UIDropSession>,
) -> UIDropOperation
Available on crate features UIDragSession and UIDropInteraction and UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_tab_operationForAcceptingItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, ) -> UIDropOperation
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.
Sourceunsafe fn tabBarController_tab_acceptItemsFromDropSession(
&self,
tab_bar_controller: &UITabBarController,
tab: &UITab,
session: &ProtocolObject<dyn UIDropSession>,
)
Available on crate features UIDragSession and UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_tab_acceptItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, )
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.
Sourceunsafe fn tabBarControllerWillBeginEditing(
&self,
tab_bar_controller: &UITabBarController,
)
Available on crate features UIResponder and UIViewController only.
unsafe fn tabBarControllerWillBeginEditing( &self, tab_bar_controller: &UITabBarController, )
UIResponder and UIViewController only.Notifies the delegate when the tab bar controller is about to begin editing.
Sourceunsafe fn tabBarControllerDidEndEditing(
&self,
tab_bar_controller: &UITabBarController,
)
Available on crate features UIResponder and UIViewController only.
unsafe fn tabBarControllerDidEndEditing( &self, tab_bar_controller: &UITabBarController, )
UIResponder and UIViewController only.Notifies the delegate when the tab bar controller’s current editing state has ended.
Sourceunsafe fn tabBarController_visibilityDidChangeForTabs(
&self,
tab_bar_controller: &UITabBarController,
tabs: &NSArray<UITab>,
)
Available on crate features UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_visibilityDidChangeForTabs( &self, tab_bar_controller: &UITabBarController, tabs: &NSArray<UITab>, )
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.
Sourceunsafe fn tabBarController_displayOrderDidChangeForGroup(
&self,
tab_bar_controller: &UITabBarController,
group: &UITabGroup,
)
Available on crate features UIResponder and UITab and UITabGroup and UIViewController only.
unsafe fn tabBarController_displayOrderDidChangeForGroup( &self, tab_bar_controller: &UITabBarController, group: &UITabGroup, )
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.
Sourceunsafe fn tabBarController_displayedViewControllersForTab_proposedViewControllers(
&self,
tab_bar_controller: &UITabBarController,
tab: &UITab,
proposed_view_controllers: &NSArray<UIViewController>,
) -> Retained<NSArray<UIViewController>>
Available on crate features UIResponder and UITab and UIViewController only.
unsafe fn tabBarController_displayedViewControllersForTab_proposedViewControllers( &self, tab_bar_controller: &UITabBarController, tab: &UITab, proposed_view_controllers: &NSArray<UIViewController>, ) -> Retained<NSArray<UIViewController>>
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.
unsafe fn tabBarController_shouldSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, ) -> bool
UIResponder and UIViewController only.unsafe fn tabBarController_didSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, )
UIResponder and UIViewController only.unsafe fn tabBarController_willBeginCustomizingViewControllers( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, )
UIResponder and UIViewController only.unsafe fn tabBarController_willEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
UIResponder and UIViewController only.unsafe fn tabBarController_didEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
UIResponder and UIViewController only.unsafe fn tabBarControllerSupportedInterfaceOrientations( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientationMask
UIOrientation and UIResponder and UIViewController only.unsafe fn tabBarControllerPreferredInterfaceOrientationForPresentation( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientation
UIOrientation and UIResponder and UIViewController only.unsafe fn tabBarController_interactionControllerForAnimationController( &self, tab_bar_controller: &UITabBarController, animation_controller: &ProtocolObject<dyn UIViewControllerAnimatedTransitioning>, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerInteractiveTransitioning>>>
UIResponder and UIViewController and UIViewControllerTransitioning only.unsafe fn tabBarController_animationControllerForTransitionFromViewController_toViewController( &self, tab_bar_controller: &UITabBarController, from_vc: &UIViewController, to_vc: &UIViewController, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerAnimatedTransitioning>>>
UIResponder and UIViewController and UIViewControllerTransitioning only.