objc2_ui_kit/generated/
UIStoryboard.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
9/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboardviewcontrollercreator?language=objc)
10#[cfg(all(
11    feature = "UIResponder",
12    feature = "UIViewController",
13    feature = "block2"
14))]
15pub type UIStoryboardViewControllerCreator =
16    *mut block2::Block<dyn Fn(NonNull<NSCoder>) -> *mut UIViewController>;
17
18extern_class!(
19    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uistoryboard?language=objc)
20    #[unsafe(super(NSObject))]
21    #[thread_kind = MainThreadOnly]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
24    pub struct UIStoryboard;
25);
26
27unsafe impl NSObjectProtocol for UIStoryboard {}
28
29impl UIStoryboard {
30    extern_methods!(
31        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
32        #[unsafe(method(storyboardWithName:bundle:))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn storyboardWithName_bundle(
35            name: &NSString,
36            storyboard_bundle_or_nil: Option<&NSBundle>,
37            mtm: MainThreadMarker,
38        ) -> Retained<UIStoryboard>;
39
40        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
41        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
42        #[unsafe(method(instantiateInitialViewController))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn instantiateInitialViewController(&self)
45            -> Option<Retained<UIViewController>>;
46
47        #[cfg(all(
48            feature = "UIResponder",
49            feature = "UIViewController",
50            feature = "block2"
51        ))]
52        #[unsafe(method(instantiateInitialViewControllerWithCreator:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn instantiateInitialViewControllerWithCreator(
55            &self,
56            block: UIStoryboardViewControllerCreator,
57        ) -> Option<Retained<UIViewController>>;
58
59        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
60        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
61        #[unsafe(method(instantiateViewControllerWithIdentifier:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn instantiateViewControllerWithIdentifier(
64            &self,
65            identifier: &NSString,
66        ) -> Retained<UIViewController>;
67
68        #[cfg(all(
69            feature = "UIResponder",
70            feature = "UIViewController",
71            feature = "block2"
72        ))]
73        #[unsafe(method(instantiateViewControllerWithIdentifier:creator:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn instantiateViewControllerWithIdentifier_creator(
76            &self,
77            identifier: &NSString,
78            block: UIStoryboardViewControllerCreator,
79        ) -> Retained<UIViewController>;
80    );
81}
82
83/// Methods declared on superclass `NSObject`.
84impl UIStoryboard {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
93    );
94}