objc2_ui_kit/generated/
UIStoryboard.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[cfg(all(
11 feature = "UIResponder",
12 feature = "UIViewController",
13 feature = "block2"
14))]
15pub type UIStoryboardViewControllerCreator =
16 *mut block2::DynBlock<dyn Fn(NonNull<NSCoder>) -> *mut UIViewController>;
17
18extern_class!(
19 #[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
27extern_conformance!(
28 unsafe impl NSObjectProtocol for UIStoryboard {}
29);
30
31impl UIStoryboard {
32 extern_methods!(
33 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
34 #[unsafe(method(storyboardWithName:bundle:))]
35 #[unsafe(method_family = none)]
36 pub fn storyboardWithName_bundle(
37 name: &NSString,
38 storyboard_bundle_or_nil: Option<&NSBundle>,
39 mtm: MainThreadMarker,
40 ) -> Retained<UIStoryboard>;
41
42 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
43 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
44 #[unsafe(method(instantiateInitialViewController))]
45 #[unsafe(method_family = none)]
46 pub fn instantiateInitialViewController(&self) -> Option<Retained<UIViewController>>;
47
48 #[cfg(all(
49 feature = "UIResponder",
50 feature = "UIViewController",
51 feature = "block2"
52 ))]
53 #[unsafe(method(instantiateInitialViewControllerWithCreator:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn instantiateInitialViewControllerWithCreator(
59 &self,
60 block: UIStoryboardViewControllerCreator,
61 ) -> Option<Retained<UIViewController>>;
62
63 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
64 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
65 #[unsafe(method(instantiateViewControllerWithIdentifier:))]
66 #[unsafe(method_family = none)]
67 pub fn instantiateViewControllerWithIdentifier(
68 &self,
69 identifier: &NSString,
70 ) -> Retained<UIViewController>;
71
72 #[cfg(all(
73 feature = "UIResponder",
74 feature = "UIViewController",
75 feature = "block2"
76 ))]
77 #[unsafe(method(instantiateViewControllerWithIdentifier:creator:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn instantiateViewControllerWithIdentifier_creator(
83 &self,
84 identifier: &NSString,
85 block: UIStoryboardViewControllerCreator,
86 ) -> Retained<UIViewController>;
87 );
88}
89
90impl UIStoryboard {
92 extern_methods!(
93 #[unsafe(method(init))]
94 #[unsafe(method_family = init)]
95 pub fn init(this: Allocated<Self>) -> Retained<Self>;
96
97 #[unsafe(method(new))]
98 #[unsafe(method_family = new)]
99 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
100 );
101}