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 { ... }
}UITabBarController only.Expand description
Provided Methods§
Sourcefn tabBarController_shouldSelectTab(
&self,
tab_bar_controller: &UITabBarController,
tab: &UITab,
) -> bool
Available on crate features UIResponder and UITab and UIViewController only.
fn tabBarController_shouldSelectTab( &self, tab_bar_controller: &UITabBarController, tab: &UITab, ) -> bool
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
Sourcefn 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.
fn tabBarController_didSelectTab_previousTab( &self, tab_bar_controller: &UITabBarController, selected_tab: &UITab, previous_tab: Option<&UITab>, )
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.
Sourcefn 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.
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.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.
Sourcefn 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.
fn tabBarController_tab_acceptItemsFromDropSession( &self, tab_bar_controller: &UITabBarController, tab: &UITab, session: &ProtocolObject<dyn UIDropSession>, )
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.
Sourcefn tabBarControllerWillBeginEditing(
&self,
tab_bar_controller: &UITabBarController,
)
Available on crate features UIResponder and UIViewController only.
fn tabBarControllerWillBeginEditing( &self, tab_bar_controller: &UITabBarController, )
UIResponder and UIViewController only.Notifies the delegate when the tab bar controller is about to begin editing.
Sourcefn tabBarControllerDidEndEditing(&self, tab_bar_controller: &UITabBarController)
Available on crate features UIResponder and UIViewController only.
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.
Sourcefn tabBarController_visibilityDidChangeForTabs(
&self,
tab_bar_controller: &UITabBarController,
tabs: &NSArray<UITab>,
)
Available on crate features UIResponder and UITab and UIViewController only.
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.
Sourcefn tabBarController_displayOrderDidChangeForGroup(
&self,
tab_bar_controller: &UITabBarController,
group: &UITabGroup,
)
Available on crate features UIResponder and UITab and UITabGroup and UIViewController only.
fn tabBarController_displayOrderDidChangeForGroup( &self, tab_bar_controller: &UITabBarController, group: &UITabGroup, )
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.
Sourcefn 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.
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 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.
fn tabBarController_shouldSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, ) -> bool
UIResponder and UIViewController only.fn tabBarController_didSelectViewController( &self, tab_bar_controller: &UITabBarController, view_controller: &UIViewController, )
UIResponder and UIViewController only.fn tabBarController_willBeginCustomizingViewControllers( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, )
UIResponder and UIViewController only.fn tabBarController_willEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
UIResponder and UIViewController only.fn tabBarController_didEndCustomizingViewControllers_changed( &self, tab_bar_controller: &UITabBarController, view_controllers: &NSArray<UIViewController>, changed: bool, )
UIResponder and UIViewController only.fn tabBarControllerSupportedInterfaceOrientations( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientationMask
UIOrientation and UIResponder and UIViewController only.fn tabBarControllerPreferredInterfaceOrientationForPresentation( &self, tab_bar_controller: &UITabBarController, ) -> UIInterfaceOrientation
UIOrientation and UIResponder and UIViewController only.fn tabBarController_interactionControllerForAnimationController( &self, tab_bar_controller: &UITabBarController, animation_controller: &ProtocolObject<dyn UIViewControllerAnimatedTransitioning>, ) -> Option<Retained<ProtocolObject<dyn UIViewControllerInteractiveTransitioning>>>
UIResponder and UIViewController and UIViewControllerTransitioning only.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.