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 unsafe 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 unsafe fn instantiateInitialViewController(&self)
47 -> Option<Retained<UIViewController>>;
48
49 #[cfg(all(
50 feature = "UIResponder",
51 feature = "UIViewController",
52 feature = "block2"
53 ))]
54 #[unsafe(method(instantiateInitialViewControllerWithCreator:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn instantiateInitialViewControllerWithCreator(
57 &self,
58 block: UIStoryboardViewControllerCreator,
59 ) -> Option<Retained<UIViewController>>;
60
61 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
62 #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
63 #[unsafe(method(instantiateViewControllerWithIdentifier:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn instantiateViewControllerWithIdentifier(
66 &self,
67 identifier: &NSString,
68 ) -> Retained<UIViewController>;
69
70 #[cfg(all(
71 feature = "UIResponder",
72 feature = "UIViewController",
73 feature = "block2"
74 ))]
75 #[unsafe(method(instantiateViewControllerWithIdentifier:creator:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn instantiateViewControllerWithIdentifier_creator(
78 &self,
79 identifier: &NSString,
80 block: UIStoryboardViewControllerCreator,
81 ) -> Retained<UIViewController>;
82 );
83}
84
85impl UIStoryboard {
87 extern_methods!(
88 #[unsafe(method(init))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92 #[unsafe(method(new))]
93 #[unsafe(method_family = new)]
94 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
95 );
96}