objc2_ui_kit/generated/
UISearchTab.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uisearchtab?language=objc)
11    #[unsafe(super(UITab, NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "UITab")]
15    pub struct UISearchTab;
16);
17
18#[cfg(feature = "UITab")]
19unsafe impl NSObjectProtocol for UISearchTab {}
20
21#[cfg(feature = "UITab")]
22impl UISearchTab {
23    extern_methods!(
24        #[cfg(all(
25            feature = "UIResponder",
26            feature = "UIViewController",
27            feature = "block2"
28        ))]
29        /// Creates a search tab with a system localized title and image.
30        #[unsafe(method(initWithViewControllerProvider:))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn initWithViewControllerProvider(
33            this: Allocated<Self>,
34            view_controller_provider: Option<
35                &block2::Block<dyn Fn(NonNull<UITab>) -> NonNull<UIViewController>>,
36            >,
37        ) -> Retained<Self>;
38    );
39}
40
41/// Methods declared on superclass `UITab`.
42#[cfg(feature = "UITab")]
43impl UISearchTab {
44    extern_methods!(
45        #[cfg(all(
46            feature = "UIImage",
47            feature = "UIResponder",
48            feature = "UIViewController",
49            feature = "block2"
50        ))]
51        /// Creates a tab with the specified identifier, title, image, and view controller provider.
52        /// The view controller provider is called when a view controller is requested and is currently nil.
53        /// For root level tabs on `UITabBarController`, the resolved view controller must be non-nil.
54        #[unsafe(method(initWithTitle:image:identifier:viewControllerProvider:))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn initWithTitle_image_identifier_viewControllerProvider(
57            this: Allocated<Self>,
58            title: &NSString,
59            image: Option<&UIImage>,
60            identifier: &NSString,
61            view_controller_provider: Option<
62                &block2::Block<dyn Fn(NonNull<UITab>) -> NonNull<UIViewController>>,
63            >,
64        ) -> Retained<Self>;
65
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
73    );
74}