objc2_ui_kit/generated/
UITabBarController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitabbarcontrollermode?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct UITabBarControllerMode(pub NSInteger);
15impl UITabBarControllerMode {
16    /// The default tab bar controller mode.
17    /// Resolves to `tabSidebar` if any of the tab elements of the tab bar controller is a group, and
18    /// if the platform supports displaying a sidebar mode. Otherwise, resolves to `tabBar`.
19    #[doc(alias = "UITabBarControllerModeAutomatic")]
20    pub const Automatic: Self = Self(0);
21    /// Displays tabs in a tab bar.
22    #[doc(alias = "UITabBarControllerModeTabBar")]
23    pub const TabBar: Self = Self(1);
24    /// Displays tabs in a tab bar and sidebar.
25    #[doc(alias = "UITabBarControllerModeTabSidebar")]
26    pub const TabSidebar: Self = Self(2);
27}
28
29unsafe impl Encode for UITabBarControllerMode {
30    const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for UITabBarControllerMode {
34    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37extern_class!(
38    /// UITabBarController manages a button bar and transition view, for an application with multiple top-level modes.
39    ///
40    /// To use in your application, add its view to the view hierarchy, then add top-level view controllers in order.
41    /// Most clients will not need to subclass UITabBarController.
42    ///
43    /// If more than five view controllers are added to a tab bar controller, only the first four will display.
44    /// The rest will be accessible under an automatically generated More item.
45    ///
46    /// UITabBarController is rotatable if all of its view controllers are rotatable.
47    ///
48    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller?language=objc)
49    #[unsafe(super(UIViewController, UIResponder, NSObject))]
50    #[thread_kind = MainThreadOnly]
51    #[derive(Debug, PartialEq, Eq, Hash)]
52    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
53    pub struct UITabBarController;
54);
55
56#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
57unsafe impl NSCoding for UITabBarController {}
58
59#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
60unsafe impl NSObjectProtocol for UITabBarController {}
61
62#[cfg(all(
63    feature = "UIAppearance",
64    feature = "UIResponder",
65    feature = "UIViewController"
66))]
67unsafe impl UIAppearanceContainer for UITabBarController {}
68
69#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
70unsafe impl UIContentContainer for UITabBarController {}
71
72#[cfg(all(
73    feature = "UIFocus",
74    feature = "UIResponder",
75    feature = "UIViewController"
76))]
77unsafe impl UIFocusEnvironment for UITabBarController {}
78
79#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
80unsafe impl UIResponderStandardEditActions for UITabBarController {}
81
82#[cfg(all(
83    feature = "UIResponder",
84    feature = "UITabBar",
85    feature = "UIViewController"
86))]
87unsafe impl UITabBarDelegate for UITabBarController {}
88
89#[cfg(all(
90    feature = "UIResponder",
91    feature = "UITraitCollection",
92    feature = "UIViewController"
93))]
94unsafe impl UITraitEnvironment for UITabBarController {}
95
96#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
97impl UITabBarController {
98    extern_methods!(
99        /// The object managing the delegate of the tab bar controller. Default is nil.
100        #[unsafe(method(delegate))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn delegate(
103            &self,
104        ) -> Option<Retained<ProtocolObject<dyn UITabBarControllerDelegate>>>;
105
106        /// This is a [weak property][objc2::topics::weak_property].
107        /// Setter for [`delegate`][Self::delegate].
108        #[unsafe(method(setDelegate:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setDelegate(
111            &self,
112            delegate: Option<&ProtocolObject<dyn UITabBarControllerDelegate>>,
113        );
114
115        /// The object managing the tab sidebar for the tab bar controller. Default is `UITabBarControllerModeAutomatic`
116        #[unsafe(method(mode))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn mode(&self) -> UITabBarControllerMode;
119
120        /// Setter for [`mode`][Self::mode].
121        #[unsafe(method(setMode:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn setMode(&self, mode: UITabBarControllerMode);
124
125        #[cfg(feature = "UITabBarControllerSidebar")]
126        /// The object managing the tab sidebar for the tab bar controller.
127        #[unsafe(method(sidebar))]
128        #[unsafe(method_family = none)]
129        pub unsafe fn sidebar(&self) -> Retained<UITabBarControllerSidebar>;
130
131        /// The customization identifier for the tab bar and sidebar for persistence. The identifier is useful for when an app has multiple tab bar controllers,
132        /// each with their own customizations. If the identifier is nil, a system default is used. Default is nil.
133        #[unsafe(method(customizationIdentifier))]
134        #[unsafe(method_family = none)]
135        pub unsafe fn customizationIdentifier(&self) -> Option<Retained<NSString>>;
136
137        /// Setter for [`customizationIdentifier`][Self::customizationIdentifier].
138        #[unsafe(method(setCustomizationIdentifier:))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn setCustomizationIdentifier(
141            &self,
142            customization_identifier: Option<&NSString>,
143        );
144
145        /// An optional filter to display only select root-level tabs when in a compact appearance. Default is nil, which would make all tabs available.
146        #[unsafe(method(compactTabIdentifiers))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn compactTabIdentifiers(&self) -> Option<Retained<NSArray<NSString>>>;
149
150        /// Setter for [`compactTabIdentifiers`][Self::compactTabIdentifiers].
151        #[unsafe(method(setCompactTabIdentifiers:))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn setCompactTabIdentifiers(
154            &self,
155            compact_tab_identifiers: Option<&NSArray<NSString>>,
156        );
157
158        #[cfg(feature = "UITab")]
159        /// The currently selected tab, which can be a root tab or any of their descendants. Default is nil.
160        #[unsafe(method(selectedTab))]
161        #[unsafe(method_family = none)]
162        pub unsafe fn selectedTab(&self) -> Option<Retained<UITab>>;
163
164        #[cfg(feature = "UITab")]
165        /// Setter for [`selectedTab`][Self::selectedTab].
166        #[unsafe(method(setSelectedTab:))]
167        #[unsafe(method_family = none)]
168        pub unsafe fn setSelectedTab(&self, selected_tab: Option<&UITab>);
169
170        #[cfg(feature = "UITab")]
171        /// An array of root tabs representing view controllers to display by the tab bar interface. Default is empty.
172        /// Once set, `UITabBarController.viewControllers` and related properties and methods will not be called.
173        #[unsafe(method(tabs))]
174        #[unsafe(method_family = none)]
175        pub unsafe fn tabs(&self) -> Retained<NSArray<UITab>>;
176
177        #[cfg(feature = "UITab")]
178        /// Setter for [`tabs`][Self::tabs].
179        #[unsafe(method(setTabs:))]
180        #[unsafe(method_family = none)]
181        pub unsafe fn setTabs(&self, tabs: &NSArray<UITab>);
182
183        #[cfg(feature = "UITab")]
184        /// Sets the root tabs of the tab bar controller, with an option to animate the change.
185        #[unsafe(method(setTabs:animated:))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn setTabs_animated(&self, tabs: &NSArray<UITab>, animated: bool);
188
189        #[cfg(feature = "UITab")]
190        /// Returns the `tab` matching the specified `identifier` in the tab bar controller's tabs. Returns nil if no tab is found matching the `identifier`.
191        #[unsafe(method(tabForIdentifier:))]
192        #[unsafe(method_family = none)]
193        pub unsafe fn tabForIdentifier(&self, identifier: &NSString) -> Option<Retained<UITab>>;
194
195        #[cfg(feature = "UITab")]
196        /// Creates a tab bar controller with the specified tabs.
197        #[unsafe(method(initWithTabs:))]
198        #[unsafe(method_family = init)]
199        pub unsafe fn initWithTabs(this: Allocated<Self>, tabs: &NSArray<UITab>) -> Retained<Self>;
200
201        /// Determines if the active tab bar is currently hidden. Default is NO.
202        #[unsafe(method(isTabBarHidden))]
203        #[unsafe(method_family = none)]
204        pub unsafe fn isTabBarHidden(&self) -> bool;
205
206        /// Setter for [`isTabBarHidden`][Self::isTabBarHidden].
207        #[unsafe(method(setTabBarHidden:))]
208        #[unsafe(method_family = none)]
209        pub unsafe fn setTabBarHidden(&self, tab_bar_hidden: bool);
210
211        /// Changes the active tab bar's visibility with an option to animate the change.
212        #[unsafe(method(setTabBarHidden:animated:))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn setTabBarHidden_animated(&self, hidden: bool, animated: bool);
215
216        #[unsafe(method(viewControllers))]
217        #[unsafe(method_family = none)]
218        pub unsafe fn viewControllers(&self) -> Option<Retained<NSArray<UIViewController>>>;
219
220        /// Setter for [`viewControllers`][Self::viewControllers].
221        #[unsafe(method(setViewControllers:))]
222        #[unsafe(method_family = none)]
223        pub unsafe fn setViewControllers(
224            &self,
225            view_controllers: Option<&NSArray<UIViewController>>,
226        );
227
228        #[unsafe(method(setViewControllers:animated:))]
229        #[unsafe(method_family = none)]
230        pub unsafe fn setViewControllers_animated(
231            &self,
232            view_controllers: Option<&NSArray<UIViewController>>,
233            animated: bool,
234        );
235
236        #[unsafe(method(selectedViewController))]
237        #[unsafe(method_family = none)]
238        pub unsafe fn selectedViewController(&self) -> Option<Retained<UIViewController>>;
239
240        /// Setter for [`selectedViewController`][Self::selectedViewController].
241        #[unsafe(method(setSelectedViewController:))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn setSelectedViewController(
244            &self,
245            selected_view_controller: Option<&UIViewController>,
246        );
247
248        #[unsafe(method(selectedIndex))]
249        #[unsafe(method_family = none)]
250        pub unsafe fn selectedIndex(&self) -> NSUInteger;
251
252        /// Setter for [`selectedIndex`][Self::selectedIndex].
253        #[unsafe(method(setSelectedIndex:))]
254        #[unsafe(method_family = none)]
255        pub unsafe fn setSelectedIndex(&self, selected_index: NSUInteger);
256
257        #[cfg(feature = "UINavigationController")]
258        #[unsafe(method(moreNavigationController))]
259        #[unsafe(method_family = none)]
260        pub unsafe fn moreNavigationController(&self) -> Retained<UINavigationController>;
261
262        #[unsafe(method(customizableViewControllers))]
263        #[unsafe(method_family = none)]
264        pub unsafe fn customizableViewControllers(
265            &self,
266        ) -> Option<Retained<NSArray<UIViewController>>>;
267
268        /// Setter for [`customizableViewControllers`][Self::customizableViewControllers].
269        #[unsafe(method(setCustomizableViewControllers:))]
270        #[unsafe(method_family = none)]
271        pub unsafe fn setCustomizableViewControllers(
272            &self,
273            customizable_view_controllers: Option<&NSArray<UIViewController>>,
274        );
275
276        #[cfg(all(feature = "UITabBar", feature = "UIView"))]
277        #[unsafe(method(tabBar))]
278        #[unsafe(method_family = none)]
279        pub unsafe fn tabBar(&self) -> Retained<UITabBar>;
280    );
281}
282
283/// Methods declared on superclass `UIViewController`.
284#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
285impl UITabBarController {
286    extern_methods!(
287        #[unsafe(method(initWithNibName:bundle:))]
288        #[unsafe(method_family = init)]
289        pub unsafe fn initWithNibName_bundle(
290            this: Allocated<Self>,
291            nib_name_or_nil: Option<&NSString>,
292            nib_bundle_or_nil: Option<&NSBundle>,
293        ) -> Retained<Self>;
294
295        #[unsafe(method(initWithCoder:))]
296        #[unsafe(method_family = init)]
297        pub unsafe fn initWithCoder(
298            this: Allocated<Self>,
299            coder: &NSCoder,
300        ) -> Option<Retained<Self>>;
301    );
302}
303
304/// Methods declared on superclass `NSObject`.
305#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
306impl UITabBarController {
307    extern_methods!(
308        #[unsafe(method(init))]
309        #[unsafe(method_family = init)]
310        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
311
312        #[unsafe(method(new))]
313        #[unsafe(method_family = new)]
314        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
315    );
316}
317
318extern_protocol!(
319    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitabbarcontrollerdelegate?language=objc)
320    pub unsafe trait UITabBarControllerDelegate: NSObjectProtocol + MainThreadOnly {
321        #[cfg(all(
322            feature = "UIResponder",
323            feature = "UITab",
324            feature = "UIViewController"
325        ))]
326        /// Return YES if the specified `tab` can be selected by the user. Otherwise, return NO.
327        #[optional]
328        #[unsafe(method(tabBarController:shouldSelectTab:))]
329        #[unsafe(method_family = none)]
330        unsafe fn tabBarController_shouldSelectTab(
331            &self,
332            tab_bar_controller: &UITabBarController,
333            tab: &UITab,
334        ) -> bool;
335
336        #[cfg(all(
337            feature = "UIResponder",
338            feature = "UITab",
339            feature = "UIViewController"
340        ))]
341        /// Called when the selected tab has changed in the tab bar controller. The specified selected `tab` is either a root tab or its decendants.
342        #[optional]
343        #[unsafe(method(tabBarController:didSelectTab:previousTab:))]
344        #[unsafe(method_family = none)]
345        unsafe fn tabBarController_didSelectTab_previousTab(
346            &self,
347            tab_bar_controller: &UITabBarController,
348            selected_tab: &UITab,
349            previous_tab: Option<&UITab>,
350        );
351
352        #[cfg(all(
353            feature = "UIDragSession",
354            feature = "UIDropInteraction",
355            feature = "UIResponder",
356            feature = "UITab",
357            feature = "UIViewController"
358        ))]
359        /// Determines if items from the specified drop session can be dropped into the specified `tab`. If the operation is either a `.move` or `.copy`,
360        /// then the drop will proceed and `tabBarController:tab:acceptItemsFromDropSession:` is called. By default, the drop will be
361        /// treated as a cancel operation if this is not implemented.
362        #[optional]
363        #[unsafe(method(tabBarController:tab:operationForAcceptingItemsFromDropSession:))]
364        #[unsafe(method_family = none)]
365        unsafe fn tabBarController_tab_operationForAcceptingItemsFromDropSession(
366            &self,
367            tab_bar_controller: &UITabBarController,
368            tab: &UITab,
369            session: &ProtocolObject<dyn UIDropSession>,
370        ) -> UIDropOperation;
371
372        #[cfg(all(
373            feature = "UIDragSession",
374            feature = "UIResponder",
375            feature = "UITab",
376            feature = "UIViewController"
377        ))]
378        /// Receive the drop from into the tab using the specified session. This is only called if the drop operation returned
379        /// from `tabBarController:tab:operationForAcceptingItemsFromDropSession` is valid for a drop.
380        #[optional]
381        #[unsafe(method(tabBarController:tab:acceptItemsFromDropSession:))]
382        #[unsafe(method_family = none)]
383        unsafe fn tabBarController_tab_acceptItemsFromDropSession(
384            &self,
385            tab_bar_controller: &UITabBarController,
386            tab: &UITab,
387            session: &ProtocolObject<dyn UIDropSession>,
388        );
389
390        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
391        /// Notifies the delegate when the tab bar controller is about to begin editing.
392        #[optional]
393        #[unsafe(method(tabBarControllerWillBeginEditing:))]
394        #[unsafe(method_family = none)]
395        unsafe fn tabBarControllerWillBeginEditing(&self, tab_bar_controller: &UITabBarController);
396
397        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
398        /// Notifies the delegate when the tab bar controller's current editing state has ended.
399        #[optional]
400        #[unsafe(method(tabBarControllerDidEndEditing:))]
401        #[unsafe(method_family = none)]
402        unsafe fn tabBarControllerDidEndEditing(&self, tab_bar_controller: &UITabBarController);
403
404        #[cfg(all(
405            feature = "UIResponder",
406            feature = "UITab",
407            feature = "UIViewController"
408        ))]
409        /// Notifies the delegate when editing has ended and the specified tabs have had their `isHidden` values changed by the user.
410        #[optional]
411        #[unsafe(method(tabBarController:visibilityDidChangeForTabs:))]
412        #[unsafe(method_family = none)]
413        unsafe fn tabBarController_visibilityDidChangeForTabs(
414            &self,
415            tab_bar_controller: &UITabBarController,
416            tabs: &NSArray<UITab>,
417        );
418
419        #[cfg(all(
420            feature = "UIResponder",
421            feature = "UITab",
422            feature = "UITabGroup",
423            feature = "UIViewController"
424        ))]
425        /// Notifies the deleagte that the display order for the specified tab has been changed by the user.
426        #[optional]
427        #[unsafe(method(tabBarController:displayOrderDidChangeForGroup:))]
428        #[unsafe(method_family = none)]
429        unsafe fn tabBarController_displayOrderDidChangeForGroup(
430            &self,
431            tab_bar_controller: &UITabBarController,
432            group: &UITabGroup,
433        );
434
435        #[cfg(all(
436            feature = "UIResponder",
437            feature = "UITab",
438            feature = "UIViewController"
439        ))]
440        /// Used with `UITabGroup.managingNavigationController`, this method allows the delegate to customize the displayed view controllers
441        /// within the navigation stack for each level of selected tab. This method is called by the system if the selected tab in the `UITabBarController`
442        /// belongs to or is in the hierarchy of a managing tab group (i.e. a `UITabGroup` with a non-nil `managingNavigationController`). By default,
443        /// 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.
444        /// This is especially useful to hide certain view controllers when transitioning between compact and regular size classes.
445        ///
446        ///
447        /// Parameter `tabBarController`: The tab bar controller managed by the delegate.
448        ///
449        /// 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.
450        ///
451        /// 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.
452        ///
453        ///
454        /// Returns: A list of view controllers represented by the tab in the navigation stack.
455        #[optional]
456        #[unsafe(method(tabBarController:displayedViewControllersForTab:proposedViewControllers:))]
457        #[unsafe(method_family = none)]
458        unsafe fn tabBarController_displayedViewControllersForTab_proposedViewControllers(
459            &self,
460            tab_bar_controller: &UITabBarController,
461            tab: &UITab,
462            proposed_view_controllers: &NSArray<UIViewController>,
463        ) -> Retained<NSArray<UIViewController>>;
464
465        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
466        #[optional]
467        #[unsafe(method(tabBarController:shouldSelectViewController:))]
468        #[unsafe(method_family = none)]
469        unsafe fn tabBarController_shouldSelectViewController(
470            &self,
471            tab_bar_controller: &UITabBarController,
472            view_controller: &UIViewController,
473        ) -> bool;
474
475        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
476        #[optional]
477        #[unsafe(method(tabBarController:didSelectViewController:))]
478        #[unsafe(method_family = none)]
479        unsafe fn tabBarController_didSelectViewController(
480            &self,
481            tab_bar_controller: &UITabBarController,
482            view_controller: &UIViewController,
483        );
484
485        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
486        #[optional]
487        #[unsafe(method(tabBarController:willBeginCustomizingViewControllers:))]
488        #[unsafe(method_family = none)]
489        unsafe fn tabBarController_willBeginCustomizingViewControllers(
490            &self,
491            tab_bar_controller: &UITabBarController,
492            view_controllers: &NSArray<UIViewController>,
493        );
494
495        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
496        #[optional]
497        #[unsafe(method(tabBarController:willEndCustomizingViewControllers:changed:))]
498        #[unsafe(method_family = none)]
499        unsafe fn tabBarController_willEndCustomizingViewControllers_changed(
500            &self,
501            tab_bar_controller: &UITabBarController,
502            view_controllers: &NSArray<UIViewController>,
503            changed: bool,
504        );
505
506        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
507        #[optional]
508        #[unsafe(method(tabBarController:didEndCustomizingViewControllers:changed:))]
509        #[unsafe(method_family = none)]
510        unsafe fn tabBarController_didEndCustomizingViewControllers_changed(
511            &self,
512            tab_bar_controller: &UITabBarController,
513            view_controllers: &NSArray<UIViewController>,
514            changed: bool,
515        );
516
517        #[cfg(all(
518            feature = "UIOrientation",
519            feature = "UIResponder",
520            feature = "UIViewController"
521        ))]
522        #[optional]
523        #[unsafe(method(tabBarControllerSupportedInterfaceOrientations:))]
524        #[unsafe(method_family = none)]
525        unsafe fn tabBarControllerSupportedInterfaceOrientations(
526            &self,
527            tab_bar_controller: &UITabBarController,
528        ) -> UIInterfaceOrientationMask;
529
530        #[cfg(all(
531            feature = "UIOrientation",
532            feature = "UIResponder",
533            feature = "UIViewController"
534        ))]
535        #[optional]
536        #[unsafe(method(tabBarControllerPreferredInterfaceOrientationForPresentation:))]
537        #[unsafe(method_family = none)]
538        unsafe fn tabBarControllerPreferredInterfaceOrientationForPresentation(
539            &self,
540            tab_bar_controller: &UITabBarController,
541        ) -> UIInterfaceOrientation;
542
543        #[cfg(all(
544            feature = "UIResponder",
545            feature = "UIViewController",
546            feature = "UIViewControllerTransitioning"
547        ))]
548        #[optional]
549        #[unsafe(method(tabBarController:interactionControllerForAnimationController:))]
550        #[unsafe(method_family = none)]
551        unsafe fn tabBarController_interactionControllerForAnimationController(
552            &self,
553            tab_bar_controller: &UITabBarController,
554            animation_controller: &ProtocolObject<dyn UIViewControllerAnimatedTransitioning>,
555        ) -> Option<Retained<ProtocolObject<dyn UIViewControllerInteractiveTransitioning>>>;
556
557        #[cfg(all(
558            feature = "UIResponder",
559            feature = "UIViewController",
560            feature = "UIViewControllerTransitioning"
561        ))]
562        #[optional]
563        #[unsafe(method(tabBarController:animationControllerForTransitionFromViewController:toViewController:))]
564        #[unsafe(method_family = none)]
565        unsafe fn tabBarController_animationControllerForTransitionFromViewController_toViewController(
566            &self,
567            tab_bar_controller: &UITabBarController,
568            from_vc: &UIViewController,
569            to_vc: &UIViewController,
570        ) -> Option<Retained<ProtocolObject<dyn UIViewControllerAnimatedTransitioning>>>;
571    }
572);
573
574/// UITabBarControllerItem.
575#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
576impl UIViewController {
577    extern_methods!(
578        #[cfg(all(feature = "UIBarItem", feature = "UITabBarItem"))]
579        #[unsafe(method(tabBarItem))]
580        #[unsafe(method_family = none)]
581        pub unsafe fn tabBarItem(&self) -> Option<Retained<UITabBarItem>>;
582
583        #[cfg(all(feature = "UIBarItem", feature = "UITabBarItem"))]
584        /// Setter for [`tabBarItem`][Self::tabBarItem].
585        #[unsafe(method(setTabBarItem:))]
586        #[unsafe(method_family = none)]
587        pub unsafe fn setTabBarItem(&self, tab_bar_item: Option<&UITabBarItem>);
588
589        #[unsafe(method(tabBarController))]
590        #[unsafe(method_family = none)]
591        pub unsafe fn tabBarController(&self) -> Option<Retained<UITabBarController>>;
592
593        #[cfg(all(feature = "UIScrollView", feature = "UIView"))]
594        #[deprecated = "Use -setContentScrollView:forEdge: instead."]
595        #[unsafe(method(tabBarObservedScrollView))]
596        #[unsafe(method_family = none)]
597        pub unsafe fn tabBarObservedScrollView(&self) -> Option<Retained<UIScrollView>>;
598
599        #[cfg(all(feature = "UIScrollView", feature = "UIView"))]
600        /// Setter for [`tabBarObservedScrollView`][Self::tabBarObservedScrollView].
601        #[deprecated = "Use -setContentScrollView:forEdge: instead."]
602        #[unsafe(method(setTabBarObservedScrollView:))]
603        #[unsafe(method_family = none)]
604        pub unsafe fn setTabBarObservedScrollView(
605            &self,
606            tab_bar_observed_scroll_view: Option<&UIScrollView>,
607        );
608    );
609}