pub struct UIView { /* private fields */ }UIResponder and UIView only.Expand description
Implementations§
Source§impl UIView
UIAccessibilityInvertColors.
impl UIView
UIAccessibilityInvertColors.
pub fn accessibilityIgnoresInvertColors(&self) -> bool
UIAccessibilityAdditions only.Sourcepub fn setAccessibilityIgnoresInvertColors(
&self,
accessibility_ignores_invert_colors: bool,
)
Available on crate feature UIAccessibilityAdditions only.
pub fn setAccessibilityIgnoresInvertColors( &self, accessibility_ignores_invert_colors: bool, )
UIAccessibilityAdditions only.Setter for accessibilityIgnoresInvertColors.
impl UIView
UIAccessibility.
Source§impl UIView
UIHoverStyle.
impl UIView
UIHoverStyle.
Sourcepub fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>
Available on crate feature UIHoverStyle only.
pub fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>
UIHoverStyle only.The hover style associated with this view. Defaults to nil,
indicating that this view should not have any hover effect.
Subclasses may configure this style to use a different default value.
Sourcepub fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
Available on crate feature UIHoverStyle only.
pub fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
UIHoverStyle only.Setter for hoverStyle.
This is copied when set.
Source§impl UIView
Interactions.
impl UIView
Interactions.
pub fn addInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>)
UIInteraction only.pub fn removeInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>)
UIInteraction only.pub fn interactions( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>
UIInteraction only.Sourcepub fn setInteractions(
&self,
interactions: &NSArray<ProtocolObject<dyn UIInteraction>>,
)
Available on crate feature UIInteraction only.
pub fn setInteractions( &self, interactions: &NSArray<ProtocolObject<dyn UIInteraction>>, )
UIInteraction only.Setter for interactions.
This is copied when set.
Source§impl UIView
UILargeContentViewer.
impl UIView
UILargeContentViewer.
pub fn showsLargeContentViewer(&self) -> bool
UILargeContentViewer only.Sourcepub fn setShowsLargeContentViewer(&self, shows_large_content_viewer: bool)
Available on crate feature UILargeContentViewer only.
pub fn setShowsLargeContentViewer(&self, shows_large_content_viewer: bool)
UILargeContentViewer only.Setter for showsLargeContentViewer.
pub fn largeContentTitle(&self) -> Option<Retained<NSString>>
UILargeContentViewer only.Sourcepub fn setLargeContentTitle(&self, large_content_title: Option<&NSString>)
Available on crate feature UILargeContentViewer only.
pub fn setLargeContentTitle(&self, large_content_title: Option<&NSString>)
UILargeContentViewer only.Setter for largeContentTitle.
This is copied when set.
pub fn largeContentImage(&self) -> Option<Retained<UIImage>>
UILargeContentViewer and UIImage only.Sourcepub fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
Available on crate features UILargeContentViewer and UIImage only.
pub fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
UILargeContentViewer and UIImage only.Setter for largeContentImage.
pub fn scalesLargeContentImage(&self) -> bool
UILargeContentViewer only.Sourcepub fn setScalesLargeContentImage(&self, scales_large_content_image: bool)
Available on crate feature UILargeContentViewer only.
pub fn setScalesLargeContentImage(&self, scales_large_content_image: bool)
UILargeContentViewer only.Setter for scalesLargeContentImage.
pub fn largeContentImageInsets(&self) -> UIEdgeInsets
UILargeContentViewer and UIGeometry and objc2-core-foundation only.Sourcepub fn setLargeContentImageInsets(
&self,
large_content_image_insets: UIEdgeInsets,
)
Available on crate features UILargeContentViewer and UIGeometry and objc2-core-foundation only.
pub fn setLargeContentImageInsets( &self, large_content_image_insets: UIEdgeInsets, )
UILargeContentViewer and UIGeometry and objc2-core-foundation only.Setter for largeContentImageInsets.
impl UIView
UIPopoverPresentationControllerSourceItem.
Source§impl UIView
UIPrintFormatter.
impl UIView
UIPrintFormatter.
pub fn viewPrintFormatter(&self) -> Retained<UIViewPrintFormatter>
UIPrintFormatter only.pub fn drawRect_forViewPrintFormatter( &self, rect: CGRect, formatter: &UIViewPrintFormatter, )
UIPrintFormatter and objc2-core-foundation only.Source§impl UIView
UITextField.
impl UIView
UITextField.
pub fn endEditing(&self, force: bool) -> bool
UITextField only.Source§impl UIView
impl UIView
pub fn layerClass(mtm: MainThreadMarker) -> &'static AnyClass
pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>
objc2-core-foundation only.Sourcepub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder, ) -> Option<Retained<Self>>
§Safety
coder possibly has further requirements.
pub fn init(this: Allocated<Self>) -> Retained<Self>
pub fn isUserInteractionEnabled(&self) -> bool
Sourcepub fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
pub fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
Setter for isUserInteractionEnabled.
pub fn tag(&self) -> NSInteger
pub fn layer(&self) -> Retained<CALayer>
objc2-quartz-core and non-watchOS only.pub fn canBecomeFocused(&self) -> bool
pub fn isFocused(&self) -> bool
Sourcepub fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
pub fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
The identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview’s focus group.
Sourcepub fn setFocusGroupIdentifier(&self, focus_group_identifier: Option<&NSString>)
pub fn setFocusGroupIdentifier(&self, focus_group_identifier: Option<&NSString>)
Setter for focusGroupIdentifier.
This is copied when set.
Sourcepub fn focusGroupPriority(&self) -> UIFocusGroupPriority
Available on crate feature UIFocus only.
pub fn focusGroupPriority(&self) -> UIFocusGroupPriority
UIFocus only.The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group. Note: this method can only be used to increase an item’s priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected).
Sourcepub fn setFocusGroupPriority(&self, focus_group_priority: UIFocusGroupPriority)
Available on crate feature UIFocus only.
pub fn setFocusGroupPriority(&self, focus_group_priority: UIFocusGroupPriority)
UIFocus only.Setter for focusGroupPriority.
Sourcepub fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
Available on crate feature UIFocusEffect only.
pub fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
UIFocusEffect only.Describes a visual effect to apply when this item is focused. If this property is nil no effect will be applied when this view becomes focused.
Sourcepub fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
Available on crate feature UIFocusEffect only.
pub fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
UIFocusEffect only.Setter for focusEffect.
This is copied when set.
pub fn semanticContentAttribute(&self) -> UISemanticContentAttribute
Sourcepub fn setSemanticContentAttribute(
&self,
semantic_content_attribute: UISemanticContentAttribute,
)
pub fn setSemanticContentAttribute( &self, semantic_content_attribute: UISemanticContentAttribute, )
Setter for semanticContentAttribute.
pub fn userInterfaceLayoutDirectionForSemanticContentAttribute( attribute: UISemanticContentAttribute, mtm: MainThreadMarker, ) -> UIUserInterfaceLayoutDirection
UIInterface only.pub fn userInterfaceLayoutDirectionForSemanticContentAttribute_relativeToLayoutDirection( semantic_content_attribute: UISemanticContentAttribute, layout_direction: UIUserInterfaceLayoutDirection, mtm: MainThreadMarker, ) -> UIUserInterfaceLayoutDirection
UIInterface only.pub fn effectiveUserInterfaceLayoutDirection( &self, ) -> UIUserInterfaceLayoutDirection
UIInterface only.Source§impl UIView
Methods declared on superclass NSObject.
impl UIView
Methods declared on superclass NSObject.
pub fn new(mtm: MainThreadMarker) -> Retained<Self>
Source§impl UIView
UIViewGeometry.
impl UIView
UIViewGeometry.
pub fn frame(&self) -> CGRect
objc2-core-foundation only.Sourcepub fn setFrame(&self, frame: CGRect)
Available on crate feature objc2-core-foundation only.
pub fn setFrame(&self, frame: CGRect)
objc2-core-foundation only.Setter for frame.
pub fn bounds(&self) -> CGRect
objc2-core-foundation only.Sourcepub fn setBounds(&self, bounds: CGRect)
Available on crate feature objc2-core-foundation only.
pub fn setBounds(&self, bounds: CGRect)
objc2-core-foundation only.Setter for bounds.
pub fn center(&self) -> CGPoint
objc2-core-foundation only.Sourcepub fn setCenter(&self, center: CGPoint)
Available on crate feature objc2-core-foundation only.
pub fn setCenter(&self, center: CGPoint)
objc2-core-foundation only.Setter for center.
pub fn transform(&self) -> CGAffineTransform
objc2-core-foundation only.Sourcepub fn setTransform(&self, transform: CGAffineTransform)
Available on crate feature objc2-core-foundation only.
pub fn setTransform(&self, transform: CGAffineTransform)
objc2-core-foundation only.Setter for transform.
pub fn transform3D(&self) -> CATransform3D
objc2-quartz-core and non-watchOS only.Sourcepub fn setTransform3D(&self, transform3_d: CATransform3D)
Available on crate feature objc2-quartz-core and non-watchOS only.
pub fn setTransform3D(&self, transform3_d: CATransform3D)
objc2-quartz-core and non-watchOS only.Setter for transform3D.
pub fn contentScaleFactor(&self) -> CGFloat
objc2-core-foundation only.Sourcepub fn setContentScaleFactor(&self, content_scale_factor: CGFloat)
Available on crate feature objc2-core-foundation only.
pub fn setContentScaleFactor(&self, content_scale_factor: CGFloat)
objc2-core-foundation only.Setter for contentScaleFactor.
pub fn anchorPoint(&self) -> CGPoint
objc2-core-foundation only.Sourcepub fn setAnchorPoint(&self, anchor_point: CGPoint)
Available on crate feature objc2-core-foundation only.
pub fn setAnchorPoint(&self, anchor_point: CGPoint)
objc2-core-foundation only.Setter for anchorPoint.
pub fn isMultipleTouchEnabled(&self) -> bool
Sourcepub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
pub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
Setter for isMultipleTouchEnabled.
pub fn isExclusiveTouch(&self) -> bool
Sourcepub fn setExclusiveTouch(&self, exclusive_touch: bool)
pub fn setExclusiveTouch(&self, exclusive_touch: bool)
Setter for isExclusiveTouch.
pub fn hitTest_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> Option<Retained<UIView>>
UIEvent and objc2-core-foundation only.pub fn pointInside_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> bool
UIEvent and objc2-core-foundation only.pub fn convertPoint_toView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation only.pub fn convertPoint_fromView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation only.pub fn convertRect_toView(&self, rect: CGRect, view: Option<&UIView>) -> CGRect
objc2-core-foundation only.pub fn convertRect_fromView( &self, rect: CGRect, view: Option<&UIView>, ) -> CGRect
objc2-core-foundation only.pub fn autoresizesSubviews(&self) -> bool
Sourcepub fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
pub fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
Setter for autoresizesSubviews.
pub fn autoresizingMask(&self) -> UIViewAutoresizing
Sourcepub fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
pub fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
Setter for autoresizingMask.
pub fn sizeThatFits(&self, size: CGSize) -> CGSize
objc2-core-foundation only.pub fn sizeToFit(&self)
Source§impl UIView
UIViewHierarchy.
impl UIView
UIViewHierarchy.
pub fn superview(&self) -> Option<Retained<UIView>>
pub fn subviews(&self) -> Retained<NSArray<UIView>>
pub fn window(&self) -> Option<Retained<UIWindow>>
UIWindow only.pub fn removeFromSuperview(&self)
pub fn insertSubview_atIndex(&self, view: &UIView, index: NSInteger)
pub fn exchangeSubviewAtIndex_withSubviewAtIndex( &self, index1: NSInteger, index2: NSInteger, )
pub fn addSubview(&self, view: &UIView)
pub fn insertSubview_belowSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub fn insertSubview_aboveSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub fn bringSubviewToFront(&self, view: &UIView)
pub fn sendSubviewToBack(&self, view: &UIView)
pub fn didAddSubview(&self, subview: &UIView)
pub fn willRemoveSubview(&self, subview: &UIView)
pub fn willMoveToSuperview(&self, new_superview: Option<&UIView>)
pub fn didMoveToSuperview(&self)
pub fn willMoveToWindow(&self, new_window: Option<&UIWindow>)
UIWindow only.pub fn didMoveToWindow(&self)
pub fn isDescendantOfView(&self, view: &UIView) -> bool
pub fn viewWithTag(&self, tag: NSInteger) -> Option<Retained<UIView>>
Sourcepub fn setNeedsUpdateProperties(&self)
pub fn setNeedsUpdateProperties(&self)
Call to manually request a properties update for the view. Multiple requests may be coalesced into a single update alongside the next layout pass.
Sourcepub fn updateProperties(&self)
pub fn updateProperties(&self)
Override point for subclasses to update properties of this view.
Never call this method directly; use setNeedsUpdateProperties to schedule an update.
Sourcepub fn updatePropertiesIfNeeded(&self)
pub fn updatePropertiesIfNeeded(&self)
Forces an immediate properties update for this view (and its view controller, if applicable) and any subviews, including any view controllers or views in its subtree.
pub fn setNeedsLayout(&self)
pub fn layoutIfNeeded(&self)
pub fn layoutSubviews(&self)
pub fn layoutMargins(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
Available on crate features UIGeometry and objc2-core-foundation only.
pub fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
UIGeometry and objc2-core-foundation only.Setter for layoutMargins.
pub fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub fn setDirectionalLayoutMargins(
&self,
directional_layout_margins: NSDirectionalEdgeInsets,
)
Available on crate features UIGeometry and objc2-core-foundation only.
pub fn setDirectionalLayoutMargins( &self, directional_layout_margins: NSDirectionalEdgeInsets, )
UIGeometry and objc2-core-foundation only.Setter for directionalLayoutMargins.
pub fn preservesSuperviewLayoutMargins(&self) -> bool
Sourcepub fn setPreservesSuperviewLayoutMargins(
&self,
preserves_superview_layout_margins: bool,
)
pub fn setPreservesSuperviewLayoutMargins( &self, preserves_superview_layout_margins: bool, )
Setter for preservesSuperviewLayoutMargins.
pub fn insetsLayoutMarginsFromSafeArea(&self) -> bool
Sourcepub fn setInsetsLayoutMarginsFromSafeArea(
&self,
insets_layout_margins_from_safe_area: bool,
)
pub fn setInsetsLayoutMarginsFromSafeArea( &self, insets_layout_margins_from_safe_area: bool, )
Setter for insetsLayoutMarginsFromSafeArea.
pub fn layoutMarginsDidChange(&self)
pub fn safeAreaInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.pub fn safeAreaInsetsDidChange(&self)
pub fn layoutMarginsGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.Sourcepub fn readableContentGuide(&self) -> Retained<UILayoutGuide>
Available on crate feature UILayoutGuide only.
pub fn readableContentGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.This content guide provides a layout area that you can use to place text and related content whose width should generally be constrained to a size that is easy for the user to read. This guide provides a centered region that you can place content within to get this behavior for this view.
pub fn safeAreaLayoutGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.Sourcepub fn keyboardLayoutGuide(&self) -> Retained<UIKeyboardLayoutGuide>
Available on crate features UIKeyboardLayoutGuide and UILayoutGuide and UITrackingLayoutGuide only.
pub fn keyboardLayoutGuide(&self) -> Retained<UIKeyboardLayoutGuide>
UIKeyboardLayoutGuide and UILayoutGuide and UITrackingLayoutGuide only.Follows the keyboard when on screen and docked. See UIKeyboardLayoutGuide.h for additional options.
Source§impl UIView
UIViewRendering.
impl UIView
UIViewRendering.
pub fn drawRect(&self, rect: CGRect)
objc2-core-foundation only.pub fn setNeedsDisplay(&self)
pub fn setNeedsDisplayInRect(&self, rect: CGRect)
objc2-core-foundation only.pub fn clipsToBounds(&self) -> bool
Sourcepub fn setClipsToBounds(&self, clips_to_bounds: bool)
pub fn setClipsToBounds(&self, clips_to_bounds: bool)
Setter for clipsToBounds.
pub fn backgroundColor(&self) -> Option<Retained<UIColor>>
UIColor only.Sourcepub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
Available on crate feature UIColor only.
pub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
UIColor only.Setter for backgroundColor.
This is copied when set.
pub fn alpha(&self) -> CGFloat
objc2-core-foundation only.Sourcepub fn setAlpha(&self, alpha: CGFloat)
Available on crate feature objc2-core-foundation only.
pub fn setAlpha(&self, alpha: CGFloat)
objc2-core-foundation only.Setter for alpha.
pub fn isOpaque(&self) -> bool
pub fn clearsContextBeforeDrawing(&self) -> bool
Sourcepub fn setClearsContextBeforeDrawing(&self, clears_context_before_drawing: bool)
pub fn setClearsContextBeforeDrawing(&self, clears_context_before_drawing: bool)
Setter for clearsContextBeforeDrawing.
pub fn isHidden(&self) -> bool
pub fn contentMode(&self) -> UIViewContentMode
Sourcepub fn setContentMode(&self, content_mode: UIViewContentMode)
pub fn setContentMode(&self, content_mode: UIViewContentMode)
Setter for contentMode.
pub fn contentStretch(&self) -> CGRect
objc2-core-foundation only.Sourcepub fn setContentStretch(&self, content_stretch: CGRect)
👎DeprecatedAvailable on crate feature objc2-core-foundation only.
pub fn setContentStretch(&self, content_stretch: CGRect)
objc2-core-foundation only.Setter for contentStretch.
pub fn maskView(&self) -> Option<Retained<UIView>>
Sourcepub fn setMaskView(&self, mask_view: Option<&UIView>)
pub fn setMaskView(&self, mask_view: Option<&UIView>)
Setter for maskView.
pub fn tintColor(&self) -> Option<Retained<UIColor>>
UIColor only.Sourcepub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
Available on crate feature UIColor only.
pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
UIColor only.pub fn tintAdjustmentMode(&self) -> UIViewTintAdjustmentMode
Sourcepub fn setTintAdjustmentMode(
&self,
tint_adjustment_mode: UIViewTintAdjustmentMode,
)
pub fn setTintAdjustmentMode( &self, tint_adjustment_mode: UIViewTintAdjustmentMode, )
Setter for tintAdjustmentMode.
pub fn tintColorDidChange(&self)
Source§impl UIView
UIViewAnimation.
impl UIView
UIViewAnimation.
pub fn setAnimationsEnabled(enabled: bool, mtm: MainThreadMarker)
pub fn areAnimationsEnabled(mtm: MainThreadMarker) -> bool
pub fn performWithoutAnimation( actions_without_animation: &DynBlock<dyn Fn() + '_>, mtm: MainThreadMarker, )
block2 only.pub fn inheritedAnimationDuration(mtm: MainThreadMarker) -> NSTimeInterval
Source§impl UIView
UIViewAnimationWithBlocks.
impl UIView
UIViewAnimationWithBlocks.
pub fn animateWithDuration_delay_options_animations_completion( duration: NSTimeInterval, delay: NSTimeInterval, options: UIViewAnimationOptions, animations: &DynBlock<dyn Fn()>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 only.pub fn animateWithDuration_animations_completion( duration: NSTimeInterval, animations: &DynBlock<dyn Fn()>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 only.pub fn animateWithDuration_animations( duration: NSTimeInterval, animations: &DynBlock<dyn Fn()>, mtm: MainThreadMarker, )
block2 only.pub fn animateWithSpringDuration_bounce_initialSpringVelocity_delay_options_animations_completion( duration: NSTimeInterval, bounce: CGFloat, velocity: CGFloat, delay: NSTimeInterval, options: UIViewAnimationOptions, animations: &DynBlock<dyn Fn() + '_>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 and objc2-core-foundation only.pub fn animateWithDuration_delay_usingSpringWithDamping_initialSpringVelocity_options_animations_completion( duration: NSTimeInterval, delay: NSTimeInterval, damping_ratio: CGFloat, velocity: CGFloat, options: UIViewAnimationOptions, animations: &DynBlock<dyn Fn()>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 and objc2-core-foundation only.pub fn transitionWithView_duration_options_animations_completion( view: &UIView, duration: NSTimeInterval, options: UIViewAnimationOptions, animations: Option<&DynBlock<dyn Fn()>>, completion: Option<&DynBlock<dyn Fn(Bool)>>, )
block2 only.pub fn transitionFromView_toView_duration_options_completion( from_view: &UIView, to_view: &UIView, duration: NSTimeInterval, options: UIViewAnimationOptions, completion: Option<&DynBlock<dyn Fn(Bool)>>, )
block2 only.pub fn performSystemAnimation_onViews_options_animations_completion( animation: UISystemAnimation, views: &NSArray<UIView>, options: UIViewAnimationOptions, parallel_animations: Option<&DynBlock<dyn Fn()>>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 only.pub fn modifyAnimationsWithRepeatCount_autoreverses_animations( count: CGFloat, autoreverses: bool, animations: &DynBlock<dyn Fn() + '_>, mtm: MainThreadMarker, )
block2 and objc2-core-foundation only.Source§impl UIView
UIViewKeyframeAnimations.
impl UIView
UIViewKeyframeAnimations.
pub fn animateKeyframesWithDuration_delay_options_animations_completion( duration: NSTimeInterval, delay: NSTimeInterval, options: UIViewKeyframeAnimationOptions, animations: &DynBlock<dyn Fn()>, completion: Option<&DynBlock<dyn Fn(Bool)>>, mtm: MainThreadMarker, )
block2 only.pub fn addKeyframeWithRelativeStartTime_relativeDuration_animations( frame_start_time: c_double, frame_duration: c_double, animations: &DynBlock<dyn Fn()>, mtm: MainThreadMarker, )
block2 only.Source§impl UIView
UIViewGestureRecognizers.
impl UIView
UIViewGestureRecognizers.
pub fn gestureRecognizers( &self, ) -> Option<Retained<NSArray<UIGestureRecognizer>>>
UIGestureRecognizer only.Sourcepub fn setGestureRecognizers(
&self,
gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>,
)
Available on crate feature UIGestureRecognizer only.
pub fn setGestureRecognizers( &self, gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>, )
UIGestureRecognizer only.Setter for gestureRecognizers.
This is copied when set.
pub fn addGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer only.pub fn removeGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer only.pub fn gestureRecognizerShouldBegin( &self, gesture_recognizer: &UIGestureRecognizer, ) -> bool
UIGestureRecognizer only.Source§impl UIView
UIViewMotionEffects.
impl UIView
UIViewMotionEffects.
Sourcepub fn addMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect only.
pub fn addMotionEffect(&self, effect: &UIMotionEffect)
UIMotionEffect only.Begins applying effect to the receiver. The effect’s emitted keyPath/value pairs will be
applied to the view’s presentation layer.
Animates the transition to the motion effect’s values using the present UIView animation context.
Sourcepub fn removeMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect only.
pub fn removeMotionEffect(&self, effect: &UIMotionEffect)
UIMotionEffect only.Stops applying effect to the receiver. Any affected presentation values will animate to
their post-removal values using the present UIView animation context.
pub fn motionEffects(&self) -> Retained<NSArray<UIMotionEffect>>
UIMotionEffect only.Sourcepub fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
Available on crate feature UIMotionEffect only.
pub fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
UIMotionEffect only.Setter for motionEffects.
This is copied when set.
Source§impl UIView
UIConstraintBasedLayoutInstallingConstraints.
impl UIView
UIConstraintBasedLayoutInstallingConstraints.
pub fn constraints(&self) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint only.pub fn addConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint only.pub fn addConstraints(&self, constraints: &NSArray<NSLayoutConstraint>)
NSLayoutConstraint only.pub fn removeConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint only.pub fn removeConstraints(&self, constraints: &NSArray<NSLayoutConstraint>)
NSLayoutConstraint only.Source§impl UIView
UIConstraintBasedLayoutCoreMethods.
impl UIView
UIConstraintBasedLayoutCoreMethods.
pub fn updateConstraintsIfNeeded(&self)
pub fn updateConstraints(&self)
pub fn needsUpdateConstraints(&self) -> bool
pub fn setNeedsUpdateConstraints(&self)
Source§impl UIView
UIConstraintBasedCompatibility.
impl UIView
UIConstraintBasedCompatibility.
pub fn translatesAutoresizingMaskIntoConstraints(&self) -> bool
Sourcepub fn setTranslatesAutoresizingMaskIntoConstraints(
&self,
translates_autoresizing_mask_into_constraints: bool,
)
pub fn setTranslatesAutoresizingMaskIntoConstraints( &self, translates_autoresizing_mask_into_constraints: bool, )
Setter for translatesAutoresizingMaskIntoConstraints.
pub fn requiresConstraintBasedLayout(mtm: MainThreadMarker) -> bool
Source§impl UIView
UIConstraintBasedLayoutLayering.
impl UIView
UIConstraintBasedLayoutLayering.
pub fn alignmentRectForFrame(&self, frame: CGRect) -> CGRect
objc2-core-foundation only.pub fn frameForAlignmentRect(&self, alignment_rect: CGRect) -> CGRect
objc2-core-foundation only.pub fn alignmentRectInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.pub fn viewForBaselineLayout(&self) -> Retained<UIView>
pub fn viewForFirstBaselineLayout(&self) -> Retained<UIView>
pub fn viewForLastBaselineLayout(&self) -> Retained<UIView>
pub fn intrinsicContentSize(&self) -> CGSize
objc2-core-foundation only.pub fn invalidateIntrinsicContentSize(&self)
pub fn contentHuggingPriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint only.pub fn setContentHuggingPriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint only.pub fn contentCompressionResistancePriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint only.pub fn setContentCompressionResistancePriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint only.Source§impl UIView
UIConstraintBasedLayoutFittingSize.
impl UIView
UIConstraintBasedLayoutFittingSize.
pub fn systemLayoutSizeFittingSize(&self, target_size: CGSize) -> CGSize
objc2-core-foundation only.pub fn systemLayoutSizeFittingSize_withHorizontalFittingPriority_verticalFittingPriority( &self, target_size: CGSize, horizontal_fitting_priority: UILayoutPriority, vertical_fitting_priority: UILayoutPriority, ) -> CGSize
NSLayoutConstraint and objc2-core-foundation only.Source§impl UIView
UILayoutGuideSupport.
impl UIView
UILayoutGuideSupport.
pub fn layoutGuides(&self) -> Retained<NSArray<UILayoutGuide>>
UILayoutGuide only.pub fn addLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide only.pub fn removeLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide only.Source§impl UIView
UIViewLayoutConstraintCreation.
impl UIView
UIViewLayoutConstraintCreation.
pub fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub fn widthAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor only.pub fn heightAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor only.pub fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub fn firstBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub fn lastBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.Source§impl UIView
UIConstraintBasedLayoutDebugging.
impl UIView
UIConstraintBasedLayoutDebugging.
pub fn constraintsAffectingLayoutForAxis( &self, axis: UILayoutConstraintAxis, ) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint only.pub fn hasAmbiguousLayout(&self) -> bool
pub fn exerciseAmbiguityInLayout(&self)
Source§impl UIView
UIStateRestoration.
impl UIView
UIStateRestoration.
pub fn restorationIdentifier(&self) -> Option<Retained<NSString>>
Sourcepub fn setRestorationIdentifier(
&self,
restoration_identifier: Option<&NSString>,
)
pub fn setRestorationIdentifier( &self, restoration_identifier: Option<&NSString>, )
Setter for restorationIdentifier.
This is copied when set.
Sourcepub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
§Safety
coder possibly has further requirements.
Sourcepub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
§Safety
coder possibly has further requirements.
Source§impl UIView
UISnapshotting.
impl UIView
UISnapshotting.
pub fn snapshotViewAfterScreenUpdates( &self, after_updates: bool, ) -> Option<Retained<UIView>>
pub fn resizableSnapshotViewFromRect_afterScreenUpdates_withCapInsets( &self, rect: CGRect, after_updates: bool, cap_insets: UIEdgeInsets, ) -> Option<Retained<UIView>>
UIGeometry and objc2-core-foundation only.pub fn drawViewHierarchyInRect_afterScreenUpdates( &self, rect: CGRect, after_updates: bool, ) -> bool
objc2-core-foundation only.Source§impl UIView
DeprecatedAnimations.
impl UIView
DeprecatedAnimations.
Sourcepub unsafe fn beginAnimations_context(
animation_id: Option<&NSString>,
context: *mut c_void,
mtm: MainThreadMarker,
)
👎Deprecated: Use the block-based animation API instead
pub unsafe fn beginAnimations_context( animation_id: Option<&NSString>, context: *mut c_void, mtm: MainThreadMarker, )
§Safety
context must be a valid pointer or null.
pub fn commitAnimations(mtm: MainThreadMarker)
Sourcepub unsafe fn setAnimationDelegate(
delegate: Option<&AnyObject>,
mtm: MainThreadMarker,
)
👎Deprecated: Use the block-based animation API instead
pub unsafe fn setAnimationDelegate( delegate: Option<&AnyObject>, mtm: MainThreadMarker, )
§Safety
delegate should be of the correct type.
Sourcepub unsafe fn setAnimationWillStartSelector(
selector: Option<Sel>,
mtm: MainThreadMarker,
)
👎Deprecated: Use the block-based animation API instead
pub unsafe fn setAnimationWillStartSelector( selector: Option<Sel>, mtm: MainThreadMarker, )
§Safety
selector must be a valid selector.
Sourcepub unsafe fn setAnimationDidStopSelector(
selector: Option<Sel>,
mtm: MainThreadMarker,
)
👎Deprecated: Use the block-based animation API instead
pub unsafe fn setAnimationDidStopSelector( selector: Option<Sel>, mtm: MainThreadMarker, )
§Safety
selector must be a valid selector.
pub fn setAnimationDuration(duration: NSTimeInterval, mtm: MainThreadMarker)
pub fn setAnimationDelay(delay: NSTimeInterval, mtm: MainThreadMarker)
pub fn setAnimationStartDate(start_date: &NSDate, mtm: MainThreadMarker)
pub fn setAnimationCurve(curve: UIViewAnimationCurve, mtm: MainThreadMarker)
pub fn setAnimationRepeatCount(repeat_count: c_float, mtm: MainThreadMarker)
pub fn setAnimationRepeatAutoreverses( repeat_autoreverses: bool, mtm: MainThreadMarker, )
pub fn setAnimationBeginsFromCurrentState( from_current_state: bool, mtm: MainThreadMarker, )
pub fn setAnimationTransition_forView_cache( transition: UIViewAnimationTransition, view: &UIView, cache: bool, )
Source§impl UIView
UserInterfaceStyle.
impl UIView
UserInterfaceStyle.
pub fn overrideUserInterfaceStyle(&self) -> UIUserInterfaceStyle
UIInterface only.Sourcepub fn setOverrideUserInterfaceStyle(
&self,
override_user_interface_style: UIUserInterfaceStyle,
)
Available on crate feature UIInterface only.
pub fn setOverrideUserInterfaceStyle( &self, override_user_interface_style: UIUserInterfaceStyle, )
UIInterface only.Setter for overrideUserInterfaceStyle.
Source§impl UIView
UIContentSizeCategoryLimit.
impl UIView
UIContentSizeCategoryLimit.
Sourcepub fn minimumContentSizeCategory(
&self,
) -> Option<Retained<UIContentSizeCategory>>
Available on crate feature UIContentSizeCategory only.
pub fn minimumContentSizeCategory( &self, ) -> Option<Retained<UIContentSizeCategory>>
UIContentSizeCategory only.Specify content size category limits. Setting one or both of these properties will limit the content size category for this view (and its subviews) to a minimum or a maximum value. You can use this to limit the support content size categories on part of your view hierarchy. Setting this to nil removes the limit on the minimum or maximum. Limits will be applied immediately and when future content size category updates occur.
Specifying a minimum limit that is greater than the maximum limit (or vice versa) will effectively only use the maximum limit.
Example:
// limit the support content size categories between .medium and .accessibilityExtraLarge (included). view.minimumContentSizeCategory = UIContentSizeCategoryMedium; view.maximumContentSizeCategory = UIContentSizeCategoryAccessibilityExtraLarge;
Sourcepub fn setMinimumContentSizeCategory(
&self,
minimum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory only.
pub fn setMinimumContentSizeCategory( &self, minimum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory only.Setter for minimumContentSizeCategory.
This is copied when set.
pub fn maximumContentSizeCategory( &self, ) -> Option<Retained<UIContentSizeCategory>>
UIContentSizeCategory only.Sourcepub fn setMaximumContentSizeCategory(
&self,
maximum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory only.
pub fn setMaximumContentSizeCategory( &self, maximum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory only.Setter for maximumContentSizeCategory.
This is copied when set.
Sourcepub fn appliedContentSizeCategoryLimitsDescription(&self) -> Retained<NSString>
pub fn appliedContentSizeCategoryLimitsDescription(&self) -> Retained<NSString>
Will return a string with a log of all the superviews of this view, alongside with what content size category each view has and if that view has limits applied. This is for debugging purposes only.
Source§impl UIView
impl UIView
pub fn traitOverrides(&self) -> Retained<ProtocolObject<dyn UITraitOverrides>>
UITraitCollection only.Sourcepub fn updateTraitsIfNeeded(&self)
pub fn updateTraitsIfNeeded(&self)
Forces an immediate trait update for this view (and its view controller, if applicable) and any subviews, including any view controllers or views in its subtree. Any trait change callbacks are sent synchronously.
Source§impl UIView
LayoutRegions.
impl UIView
LayoutRegions.
pub fn layoutGuideForLayoutRegion( &self, layout_region: &UIViewLayoutRegion, ) -> Retained<UILayoutGuide>
UILayoutGuide and UIViewLayoutRegion only.pub fn edgeInsetsForLayoutRegion( &self, layout_region: &UIViewLayoutRegion, ) -> UIEdgeInsets
UIGeometry and UIViewLayoutRegion and objc2-core-foundation only.pub fn directionalEdgeInsetsForLayoutRegion( &self, layout_region: &UIViewLayoutRegion, ) -> NSDirectionalEdgeInsets
UIGeometry and UIViewLayoutRegion and objc2-core-foundation only.Source§impl UIView
CornerConfiguration.
impl UIView
CornerConfiguration.
Sourcepub fn cornerConfiguration(&self) -> Retained<UICornerConfiguration>
Available on crate feature UICornerConfiguration only.
pub fn cornerConfiguration(&self) -> Retained<UICornerConfiguration>
UICornerConfiguration only.A configuration that defines the corners of the view.
Sourcepub fn setCornerConfiguration(
&self,
corner_configuration: &UICornerConfiguration,
)
Available on crate feature UICornerConfiguration only.
pub fn setCornerConfiguration( &self, corner_configuration: &UICornerConfiguration, )
UICornerConfiguration only.Setter for cornerConfiguration.
This is copied when set.
Sourcepub fn effectiveRadiusForCorner(&self, corner: UIRectCorner) -> CGFloat
Available on crate features UIGeometry and objc2-core-foundation only.
pub fn effectiveRadiusForCorner(&self, corner: UIRectCorner) -> CGFloat
UIGeometry and objc2-core-foundation only.Returns the effective radius for the given corner, calculated using the view’s current cornerConfiguration.
When invoked within UIView.layoutSubviews(), UIView.updateProperties(), or UIViewController.updateProperties() automatic invalidation will occur if the effective radius changes.
If more than one corner is provided, the returned radius represents the maximum effective radius of those corners.
- Parameter corner: The corner.
- Returns: The effective radius.
Methods from Deref<Target = UIResponder>§
pub fn nextResponder(&self) -> Option<Retained<UIResponder>>
pub fn canBecomeFirstResponder(&self) -> bool
pub fn becomeFirstResponder(&self) -> bool
pub fn canResignFirstResponder(&self) -> bool
pub fn resignFirstResponder(&self) -> bool
pub fn isFirstResponder(&self) -> bool
pub fn touchesBegan_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub fn touchesMoved_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub fn touchesEnded_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub fn touchesCancelled_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub fn touchesEstimatedPropertiesUpdated(&self, touches: &NSSet<UITouch>)
UITouch only.pub fn pressesBegan_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub fn pressesChanged_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub fn pressesEnded_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub fn pressesCancelled_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub fn motionBegan_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub fn motionEnded_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub fn motionCancelled_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub fn remoteControlReceivedWithEvent(&self, event: Option<&UIEvent>)
UIEvent only.Sourcepub unsafe fn canPerformAction_withSender(
&self,
action: Sel,
sender: Option<&AnyObject>,
) -> bool
pub unsafe fn canPerformAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> bool
§Safety
actionmust be a valid selector.sendershould be of the correct type.
Sourcepub unsafe fn targetForAction_withSender(
&self,
action: Sel,
sender: Option<&AnyObject>,
) -> Option<Retained<AnyObject>>
pub unsafe fn targetForAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> Option<Retained<AnyObject>>
§Safety
actionmust be a valid selector.sendershould be of the correct type.
pub fn buildMenuWithBuilder(&self, builder: &ProtocolObject<dyn UIMenuBuilder>)
UIMenuBuilder only.pub fn validateCommand(&self, command: &UICommand)
UICommand and UIMenuElement only.Sourcepub fn providerForDeferredMenuElement(
&self,
deferred_element: &UIDeferredMenuElement,
) -> Option<Retained<UIDeferredMenuElementProvider>>
Available on crate features UIDeferredMenuElement and UIMenuElement only.
pub fn providerForDeferredMenuElement( &self, deferred_element: &UIDeferredMenuElement, ) -> Option<Retained<UIDeferredMenuElementProvider>>
UIDeferredMenuElement and UIMenuElement only.Asks the responder for an element provider to fulfill the given focus-based deferred element.
Check the identifier of the deferred element to identify which deferred element this is.
By default, this returns nil. Return a non-nil provider to make this responder responsible for providing
elements for this fulfillment of the deferred element.
pub fn undoManager(&self) -> Option<Retained<NSUndoManager>>
pub fn editingInteractionConfiguration( &self, ) -> UIEditingInteractionConfiguration
pub fn keyCommands(&self) -> Option<Retained<NSArray<UIKeyCommand>>>
UICommand and UIKeyCommand and UIMenuElement only.pub fn inputView(&self) -> Option<Retained<UIView>>
pub fn inputAccessoryView(&self) -> Option<Retained<UIView>>
Sourcepub fn inputAssistantItem(&self) -> Retained<UITextInputAssistantItem>
Available on crate feature UITextInput only.
pub fn inputAssistantItem(&self) -> Retained<UITextInputAssistantItem>
UITextInput only.This method is for clients that wish to put buttons on the Shortcuts Bar, shown on top of the keyboard. You may modify the returned inputAssistantItem to add to or replace the existing items on the bar. Modifications made to the returned UITextInputAssistantItem are reflected automatically. This method should not be overridden. Goes up the responder chain.
pub fn inputViewController(&self) -> Option<Retained<UIInputViewController>>
UIInputViewController and UIViewController only.pub fn inputAccessoryViewController( &self, ) -> Option<Retained<UIInputViewController>>
UIInputViewController and UIViewController only.pub fn textInputMode(&self) -> Option<Retained<UITextInputMode>>
UITextInput only.pub fn textInputContextIdentifier(&self) -> Option<Retained<NSString>>
pub fn reloadInputViews(&self)
pub fn userActivity(&self) -> Option<Retained<NSUserActivity>>
Sourcepub fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
pub fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
Setter for userActivity.
pub fn updateUserActivityState(&self, activity: &NSUserActivity)
pub fn restoreUserActivityState(&self, activity: &NSUserActivity)
Sourcepub unsafe fn captureTextFromCamera(&self, sender: Option<&AnyObject>)
pub unsafe fn captureTextFromCamera(&self, sender: Option<&AnyObject>)
§Safety
sender should be of the correct type.
pub fn activityItemsConfiguration( &self, ) -> Option<Retained<ProtocolObject<dyn UIActivityItemsConfigurationReading>>>
UIResponder_UIActivityItemsConfiguration and UIActivityItemsConfigurationReading only.Sourcepub fn setActivityItemsConfiguration(
&self,
activity_items_configuration: Option<&ProtocolObject<dyn UIActivityItemsConfigurationReading>>,
)
Available on crate features UIResponder_UIActivityItemsConfiguration and UIActivityItemsConfigurationReading only.
pub fn setActivityItemsConfiguration( &self, activity_items_configuration: Option<&ProtocolObject<dyn UIActivityItemsConfigurationReading>>, )
UIResponder_UIActivityItemsConfiguration and UIActivityItemsConfigurationReading only.Setter for activityItemsConfiguration.
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature UIIndirectScribbleInteraction only.
pub fn class(&self) -> &'static AnyClass
UIIndirectScribbleInteraction only.Dynamically find the class of this object.
§Panics
May panic if the object is invalid (which may be the case for objects
returned from unavailable init/new methods).
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.Available on crate feature UIIndirectScribbleInteraction only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.UIIndirectScribbleInteraction only.Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
Available on crate feature UIIndirectScribbleInteraction only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
UIIndirectScribbleInteraction only.Attempt to downcast the object to a class of type T.
This is the reference-variant. Use Retained::downcast if you want
to convert a retained object to another type.
§Mutable classes
Some classes have immutable and mutable variants, such as NSString
and NSMutableString.
When some Objective-C API signature says it gives you an immutable class, it generally expects you to not mutate that, even though it may technically be mutable “under the hood”.
So using this method to convert a NSString to a NSMutableString,
while not unsound, is generally frowned upon unless you created the
string yourself, or the API explicitly documents the string to be
mutable.
See Apple’s documentation on mutability and on
isKindOfClass: for more details.
§Generic classes
Objective-C generics are called “lightweight generics”, and that’s because they aren’t exposed in the runtime. This makes it impossible to safely downcast to generic collections, so this is disallowed by this method.
You can, however, safely downcast to generic collections where all the
type-parameters are AnyObject.
§Panics
This works internally by calling isKindOfClass:. That means that the
object must have the instance method of that name, and an exception
will be thrown (if CoreFoundation is linked) or the process will abort
if that is not the case. In the vast majority of cases, you don’t need
to worry about this, since both root objects NSObject and
NSProxy implement this method.
§Examples
Cast an NSString back and forth from NSObject.
use objc2::rc::Retained;
use objc2_foundation::{NSObject, NSString};
let obj: Retained<NSObject> = NSString::new().into_super();
let string = obj.downcast_ref::<NSString>().unwrap();
// Or with `downcast`, if we do not need the object afterwards
let string = obj.downcast::<NSString>().unwrap();Try (and fail) to cast an NSObject to an NSString.
use objc2_foundation::{NSObject, NSString};
let obj = NSObject::new();
assert!(obj.downcast_ref::<NSString>().is_none());Try to cast to an array of strings.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
// This is invalid and doesn't type check.
let arr = arr.downcast_ref::<NSArray<NSString>>();This fails to compile, since it would require enumerating over the array to ensure that each element is of the desired type, which is a performance pitfall.
Downcast when processing each element instead.
use objc2_foundation::{NSArray, NSObject, NSString};
let arr = NSArray::from_retained_slice(&[NSObject::new()]);
for elem in arr {
if let Some(data) = elem.downcast_ref::<NSString>() {
// handle `data`
}
}Trait Implementations§
Source§impl AsRef<UIResponder> for UIView
impl AsRef<UIResponder> for UIView
Source§fn as_ref(&self) -> &UIResponder
fn as_ref(&self) -> &UIResponder
Source§impl AsRef<UIView> for UIActionSheet
Available on crate feature UIActionSheet only.
impl AsRef<UIView> for UIActionSheet
UIActionSheet only.Source§impl AsRef<UIView> for UIActivityIndicatorView
Available on crate feature UIActivityIndicatorView only.
impl AsRef<UIView> for UIActivityIndicatorView
UIActivityIndicatorView only.Source§impl AsRef<UIView> for UIAlertView
Available on crate feature UIAlertView only.
impl AsRef<UIView> for UIAlertView
UIAlertView only.Source§impl AsRef<UIView> for UIBackgroundExtensionView
Available on crate feature UIBackgroundExtensionView only.
impl AsRef<UIView> for UIBackgroundExtensionView
UIBackgroundExtensionView only.Source§impl AsRef<UIView> for UICalendarView
Available on crate feature UICalendarView only.
impl AsRef<UIView> for UICalendarView
UICalendarView only.Source§impl AsRef<UIView> for UICollectionReusableView
Available on crate feature UICollectionViewCell only.
impl AsRef<UIView> for UICollectionReusableView
UICollectionViewCell only.Source§impl AsRef<UIView> for UICollectionView
Available on crate features UIScrollView and UICollectionView only.
impl AsRef<UIView> for UICollectionView
UIScrollView and UICollectionView only.Source§impl AsRef<UIView> for UICollectionViewCell
Available on crate feature UICollectionViewCell only.
impl AsRef<UIView> for UICollectionViewCell
UICollectionViewCell only.Source§impl AsRef<UIView> for UICollectionViewListCell
Available on crate features UICollectionViewCell and UICollectionViewListCell only.
impl AsRef<UIView> for UICollectionViewListCell
UICollectionViewCell and UICollectionViewListCell only.Source§impl AsRef<UIView> for UIColorWell
Available on crate features UIControl and UIColorWell only.
impl AsRef<UIView> for UIColorWell
UIControl and UIColorWell only.Source§impl AsRef<UIView> for UIDatePicker
Available on crate features UIControl and UIDatePicker only.
impl AsRef<UIView> for UIDatePicker
UIControl and UIDatePicker only.Source§impl AsRef<UIView> for UIEventAttributionView
Available on crate feature UIEventAttributionView only.
impl AsRef<UIView> for UIEventAttributionView
UIEventAttributionView only.Source§impl AsRef<UIView> for UIImageView
Available on crate feature UIImageView only.
impl AsRef<UIView> for UIImageView
UIImageView only.Source§impl AsRef<UIView> for UIInputView
Available on crate feature UIInputView only.
impl AsRef<UIView> for UIInputView
UIInputView only.Source§impl AsRef<UIView> for UIListContentView
Available on crate feature UIListContentConfiguration only.
impl AsRef<UIView> for UIListContentView
UIListContentConfiguration only.Source§impl AsRef<UIView> for UIPageControl
Available on crate features UIControl and UIPageControl only.
impl AsRef<UIView> for UIPageControl
UIControl and UIPageControl only.Source§impl AsRef<UIView> for UIPasteControl
Available on crate features UIControl and UIPasteControl only.
impl AsRef<UIView> for UIPasteControl
UIControl and UIPasteControl only.Source§impl AsRef<UIView> for UIPickerView
Available on crate feature UIPickerView only.
impl AsRef<UIView> for UIPickerView
UIPickerView only.Source§impl AsRef<UIView> for UIPopoverBackgroundView
Available on crate feature UIPopoverBackgroundView only.
impl AsRef<UIView> for UIPopoverBackgroundView
UIPopoverBackgroundView only.Source§impl AsRef<UIView> for UIProgressView
Available on crate feature UIProgressView only.
impl AsRef<UIView> for UIProgressView
UIProgressView only.Source§impl AsRef<UIView> for UIRefreshControl
Available on crate features UIControl and UIRefreshControl only.
impl AsRef<UIView> for UIRefreshControl
UIControl and UIRefreshControl only.Source§impl AsRef<UIView> for UIScrollView
Available on crate feature UIScrollView only.
impl AsRef<UIView> for UIScrollView
UIScrollView only.Source§impl AsRef<UIView> for UISearchBar
Available on crate feature UISearchBar only.
impl AsRef<UIView> for UISearchBar
UISearchBar only.Source§impl AsRef<UIView> for UISearchTextField
Available on crate features UIControl and UITextField and UISearchTextField only.
impl AsRef<UIView> for UISearchTextField
UIControl and UITextField and UISearchTextField only.Source§impl AsRef<UIView> for UISegmentedControl
Available on crate features UIControl and UISegmentedControl only.
impl AsRef<UIView> for UISegmentedControl
UIControl and UISegmentedControl only.Source§impl AsRef<UIView> for UIStackView
Available on crate feature UIStackView only.
impl AsRef<UIView> for UIStackView
UIStackView only.Source§impl AsRef<UIView> for UIStandardTextCursorView
Available on crate feature UIStandardTextCursorView only.
impl AsRef<UIView> for UIStandardTextCursorView
UIStandardTextCursorView only.Source§impl AsRef<UIView> for UITableView
Available on crate features UIScrollView and UITableView only.
impl AsRef<UIView> for UITableView
UIScrollView and UITableView only.Source§impl AsRef<UIView> for UITableViewCell
Available on crate feature UITableViewCell only.
impl AsRef<UIView> for UITableViewCell
UITableViewCell only.Source§impl AsRef<UIView> for UITextField
Available on crate features UIControl and UITextField only.
impl AsRef<UIView> for UITextField
UIControl and UITextField only.Source§impl AsRef<UIView> for UITextView
Available on crate features UIScrollView and UITextView only.
impl AsRef<UIView> for UITextView
UIScrollView and UITextView only.Source§impl AsRef<UIView> for UIVisualEffectView
Available on crate feature UIVisualEffectView only.
impl AsRef<UIView> for UIVisualEffectView
UIVisualEffectView only.Source§impl Borrow<UIResponder> for UIView
impl Borrow<UIResponder> for UIView
Source§fn borrow(&self) -> &UIResponder
fn borrow(&self) -> &UIResponder
Source§impl Borrow<UIView> for UIActionSheet
Available on crate feature UIActionSheet only.
impl Borrow<UIView> for UIActionSheet
UIActionSheet only.Source§impl Borrow<UIView> for UIActivityIndicatorView
Available on crate feature UIActivityIndicatorView only.
impl Borrow<UIView> for UIActivityIndicatorView
UIActivityIndicatorView only.Source§impl Borrow<UIView> for UIAlertView
Available on crate feature UIAlertView only.
impl Borrow<UIView> for UIAlertView
UIAlertView only.Source§impl Borrow<UIView> for UIBackgroundExtensionView
Available on crate feature UIBackgroundExtensionView only.
impl Borrow<UIView> for UIBackgroundExtensionView
UIBackgroundExtensionView only.Source§impl Borrow<UIView> for UICalendarView
Available on crate feature UICalendarView only.
impl Borrow<UIView> for UICalendarView
UICalendarView only.Source§impl Borrow<UIView> for UICollectionReusableView
Available on crate feature UICollectionViewCell only.
impl Borrow<UIView> for UICollectionReusableView
UICollectionViewCell only.Source§impl Borrow<UIView> for UICollectionView
Available on crate features UIScrollView and UICollectionView only.
impl Borrow<UIView> for UICollectionView
UIScrollView and UICollectionView only.Source§impl Borrow<UIView> for UICollectionViewCell
Available on crate feature UICollectionViewCell only.
impl Borrow<UIView> for UICollectionViewCell
UICollectionViewCell only.Source§impl Borrow<UIView> for UICollectionViewListCell
Available on crate features UICollectionViewCell and UICollectionViewListCell only.
impl Borrow<UIView> for UICollectionViewListCell
UICollectionViewCell and UICollectionViewListCell only.Source§impl Borrow<UIView> for UIColorWell
Available on crate features UIControl and UIColorWell only.
impl Borrow<UIView> for UIColorWell
UIControl and UIColorWell only.Source§impl Borrow<UIView> for UIDatePicker
Available on crate features UIControl and UIDatePicker only.
impl Borrow<UIView> for UIDatePicker
UIControl and UIDatePicker only.Source§impl Borrow<UIView> for UIEventAttributionView
Available on crate feature UIEventAttributionView only.
impl Borrow<UIView> for UIEventAttributionView
UIEventAttributionView only.Source§impl Borrow<UIView> for UIImageView
Available on crate feature UIImageView only.
impl Borrow<UIView> for UIImageView
UIImageView only.Source§impl Borrow<UIView> for UIInputView
Available on crate feature UIInputView only.
impl Borrow<UIView> for UIInputView
UIInputView only.Source§impl Borrow<UIView> for UIListContentView
Available on crate feature UIListContentConfiguration only.
impl Borrow<UIView> for UIListContentView
UIListContentConfiguration only.Source§impl Borrow<UIView> for UIPageControl
Available on crate features UIControl and UIPageControl only.
impl Borrow<UIView> for UIPageControl
UIControl and UIPageControl only.Source§impl Borrow<UIView> for UIPasteControl
Available on crate features UIControl and UIPasteControl only.
impl Borrow<UIView> for UIPasteControl
UIControl and UIPasteControl only.Source§impl Borrow<UIView> for UIPickerView
Available on crate feature UIPickerView only.
impl Borrow<UIView> for UIPickerView
UIPickerView only.Source§impl Borrow<UIView> for UIPopoverBackgroundView
Available on crate feature UIPopoverBackgroundView only.
impl Borrow<UIView> for UIPopoverBackgroundView
UIPopoverBackgroundView only.Source§impl Borrow<UIView> for UIProgressView
Available on crate feature UIProgressView only.
impl Borrow<UIView> for UIProgressView
UIProgressView only.Source§impl Borrow<UIView> for UIRefreshControl
Available on crate features UIControl and UIRefreshControl only.
impl Borrow<UIView> for UIRefreshControl
UIControl and UIRefreshControl only.Source§impl Borrow<UIView> for UIScrollView
Available on crate feature UIScrollView only.
impl Borrow<UIView> for UIScrollView
UIScrollView only.Source§impl Borrow<UIView> for UISearchBar
Available on crate feature UISearchBar only.
impl Borrow<UIView> for UISearchBar
UISearchBar only.Source§impl Borrow<UIView> for UISearchTextField
Available on crate features UIControl and UITextField and UISearchTextField only.
impl Borrow<UIView> for UISearchTextField
UIControl and UITextField and UISearchTextField only.Source§impl Borrow<UIView> for UISegmentedControl
Available on crate features UIControl and UISegmentedControl only.
impl Borrow<UIView> for UISegmentedControl
UIControl and UISegmentedControl only.Source§impl Borrow<UIView> for UIStackView
Available on crate feature UIStackView only.
impl Borrow<UIView> for UIStackView
UIStackView only.Source§impl Borrow<UIView> for UIStandardTextCursorView
Available on crate feature UIStandardTextCursorView only.
impl Borrow<UIView> for UIStandardTextCursorView
UIStandardTextCursorView only.Source§impl Borrow<UIView> for UITableView
Available on crate features UIScrollView and UITableView only.
impl Borrow<UIView> for UITableView
UIScrollView and UITableView only.Source§impl Borrow<UIView> for UITableViewCell
Available on crate feature UITableViewCell only.
impl Borrow<UIView> for UITableViewCell
UITableViewCell only.Source§impl Borrow<UIView> for UITextField
Available on crate features UIControl and UITextField only.
impl Borrow<UIView> for UITextField
UIControl and UITextField only.Source§impl Borrow<UIView> for UITextView
Available on crate features UIScrollView and UITextView only.
impl Borrow<UIView> for UITextView
UIScrollView and UITextView only.Source§impl Borrow<UIView> for UIVisualEffectView
Available on crate feature UIVisualEffectView only.
impl Borrow<UIView> for UIVisualEffectView
UIVisualEffectView only.Source§impl CALayerDelegate for UIView
impl CALayerDelegate for UIView
fn displayLayer(&self, layer: &CALayer)
fn layerWillDraw(&self, layer: &CALayer)
fn layoutSublayersOfLayer(&self, layer: &CALayer)
fn actionForLayer_forKey( &self, layer: &CALayer, event: &NSString, ) -> Option<Retained<ProtocolObject<dyn CAAction>>>
Source§impl ClassType for UIView
impl ClassType for UIView
Source§const NAME: &'static str = "UIView"
const NAME: &'static str = "UIView"
Source§type Super = UIResponder
type Super = UIResponder
Source§type ThreadKind = dyn MainThreadOnly
type ThreadKind = dyn MainThreadOnly
Source§impl NSObjectProtocol for UIView
impl NSObjectProtocol for UIView
Source§fn isEqual(&self, other: Option<&AnyObject>) -> bool
fn isEqual(&self, other: Option<&AnyObject>) -> bool
Source§fn hash(&self) -> usize
fn hash(&self) -> usize
Source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
isKindOfClass directly, or cast your objects with AnyObject::downcast_refSource§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
Source§impl RefEncode for UIView
impl RefEncode for UIView
Source§const ENCODING_REF: Encoding = <UIResponder as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <UIResponder as ::objc2::RefEncode>::ENCODING_REF
Source§impl UIAccessibilityIdentification for UIView
Available on crate feature UIAccessibilityIdentification only.
impl UIAccessibilityIdentification for UIView
UIAccessibilityIdentification only.Source§impl UIAppearance for UIView
impl UIAppearance for UIView
Source§fn appearance(mtm: MainThreadMarker) -> Retained<Self>
fn appearance(mtm: MainThreadMarker) -> Retained<Self>
UIAppearance only.Source§unsafe fn appearanceWhenContainedInInstancesOfClasses(
container_types: &NSArray<AnyClass>,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceWhenContainedInInstancesOfClasses( container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance only.Source§fn appearanceForTraitCollection(
trait: &UITraitCollection,
mtm: MainThreadMarker,
) -> Retained<Self>
fn appearanceForTraitCollection( trait: &UITraitCollection, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance and UITraitCollection only.Source§unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses(
trait: &UITraitCollection,
container_types: &NSArray<AnyClass>,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceForTraitCollection_whenContainedInInstancesOfClasses( trait: &UITraitCollection, container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
UIAppearance and UITraitCollection only.Source§impl UICoordinateSpace for UIView
impl UICoordinateSpace for UIView
Source§fn convertPoint_toCoordinateSpace(
&self,
point: CGPoint,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGPoint
fn convertPoint_toCoordinateSpace( &self, point: CGPoint, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGPoint
objc2-core-foundation only.Source§fn convertPoint_fromCoordinateSpace(
&self,
point: CGPoint,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGPoint
fn convertPoint_fromCoordinateSpace( &self, point: CGPoint, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGPoint
objc2-core-foundation only.Source§fn convertRect_toCoordinateSpace(
&self,
rect: CGRect,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGRect
fn convertRect_toCoordinateSpace( &self, rect: CGRect, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGRect
objc2-core-foundation only.Source§fn convertRect_fromCoordinateSpace(
&self,
rect: CGRect,
coordinate_space: &ProtocolObject<dyn UICoordinateSpace>,
) -> CGRect
fn convertRect_fromCoordinateSpace( &self, rect: CGRect, coordinate_space: &ProtocolObject<dyn UICoordinateSpace>, ) -> CGRect
objc2-core-foundation only.Source§impl UIDynamicItem for UIView
impl UIDynamicItem for UIView
Source§fn center(&self) -> CGPoint
fn center(&self) -> CGPoint
UIDynamicBehavior and objc2-core-foundation only.Source§fn setCenter(&self, center: CGPoint)
fn setCenter(&self, center: CGPoint)
UIDynamicBehavior and objc2-core-foundation only.center.Source§fn bounds(&self) -> CGRect
fn bounds(&self) -> CGRect
UIDynamicBehavior and objc2-core-foundation only.Source§fn transform(&self) -> CGAffineTransform
fn transform(&self) -> CGAffineTransform
UIDynamicBehavior and objc2-core-foundation only.Source§fn setTransform(&self, transform: CGAffineTransform)
fn setTransform(&self, transform: CGAffineTransform)
UIDynamicBehavior and objc2-core-foundation only.transform.Source§fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
UIDynamicBehavior only.Source§fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
UIDynamicBehavior and UIBezierPath only.Source§impl UIFocusEnvironment for UIView
impl UIFocusEnvironment for UIView
Source§fn preferredFocusEnvironments(
&self,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
fn preferredFocusEnvironments( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
UIFocus only.Source§fn parentFocusEnvironment(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
fn parentFocusEnvironment( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
UIFocus only.Source§fn focusItemContainer(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
fn focusItemContainer( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
UIFocus only.Source§fn setNeedsFocusUpdate(&self)
fn setNeedsFocusUpdate(&self)
UIFocus only.[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self];Source§fn updateFocusIfNeeded(&self)
fn updateFocusIfNeeded(&self)
UIFocus only.[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];.Source§fn shouldUpdateFocusInContext(&self, context: &UIFocusUpdateContext) -> bool
fn shouldUpdateFocusInContext(&self, context: &UIFocusUpdateContext) -> bool
UIFocus only.Source§fn didUpdateFocusInContext_withAnimationCoordinator(
&self,
context: &UIFocusUpdateContext,
coordinator: &UIFocusAnimationCoordinator,
)
fn didUpdateFocusInContext_withAnimationCoordinator( &self, context: &UIFocusUpdateContext, coordinator: &UIFocusAnimationCoordinator, )
UIFocus and UIFocusAnimationCoordinator only.Source§fn soundIdentifierForFocusUpdateInContext(
&self,
context: &UIFocusUpdateContext,
) -> Option<Retained<UIFocusSoundIdentifier>>
fn soundIdentifierForFocusUpdateInContext( &self, context: &UIFocusUpdateContext, ) -> Option<Retained<UIFocusSoundIdentifier>>
UIFocus only.Source§impl UIFocusItem for UIView
impl UIFocusItem for UIView
Source§fn canBecomeFocused(&self) -> bool
fn canBecomeFocused(&self) -> bool
UIFocus only.Source§fn frame(&self) -> CGRect
fn frame(&self) -> CGRect
UIFocus and objc2-core-foundation only.coordinateSpace of the UIFocusItemContainer in which it is contained.Source§fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
UIFocus and UIFocusEffect only.Source§fn focusGroupPriority(&self) -> UIFocusGroupPriority
fn focusGroupPriority(&self) -> UIFocusGroupPriority
UIFocus only.Source§fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
UIFocus only.UIFocusItemDeferralModeNever, the focus deferral will not be enabled again
after the user engagement timeout has expired if this item is currently focused and programmatic focus updates pointing
to this item will be executed immediatly. If it returns UIFocusItemDeferralModeAlways focus will always be deferred
when this item is supposed to be focused.
Does nothing when focus deferral is not supported on the platform.Source§fn isTransparentFocusItem(&self) -> bool
fn isTransparentFocusItem(&self) -> bool
UIFocus only.Source§fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
UIFocus and UIFocusMovementHint only.Source§impl UIFocusItemContainer for UIView
impl UIFocusItemContainer for UIView
Source§fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
UIFocus only.Source§fn focusItemsInRect(
&self,
rect: CGRect,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
fn focusItemsInRect( &self, rect: CGRect, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
UIFocus and objc2-core-foundation only.rect is expressed in coordinateSpace.
Note: starting in iOS
&
tvOS 16.0, UIView will return its subviews from this method. If you override this method in a UIView subclass, it will be your responsibility to call super and merge your array of custom focus items with UIView’s default focus items.Source§impl UILargeContentViewerItem for UIView
Available on crate feature UILargeContentViewer only.
impl UILargeContentViewerItem for UIView
UILargeContentViewer only.Source§fn showsLargeContentViewer(&self) -> bool
fn showsLargeContentViewer(&self) -> bool
Source§fn largeContentTitle(&self) -> Option<Retained<NSString>>
fn largeContentTitle(&self) -> Option<Retained<NSString>>
Source§fn largeContentImage(&self) -> Option<Retained<UIImage>>
fn largeContentImage(&self) -> Option<Retained<UIImage>>
UIImage only.Source§fn scalesLargeContentImage(&self) -> bool
fn scalesLargeContentImage(&self) -> bool
Source§fn largeContentImageInsets(&self) -> UIEdgeInsets
fn largeContentImageInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Source§impl UIPopoverPresentationControllerSourceItem for UIView
Available on crate feature UIPopoverPresentationControllerSourceItem only.
impl UIPopoverPresentationControllerSourceItem for UIView
UIPopoverPresentationControllerSourceItem only.Source§impl UIResponderStandardEditActions for UIView
impl UIResponderStandardEditActions for UIView
Source§unsafe fn cut(&self, sender: Option<&AnyObject>)
unsafe fn cut(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn copy(&self, sender: Option<&AnyObject>)
unsafe fn copy(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn paste(&self, sender: Option<&AnyObject>)
unsafe fn paste(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn pasteAndMatchStyle(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndMatchStyle(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn pasteAndGo(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndGo(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn pasteAndSearch(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndSearch(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn newFromPasteboard(&self, sender: Option<&AnyObject>)
unsafe fn newFromPasteboard(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn select(&self, sender: Option<&AnyObject>)
unsafe fn select(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn selectAll(&self, sender: Option<&AnyObject>)
unsafe fn selectAll(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn delete(&self, sender: Option<&AnyObject>)
unsafe fn delete(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn toggleBoldface(&self, sender: Option<&AnyObject>)
unsafe fn toggleBoldface(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn toggleItalics(&self, sender: Option<&AnyObject>)
unsafe fn toggleItalics(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn toggleUnderline(&self, sender: Option<&AnyObject>)
unsafe fn toggleUnderline(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn increaseSize(&self, sender: Option<&AnyObject>)
unsafe fn increaseSize(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn decreaseSize(&self, sender: Option<&AnyObject>)
unsafe fn decreaseSize(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn alignLeft(&self, sender: Option<&AnyObject>)
unsafe fn alignLeft(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn alignCenter(&self, sender: Option<&AnyObject>)
unsafe fn alignCenter(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn alignJustified(&self, sender: Option<&AnyObject>)
unsafe fn alignJustified(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn alignRight(&self, sender: Option<&AnyObject>)
unsafe fn alignRight(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn find(&self, sender: Option<&AnyObject>)
unsafe fn find(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn findAndReplace(&self, sender: Option<&AnyObject>)
unsafe fn findAndReplace(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn findNext(&self, sender: Option<&AnyObject>)
unsafe fn findNext(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn findPrevious(&self, sender: Option<&AnyObject>)
unsafe fn findPrevious(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn useSelectionForFind(&self, sender: Option<&AnyObject>)
unsafe fn useSelectionForFind(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn updateTextAttributesWithConversionHandler(
&self,
conversion_handler: UITextAttributesConversionHandler,
)
unsafe fn updateTextAttributesWithConversionHandler( &self, conversion_handler: UITextAttributesConversionHandler, )
UIResponder and block2 only.Source§unsafe fn print(&self, sender: Option<&AnyObject>)
unsafe fn print(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn rename(&self, sender: Option<&AnyObject>)
unsafe fn rename(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn duplicate(&self, sender: Option<&AnyObject>)
unsafe fn duplicate(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn move(&self, sender: Option<&AnyObject>)
unsafe fn move(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn export(&self, sender: Option<&AnyObject>)
unsafe fn export(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn toggleSidebar(&self, sender: Option<&AnyObject>)
unsafe fn toggleSidebar(&self, sender: Option<&AnyObject>)
UIResponder only.Source§unsafe fn toggleInspector(&self, sender: Option<&AnyObject>)
unsafe fn toggleInspector(&self, sender: Option<&AnyObject>)
UIResponder only.Source§impl UITraitChangeObservable for UIView
impl UITraitChangeObservable for UIView
Source§fn unregisterForTraitChanges(
&self,
registration: &ProtocolObject<dyn UITraitChangeRegistration>,
)
fn unregisterForTraitChanges( &self, registration: &ProtocolObject<dyn UITraitChangeRegistration>, )
UITraitCollection only.Source§impl UITraitEnvironment for UIView
impl UITraitEnvironment for UIView
Source§fn traitCollection(&self) -> Retained<UITraitCollection>
fn traitCollection(&self) -> Retained<UITraitCollection>
UITraitCollection only.Source§fn traitCollectionDidChange(
&self,
previous_trait_collection: Option<&UITraitCollection>,
)
fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
UITraitCollection only.impl DowncastTarget for UIView
impl Eq for UIView
impl UIAppearanceContainer for UIView
Auto Trait Implementations§
impl !Freeze for UIView
impl !RefUnwindSafe for UIView
impl !Send for UIView
impl !Sync for UIView
impl !Unpin for UIView
impl !UnwindSafe for UIView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<'a, T> MainThreadOnly for T
impl<'a, T> MainThreadOnly for T
Source§fn mtm(&self) -> MainThreadMarker
fn mtm(&self) -> MainThreadMarker
MainThreadMarker from the main-thread-only object. Read more