Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ impl DisplayHandle<'static> {
/// # fn inner() {
/// #![cfg(target_os = "macos")]
/// # #[cfg(requires_objc2)]
/// use icrate::AppKit::NSView;
/// use objc2_app_kit::NSView;
/// # #[cfg(requires_objc2)]
/// use icrate::Foundation::is_main_thread;
/// use objc2_foundation::is_main_thread;
/// # #[cfg(requires_objc2)]
/// use objc2::rc::Id;
/// use raw_window_handle::{WindowHandle, RawWindowHandle};
Expand Down
7 changes: 3 additions & 4 deletions src/uikit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ impl DisplayHandle<'static> {
/// # fn inner() {
/// #![cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "xros"))]
/// # #[cfg(requires_objc2)]
/// use icrate::Foundation::is_main_thread;
/// use objc2_foundation::is_main_thread;
/// # #[cfg(requires_objc2)]
/// use objc2::rc::Id;
/// // TODO: Use `icrate::UIKit::UIView` when available
/// # #[cfg(requires_objc2)]
/// use objc2::runtime::NSObject;
/// use objc2_ui_kit::UIView;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember, didn't do it yet because madsmtm/objc2#600 isn't resolved yet

/// use raw_window_handle::{WindowHandle, RawWindowHandle};
///
/// let handle: WindowHandle<'_>; // Get the window handle from somewhere else
Expand All @@ -76,7 +75,7 @@ impl DisplayHandle<'static> {
/// // that the `UiKitWindowHandle` contains a valid pointer to an
/// // `UIView`.
/// // Unwrap is fine, since the pointer came from `NonNull`.
/// let ui_view: Id<NSObject> = unsafe { Id::retain(ui_view.cast()) }.unwrap();
/// let ui_view: Id<UIView> = unsafe { Id::retain(ui_view.cast()) }.unwrap();
/// // Do something with the UIView here.
/// }
/// handle => unreachable!("unknown handle {handle:?} for platform"),
Expand Down