Struct cacao::layout::SafeAreaLayoutGuide
source · [−]pub struct SafeAreaLayoutGuide {
pub top: LayoutAnchorY,
pub leading: LayoutAnchorX,
pub left: LayoutAnchorX,
pub trailing: LayoutAnchorX,
pub right: LayoutAnchorX,
pub bottom: LayoutAnchorY,
pub width: LayoutAnchorDimension,
pub height: LayoutAnchorDimension,
pub center_x: LayoutAnchorX,
pub center_y: LayoutAnchorY,
}
Expand description
A SafeAreaLayoutGuide should exist on all view types, and ensures that there are anchor points that work within the system constraints. On macOS 11+, this will ensure you work around system padding transprently - on macOS 10.15 and under, this will transparently map to the normal edges, as the underlying properties were not supported there.
Fields
top: LayoutAnchorY
A pointer to the Objective-C runtime top layout constraint.
leading: LayoutAnchorX
A pointer to the Objective-C runtime leading layout constraint.
left: LayoutAnchorX
A pointer to the Objective-C runtime left layout constraint.
trailing: LayoutAnchorX
A pointer to the Objective-C runtime trailing layout constraint.
right: LayoutAnchorX
A pointer to the Objective-C runtime right layout constraint.
bottom: LayoutAnchorY
A pointer to the Objective-C runtime bottom layout constraint.
width: LayoutAnchorDimension
A pointer to the Objective-C runtime width layout constraint.
height: LayoutAnchorDimension
A pointer to the Objective-C runtime height layout constraint.
center_x: LayoutAnchorX
A pointer to the Objective-C runtime center X layout constraint.
center_y: LayoutAnchorY
A pointer to the Objective-C runtime center Y layout constraint.
Implementations
Trait Implementations
sourceimpl Clone for SafeAreaLayoutGuide
impl Clone for SafeAreaLayoutGuide
sourcefn clone(&self) -> SafeAreaLayoutGuide
fn clone(&self) -> SafeAreaLayoutGuide
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for SafeAreaLayoutGuide
impl Send for SafeAreaLayoutGuide
impl Sync for SafeAreaLayoutGuide
impl Unpin for SafeAreaLayoutGuide
impl UnwindSafe for SafeAreaLayoutGuide
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more