Skip to content

Commit 57836bd

Browse files
authored
docs: Update documentation to refer to new objc2 crates
1 parent a36599d commit 57836bd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/appkit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ impl DisplayHandle<'static> {
5757
/// # fn inner() {
5858
/// #![cfg(target_os = "macos")]
5959
/// # #[cfg(requires_objc2)]
60-
/// use icrate::AppKit::NSView;
60+
/// use objc2_app_kit::NSView;
6161
/// # #[cfg(requires_objc2)]
62-
/// use icrate::Foundation::is_main_thread;
62+
/// use objc2_foundation::is_main_thread;
6363
/// # #[cfg(requires_objc2)]
6464
/// use objc2::rc::Id;
6565
/// use raw_window_handle::{WindowHandle, RawWindowHandle};

src/uikit.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ impl DisplayHandle<'static> {
5757
/// # fn inner() {
5858
/// #![cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "xros"))]
5959
/// # #[cfg(requires_objc2)]
60-
/// use icrate::Foundation::is_main_thread;
60+
/// use objc2_foundation::is_main_thread;
6161
/// # #[cfg(requires_objc2)]
6262
/// use objc2::rc::Id;
63-
/// // TODO: Use `icrate::UIKit::UIView` when available
6463
/// # #[cfg(requires_objc2)]
65-
/// use objc2::runtime::NSObject;
64+
/// use objc2_ui_kit::UIView;
6665
/// use raw_window_handle::{WindowHandle, RawWindowHandle};
6766
///
6867
/// let handle: WindowHandle<'_>; // Get the window handle from somewhere else
@@ -76,7 +75,7 @@ impl DisplayHandle<'static> {
7675
/// // that the `UiKitWindowHandle` contains a valid pointer to an
7776
/// // `UIView`.
7877
/// // Unwrap is fine, since the pointer came from `NonNull`.
79-
/// let ui_view: Id<NSObject> = unsafe { Id::retain(ui_view.cast()) }.unwrap();
78+
/// let ui_view: Id<UIView> = unsafe { Id::retain(ui_view.cast()) }.unwrap();
8079
/// // Do something with the UIView here.
8180
/// }
8281
/// handle => unreachable!("unknown handle {handle:?} for platform"),

0 commit comments

Comments
 (0)