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