Trait UILargeContentViewerItem

Source
pub unsafe trait UILargeContentViewerItem: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn showsLargeContentViewer(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>
       where Self: Sized + Message { ... }
    unsafe fn scalesLargeContentImage(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets
       where Self: Sized + Message { ... }
}
Available on crate feature UILargeContentViewer only.
Expand description

Provided Methods§

Source

unsafe fn showsLargeContentViewer(&self) -> bool
where Self: Sized + Message,

Returns whether the item shows the large content viewer. In general, only views that cannot scale for the full range of Dynamic Type sizes should return YES. For this property to take effect, the item or an ancestor view must have a UILargeContentViewerInteraction.

Source

unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

Returns a title that should be shown in the large content viewer.

Source

unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>
where Self: Sized + Message,

Available on crate feature UIImage only.

Returns an image that should be shown in the large content viewer.

Source

unsafe fn scalesLargeContentImage(&self) -> bool
where Self: Sized + Message,

Returns whether the image should be scaled to a larger size appropriate for the viewer. If not, the image will be shown at its intrinsic size. For best results when scaling, use a PDF asset with its “Preserve Vector Data” checkbox checked.

Source

unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets
where Self: Sized + Message,

Available on crate features UIGeometry and objc2-core-foundation only.

Returns insets appropriate for positioning the image in the viewer so that it appears visually centered.

Trait Implementations§

Source§

impl ProtocolType for dyn UILargeContentViewerItem

Source§

const NAME: &'static str = "UILargeContentViewerItem"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UILargeContentViewerItem

Implementations on Foreign Types§

Source§

impl<T> UILargeContentViewerItem for ProtocolObject<T>

Implementors§