pub struct PLYView { /* private fields */ }Expand description
An object that manages the content for a rectangular area on the screen.
Implementations§
Source§impl PLYView
impl PLYView
Sourcepub fn safe_area_insets(&self) -> PLYEdgeInsets
pub fn safe_area_insets(&self) -> PLYEdgeInsets
The insets that you use to determine the safe area for this view.
Sourcepub fn set_background_color(&mut self, color: UIColor)
pub fn set_background_color(&mut self, color: UIColor)
Sets the view’s background color.
Sourcepub fn frame(&self) -> CGRect
pub fn frame(&self) -> CGRect
The frame rectangle, which describes the view’s location and size in its superview’s coordinate system.
Sourcepub fn set_frame(&mut self, frame: CGRect)
pub fn set_frame(&mut self, frame: CGRect)
Sets the frame rectangle, which describes the view’s location and size in its superview’s coordinate system.
Sourcepub fn set_corner_radii(&mut self, corner_radii: PLYCornerRadii)
pub fn set_corner_radii(&mut self, corner_radii: PLYCornerRadii)
The radius to use when drawing rounded corners for the layer’s background.
Sourcepub fn window(&self) -> Option<PLYWindow>
pub fn window(&self) -> Option<PLYWindow>
The receiver’s window object, or None if it has none.
Sourcepub fn add_subview(&mut self, subview: &PLYView)
pub fn add_subview(&mut self, subview: &PLYView)
Adds a view to the end of the receiver’s list of subviews.
Sourcepub fn remove_from_superview(&mut self)
pub fn remove_from_superview(&mut self)
Unlinks the view from its superview and its window, and removes it from the responder chain.
Sourcepub fn set_layout(&mut self, callback: impl FnMut() -> CGRect + 'static)
pub fn set_layout(&mut self, callback: impl FnMut() -> CGRect + 'static)
Sets the view’s layout.
A Boolean value that determines whether the view is hidden.
Sourcepub fn set_transform(&mut self, transform: CATransform3D)
pub fn set_transform(&mut self, transform: CATransform3D)
Specifies the transform applied to the view, relative to the center of its bounds.
Sourcepub fn set_needs_layout(&mut self)
pub fn set_needs_layout(&mut self)
Invalidates the current layout of the receiver and triggers a layout update during the next update cycle.
Sourcepub fn set_on_pointer_cancel(&mut self, callback: PLYCallback<NSString>)
pub fn set_on_pointer_cancel(&mut self, callback: PLYCallback<NSString>)
Sets a callback that is invoked when the user’s interaction with this view is cancelled.
Sourcepub fn set_on_pointer_down(&mut self, callback: PLYCallback<NSString>)
pub fn set_on_pointer_down(&mut self, callback: PLYCallback<NSString>)
Sets a callback that is invoked when the user starts interacting with this view.
Sourcepub fn set_on_pointer_up(&mut self, callback: PLYCallback<NSString>)
pub fn set_on_pointer_up(&mut self, callback: PLYCallback<NSString>)
Sets a callback that is invoked when the user ends interacting with this view.
Sourcepub fn set_on_layout(&mut self, callback: PLYCallback<PLYLayoutEvent>)
pub fn set_on_layout(&mut self, callback: PLYCallback<PLYLayoutEvent>)
Sets a callback that is invoked when the view is layed out.
Sourcepub fn add_animation(
&mut self,
animation: PLYKeyframeAnimation,
key_path: &str,
) -> PLYAnimationHandle
pub fn add_animation( &mut self, animation: PLYKeyframeAnimation, key_path: &str, ) -> PLYAnimationHandle
Adds the specified animation object to the view’s render tree.