pub struct BEScrollView { /* private fields */ }BEScrollView only.Expand description
Implementations§
Source§impl BEScrollView
impl BEScrollView
pub unsafe fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn BEScrollViewDelegate>>>
Sourcepub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn BEScrollViewDelegate>>,
)
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn BEScrollViewDelegate>>, )
Setter for delegate.
This is a weak property.
Source§impl BEScrollView
Methods declared on superclass UIView.
impl BEScrollView
Methods declared on superclass UIView.
pub unsafe 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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>
Source§impl BEScrollView
Methods declared on superclass NSObject.
impl BEScrollView
Methods declared on superclass NSObject.
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>
Methods from Deref<Target = UIScrollView>§
pub fn adjustedContentInsetDidChange(&self)
UIResponder and UIView only.pub fn contentInsetAdjustmentBehavior( &self, ) -> UIScrollViewContentInsetAdjustmentBehavior
UIResponder and UIView only.Sourcepub fn setContentInsetAdjustmentBehavior(
&self,
content_inset_adjustment_behavior: UIScrollViewContentInsetAdjustmentBehavior,
)
Available on crate features UIResponder and UIView only.
pub fn setContentInsetAdjustmentBehavior( &self, content_inset_adjustment_behavior: UIScrollViewContentInsetAdjustmentBehavior, )
UIResponder and UIView only.Setter for contentInsetAdjustmentBehavior.
pub fn automaticallyAdjustsScrollIndicatorInsets(&self) -> bool
UIResponder and UIView only.Sourcepub fn setAutomaticallyAdjustsScrollIndicatorInsets(
&self,
automatically_adjusts_scroll_indicator_insets: bool,
)
Available on crate features UIResponder and UIView only.
pub fn setAutomaticallyAdjustsScrollIndicatorInsets( &self, automatically_adjusts_scroll_indicator_insets: bool, )
UIResponder and UIView only.Setter for automaticallyAdjustsScrollIndicatorInsets.
pub fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn UIScrollViewDelegate>>>
UIResponder and UIView only.Sourcepub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UIScrollViewDelegate>>,
)
Available on crate features UIResponder and UIView only.
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn UIScrollViewDelegate>>, )
UIResponder and UIView only.Setter for delegate.
This is a weak property.
pub fn isDirectionalLockEnabled(&self) -> bool
UIResponder and UIView only.Sourcepub fn setDirectionalLockEnabled(&self, directional_lock_enabled: bool)
Available on crate features UIResponder and UIView only.
pub fn setDirectionalLockEnabled(&self, directional_lock_enabled: bool)
UIResponder and UIView only.Setter for isDirectionalLockEnabled.
pub fn bounces(&self) -> bool
UIResponder and UIView only.Sourcepub fn setBounces(&self, bounces: bool)
Available on crate features UIResponder and UIView only.
pub fn setBounces(&self, bounces: bool)
UIResponder and UIView only.Setter for bounces.
pub fn bouncesHorizontally(&self) -> bool
UIResponder and UIView only.Sourcepub fn setBouncesHorizontally(&self, bounces_horizontally: bool)
Available on crate features UIResponder and UIView only.
pub fn setBouncesHorizontally(&self, bounces_horizontally: bool)
UIResponder and UIView only.Setter for bouncesHorizontally.
pub fn bouncesVertically(&self) -> bool
UIResponder and UIView only.Sourcepub fn setBouncesVertically(&self, bounces_vertically: bool)
Available on crate features UIResponder and UIView only.
pub fn setBouncesVertically(&self, bounces_vertically: bool)
UIResponder and UIView only.Setter for bouncesVertically.
pub fn alwaysBounceVertical(&self) -> bool
UIResponder and UIView only.Sourcepub fn setAlwaysBounceVertical(&self, always_bounce_vertical: bool)
Available on crate features UIResponder and UIView only.
pub fn setAlwaysBounceVertical(&self, always_bounce_vertical: bool)
UIResponder and UIView only.Setter for alwaysBounceVertical.
pub fn alwaysBounceHorizontal(&self) -> bool
UIResponder and UIView only.Sourcepub fn setAlwaysBounceHorizontal(&self, always_bounce_horizontal: bool)
Available on crate features UIResponder and UIView only.
pub fn setAlwaysBounceHorizontal(&self, always_bounce_horizontal: bool)
UIResponder and UIView only.Setter for alwaysBounceHorizontal.
pub fn isPagingEnabled(&self) -> bool
UIResponder and UIView only.Sourcepub fn setPagingEnabled(&self, paging_enabled: bool)
Available on crate features UIResponder and UIView only.
pub fn setPagingEnabled(&self, paging_enabled: bool)
UIResponder and UIView only.Setter for isPagingEnabled.
pub fn isScrollEnabled(&self) -> bool
UIResponder and UIView only.Sourcepub fn setScrollEnabled(&self, scroll_enabled: bool)
Available on crate features UIResponder and UIView only.
pub fn setScrollEnabled(&self, scroll_enabled: bool)
UIResponder and UIView only.Setter for isScrollEnabled.
pub fn transfersHorizontalScrollingToParent(&self) -> bool
UIResponder and UIView only.Sourcepub fn setTransfersHorizontalScrollingToParent(
&self,
transfers_horizontal_scrolling_to_parent: bool,
)
Available on crate features UIResponder and UIView only.
pub fn setTransfersHorizontalScrollingToParent( &self, transfers_horizontal_scrolling_to_parent: bool, )
UIResponder and UIView only.Setter for transfersHorizontalScrollingToParent.
pub fn transfersVerticalScrollingToParent(&self) -> bool
UIResponder and UIView only.Sourcepub fn setTransfersVerticalScrollingToParent(
&self,
transfers_vertical_scrolling_to_parent: bool,
)
Available on crate features UIResponder and UIView only.
pub fn setTransfersVerticalScrollingToParent( &self, transfers_vertical_scrolling_to_parent: bool, )
UIResponder and UIView only.Setter for transfersVerticalScrollingToParent.
pub fn showsVerticalScrollIndicator(&self) -> bool
UIResponder and UIView only.Sourcepub fn setShowsVerticalScrollIndicator(
&self,
shows_vertical_scroll_indicator: bool,
)
Available on crate features UIResponder and UIView only.
pub fn setShowsVerticalScrollIndicator( &self, shows_vertical_scroll_indicator: bool, )
UIResponder and UIView only.Setter for showsVerticalScrollIndicator.
pub fn showsHorizontalScrollIndicator(&self) -> bool
UIResponder and UIView only.Sourcepub fn setShowsHorizontalScrollIndicator(
&self,
shows_horizontal_scroll_indicator: bool,
)
Available on crate features UIResponder and UIView only.
pub fn setShowsHorizontalScrollIndicator( &self, shows_horizontal_scroll_indicator: bool, )
UIResponder and UIView only.Setter for showsHorizontalScrollIndicator.
pub fn indicatorStyle(&self) -> UIScrollViewIndicatorStyle
UIResponder and UIView only.Sourcepub fn setIndicatorStyle(&self, indicator_style: UIScrollViewIndicatorStyle)
Available on crate features UIResponder and UIView only.
pub fn setIndicatorStyle(&self, indicator_style: UIScrollViewIndicatorStyle)
UIResponder and UIView only.Setter for indicatorStyle.
pub fn indexDisplayMode(&self) -> UIScrollViewIndexDisplayMode
UIResponder and UIView only.Sourcepub fn setIndexDisplayMode(
&self,
index_display_mode: UIScrollViewIndexDisplayMode,
)
Available on crate features UIResponder and UIView only.
pub fn setIndexDisplayMode( &self, index_display_mode: UIScrollViewIndexDisplayMode, )
UIResponder and UIView only.Setter for indexDisplayMode.
pub fn flashScrollIndicators(&self)
UIResponder and UIView only.pub fn withScrollIndicatorsShownForContentOffsetChanges( &self, changes: &Block<dyn Fn() + '_>, )
block2 and UIResponder and UIView only.Sourcepub fn topEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
Available on crate features UIResponder and UIView only.
pub fn topEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
UIResponder and UIView only.The effect for the top edge of the scroll view.
Sourcepub fn leftEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
Available on crate features UIResponder and UIView only.
pub fn leftEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
UIResponder and UIView only.The effect for the left edge of the scroll view.
Sourcepub fn bottomEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
Available on crate features UIResponder and UIView only.
pub fn bottomEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
UIResponder and UIView only.The effect for the bottom edge of the scroll view.
Sourcepub fn rightEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
Available on crate features UIResponder and UIView only.
pub fn rightEdgeEffect(&self) -> Retained<UIScrollEdgeEffect>
UIResponder and UIView only.The effect for the right edge of the scroll view.
pub fn isTracking(&self) -> bool
UIResponder and UIView only.pub fn isDragging(&self) -> bool
UIResponder and UIView only.pub fn isDecelerating(&self) -> bool
UIResponder and UIView only.pub fn isScrollAnimating(&self) -> bool
UIResponder and UIView only.pub fn delaysContentTouches(&self) -> bool
UIResponder and UIView only.Sourcepub fn setDelaysContentTouches(&self, delays_content_touches: bool)
Available on crate features UIResponder and UIView only.
pub fn setDelaysContentTouches(&self, delays_content_touches: bool)
UIResponder and UIView only.Setter for delaysContentTouches.
pub fn canCancelContentTouches(&self) -> bool
UIResponder and UIView only.Sourcepub fn setCanCancelContentTouches(&self, can_cancel_content_touches: bool)
Available on crate features UIResponder and UIView only.
pub fn setCanCancelContentTouches(&self, can_cancel_content_touches: bool)
UIResponder and UIView only.Setter for canCancelContentTouches.
pub fn touchesShouldCancelInContentView(&self, view: &UIView) -> bool
UIResponder and UIView only.pub fn bouncesZoom(&self) -> bool
UIResponder and UIView only.Sourcepub fn setBouncesZoom(&self, bounces_zoom: bool)
Available on crate features UIResponder and UIView only.
pub fn setBouncesZoom(&self, bounces_zoom: bool)
UIResponder and UIView only.Setter for bouncesZoom.
pub fn isZooming(&self) -> bool
UIResponder and UIView only.pub fn isZoomBouncing(&self) -> bool
UIResponder and UIView only.pub fn isZoomAnimating(&self) -> bool
UIResponder and UIView only.pub fn scrollsToTop(&self) -> bool
UIResponder and UIView only.Sourcepub fn setScrollsToTop(&self, scrolls_to_top: bool)
Available on crate features UIResponder and UIView only.
pub fn setScrollsToTop(&self, scrolls_to_top: bool)
UIResponder and UIView only.Setter for scrollsToTop.
pub fn stopScrollingAndZooming(&self)
UIResponder and UIView only.pub fn directionalPressGestureRecognizer(&self) -> Retained<UIGestureRecognizer>
Configuring the panGestureRecognizer for indirect scrolling automatically supports directional presses now, so this property is no longer useful.
UIGestureRecognizer and UIResponder and UIView only.pub fn keyboardDismissMode(&self) -> UIScrollViewKeyboardDismissMode
UIResponder and UIView only.Sourcepub fn setKeyboardDismissMode(
&self,
keyboard_dismiss_mode: UIScrollViewKeyboardDismissMode,
)
Available on crate features UIResponder and UIView only.
pub fn setKeyboardDismissMode( &self, keyboard_dismiss_mode: UIScrollViewKeyboardDismissMode, )
UIResponder and UIView only.Setter for keyboardDismissMode.
Sourcepub fn allowsKeyboardScrolling(&self) -> bool
Available on crate features UIResponder and UIView only.
pub fn allowsKeyboardScrolling(&self) -> bool
UIResponder and UIView only.Set this to YES to make the scroll view animate its content offset in response to keys like Page Up/Down, Home/End, and the arrow keys. The scroll view must be focused or first responder in order to receive these key events. Default is YES for apps linked after iOS 17.0.
Sourcepub fn setAllowsKeyboardScrolling(&self, allows_keyboard_scrolling: bool)
Available on crate features UIResponder and UIView only.
pub fn setAllowsKeyboardScrolling(&self, allows_keyboard_scrolling: bool)
UIResponder and UIView only.Setter for allowsKeyboardScrolling.
Methods from Deref<Target = UIView>§
pub fn addInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>)
UIResponder and UIView only.pub fn removeInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>)
UIResponder and UIView only.pub fn interactions( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>
UIResponder and UIView only.Sourcepub fn setInteractions(
&self,
interactions: &NSArray<ProtocolObject<dyn UIInteraction>>,
)
Available on crate features UIResponder and UIView only.
pub fn setInteractions( &self, interactions: &NSArray<ProtocolObject<dyn UIInteraction>>, )
UIResponder and UIView only.Setter for interactions.
This is copied when set.
pub fn isUserInteractionEnabled(&self) -> bool
UIResponder only.Sourcepub fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
Available on crate feature UIResponder only.
pub fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
UIResponder only.Setter for isUserInteractionEnabled.
pub fn tag(&self) -> isize
UIResponder only.pub fn canBecomeFocused(&self) -> bool
UIResponder only.pub fn isFocused(&self) -> bool
UIResponder only.Sourcepub fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
Available on crate feature UIResponder only.
pub fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
UIResponder only.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>)
Available on crate feature UIResponder only.
pub fn setFocusGroupIdentifier(&self, focus_group_identifier: Option<&NSString>)
UIResponder only.Setter for focusGroupIdentifier.
This is copied when set.
Sourcepub fn focusGroupPriority(&self) -> isize
Available on crate features UIFocus and UIResponder only.
pub fn focusGroupPriority(&self) -> isize
UIFocus and UIResponder 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: isize)
Available on crate features UIFocus and UIResponder only.
pub fn setFocusGroupPriority(&self, focus_group_priority: isize)
UIFocus and UIResponder only.Setter for focusGroupPriority.
pub fn semanticContentAttribute(&self) -> UISemanticContentAttribute
UIResponder only.Sourcepub fn setSemanticContentAttribute(
&self,
semantic_content_attribute: UISemanticContentAttribute,
)
Available on crate feature UIResponder only.
pub fn setSemanticContentAttribute( &self, semantic_content_attribute: UISemanticContentAttribute, )
UIResponder only.Setter for semanticContentAttribute.
pub fn isMultipleTouchEnabled(&self) -> bool
UIResponder only.Sourcepub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
Available on crate feature UIResponder only.
pub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
UIResponder only.Setter for isMultipleTouchEnabled.
pub fn isExclusiveTouch(&self) -> bool
UIResponder only.Sourcepub fn setExclusiveTouch(&self, exclusive_touch: bool)
Available on crate feature UIResponder only.
pub fn setExclusiveTouch(&self, exclusive_touch: bool)
UIResponder only.Setter for isExclusiveTouch.
pub fn autoresizesSubviews(&self) -> bool
UIResponder only.Sourcepub fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
Available on crate feature UIResponder only.
pub fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
UIResponder only.Setter for autoresizesSubviews.
pub fn autoresizingMask(&self) -> UIViewAutoresizing
UIResponder only.Sourcepub fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
Available on crate feature UIResponder only.
pub fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
UIResponder only.Setter for autoresizingMask.
pub fn sizeToFit(&self)
UIResponder only.pub fn superview(&self) -> Option<Retained<UIView>>
UIResponder only.pub fn subviews(&self) -> Retained<NSArray<UIView>>
UIResponder only.pub fn removeFromSuperview(&self)
UIResponder only.pub fn insertSubview_atIndex(&self, view: &UIView, index: isize)
UIResponder only.pub fn exchangeSubviewAtIndex_withSubviewAtIndex( &self, index1: isize, index2: isize, )
UIResponder only.pub fn addSubview(&self, view: &UIView)
UIResponder only.pub fn insertSubview_belowSubview( &self, view: &UIView, sibling_subview: &UIView, )
UIResponder only.pub fn insertSubview_aboveSubview( &self, view: &UIView, sibling_subview: &UIView, )
UIResponder only.pub fn bringSubviewToFront(&self, view: &UIView)
UIResponder only.pub fn sendSubviewToBack(&self, view: &UIView)
UIResponder only.pub fn didAddSubview(&self, subview: &UIView)
UIResponder only.pub fn willRemoveSubview(&self, subview: &UIView)
UIResponder only.pub fn willMoveToSuperview(&self, new_superview: Option<&UIView>)
UIResponder only.pub fn didMoveToSuperview(&self)
UIResponder only.pub fn didMoveToWindow(&self)
UIResponder only.pub fn isDescendantOfView(&self, view: &UIView) -> bool
UIResponder only.pub fn viewWithTag(&self, tag: isize) -> Option<Retained<UIView>>
UIResponder only.Sourcepub fn setNeedsUpdateProperties(&self)
Available on crate feature UIResponder only.
pub fn setNeedsUpdateProperties(&self)
UIResponder only.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)
Available on crate feature UIResponder only.
pub fn updateProperties(&self)
UIResponder only.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)
Available on crate feature UIResponder only.
pub fn updatePropertiesIfNeeded(&self)
UIResponder only.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)
UIResponder only.pub fn layoutIfNeeded(&self)
UIResponder only.pub fn layoutSubviews(&self)
UIResponder only.pub fn preservesSuperviewLayoutMargins(&self) -> bool
UIResponder only.Sourcepub fn setPreservesSuperviewLayoutMargins(
&self,
preserves_superview_layout_margins: bool,
)
Available on crate feature UIResponder only.
pub fn setPreservesSuperviewLayoutMargins( &self, preserves_superview_layout_margins: bool, )
UIResponder only.Setter for preservesSuperviewLayoutMargins.
pub fn insetsLayoutMarginsFromSafeArea(&self) -> bool
UIResponder only.Sourcepub fn setInsetsLayoutMarginsFromSafeArea(
&self,
insets_layout_margins_from_safe_area: bool,
)
Available on crate feature UIResponder only.
pub fn setInsetsLayoutMarginsFromSafeArea( &self, insets_layout_margins_from_safe_area: bool, )
UIResponder only.Setter for insetsLayoutMarginsFromSafeArea.
pub fn layoutMarginsDidChange(&self)
UIResponder only.pub fn safeAreaInsetsDidChange(&self)
UIResponder only.pub fn setNeedsDisplay(&self)
UIResponder only.pub fn clipsToBounds(&self) -> bool
UIResponder only.Sourcepub fn setClipsToBounds(&self, clips_to_bounds: bool)
Available on crate feature UIResponder only.
pub fn setClipsToBounds(&self, clips_to_bounds: bool)
UIResponder only.Setter for clipsToBounds.
pub fn backgroundColor(&self) -> Option<Retained<UIColor>>
UIColor and UIResponder only.Sourcepub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
Available on crate features UIColor and UIResponder only.
pub fn setBackgroundColor(&self, background_color: Option<&UIColor>)
UIColor and UIResponder only.Setter for backgroundColor.
This is copied when set.
pub fn isOpaque(&self) -> bool
UIResponder only.Sourcepub fn setOpaque(&self, opaque: bool)
Available on crate feature UIResponder only.
pub fn setOpaque(&self, opaque: bool)
UIResponder only.Setter for isOpaque.
pub fn clearsContextBeforeDrawing(&self) -> bool
UIResponder only.Sourcepub fn setClearsContextBeforeDrawing(&self, clears_context_before_drawing: bool)
Available on crate feature UIResponder only.
pub fn setClearsContextBeforeDrawing(&self, clears_context_before_drawing: bool)
UIResponder only.Setter for clearsContextBeforeDrawing.
pub fn isHidden(&self) -> bool
UIResponder only.Sourcepub fn setHidden(&self, hidden: bool)
Available on crate feature UIResponder only.
pub fn setHidden(&self, hidden: bool)
UIResponder only.Setter for isHidden.
pub fn contentMode(&self) -> UIViewContentMode
UIResponder only.Sourcepub fn setContentMode(&self, content_mode: UIViewContentMode)
Available on crate feature UIResponder only.
pub fn setContentMode(&self, content_mode: UIViewContentMode)
UIResponder only.Setter for contentMode.
pub fn maskView(&self) -> Option<Retained<UIView>>
UIResponder only.Sourcepub fn setMaskView(&self, mask_view: Option<&UIView>)
Available on crate feature UIResponder only.
pub fn setMaskView(&self, mask_view: Option<&UIView>)
UIResponder only.Setter for maskView.
pub fn tintColor(&self) -> Option<Retained<UIColor>>
UIColor and UIResponder only.Sourcepub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
Available on crate features UIColor and UIResponder only.
pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>)
UIColor and UIResponder only.pub fn tintAdjustmentMode(&self) -> UIViewTintAdjustmentMode
UIResponder only.Sourcepub fn setTintAdjustmentMode(
&self,
tint_adjustment_mode: UIViewTintAdjustmentMode,
)
Available on crate feature UIResponder only.
pub fn setTintAdjustmentMode( &self, tint_adjustment_mode: UIViewTintAdjustmentMode, )
UIResponder only.Setter for tintAdjustmentMode.
pub fn tintColorDidChange(&self)
UIResponder only.pub fn gestureRecognizers( &self, ) -> Option<Retained<NSArray<UIGestureRecognizer>>>
UIGestureRecognizer and UIResponder only.Sourcepub fn setGestureRecognizers(
&self,
gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>,
)
Available on crate features UIGestureRecognizer and UIResponder only.
pub fn setGestureRecognizers( &self, gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>, )
UIGestureRecognizer and UIResponder only.Setter for gestureRecognizers.
This is copied when set.
pub fn addGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer and UIResponder only.pub fn removeGestureRecognizer(&self, gesture_recognizer: &UIGestureRecognizer)
UIGestureRecognizer and UIResponder only.pub fn gestureRecognizerShouldBegin( &self, gesture_recognizer: &UIGestureRecognizer, ) -> bool
UIGestureRecognizer and UIResponder only.pub fn updateConstraintsIfNeeded(&self)
UIResponder only.pub fn updateConstraints(&self)
UIResponder only.pub fn needsUpdateConstraints(&self) -> bool
UIResponder only.pub fn setNeedsUpdateConstraints(&self)
UIResponder only.pub fn translatesAutoresizingMaskIntoConstraints(&self) -> bool
UIResponder only.Sourcepub fn setTranslatesAutoresizingMaskIntoConstraints(
&self,
translates_autoresizing_mask_into_constraints: bool,
)
Available on crate feature UIResponder only.
pub fn setTranslatesAutoresizingMaskIntoConstraints( &self, translates_autoresizing_mask_into_constraints: bool, )
UIResponder only.Setter for translatesAutoresizingMaskIntoConstraints.
pub fn viewForBaselineLayout(&self) -> Retained<UIView>
Override -viewForFirstBaselineLayout or -viewForLastBaselineLayout as appropriate, instead
UIResponder only.pub fn viewForFirstBaselineLayout(&self) -> Retained<UIView>
UIResponder only.pub fn viewForLastBaselineLayout(&self) -> Retained<UIView>
UIResponder only.pub fn invalidateIntrinsicContentSize(&self)
UIResponder only.pub fn hasAmbiguousLayout(&self) -> bool
UIResponder only.pub fn exerciseAmbiguityInLayout(&self)
UIResponder only.pub fn restorationIdentifier(&self) -> Option<Retained<NSString>>
UIResponder only.Sourcepub fn setRestorationIdentifier(
&self,
restoration_identifier: Option<&NSString>,
)
Available on crate feature UIResponder only.
pub fn setRestorationIdentifier( &self, restoration_identifier: Option<&NSString>, )
UIResponder only.Setter for restorationIdentifier.
This is copied when set.
Sourcepub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
Available on crate feature UIResponder only.
pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
UIResponder only.§Safety
coder possibly has further requirements.
Sourcepub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
Available on crate feature UIResponder only.
pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
UIResponder only.§Safety
coder possibly has further requirements.
pub fn snapshotViewAfterScreenUpdates( &self, after_updates: bool, ) -> Option<Retained<UIView>>
UIResponder only.Sourcepub fn appliedContentSizeCategoryLimitsDescription(&self) -> Retained<NSString>
Available on crate feature UIResponder only.
pub fn appliedContentSizeCategoryLimitsDescription(&self) -> Retained<NSString>
UIResponder only.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.
pub fn traitOverrides(&self) -> Retained<ProtocolObject<dyn UITraitOverrides>>
UIResponder and UITraitCollection only.Sourcepub fn updateTraitsIfNeeded(&self)
Available on crate feature UIResponder only.
pub fn updateTraitsIfNeeded(&self)
UIResponder only.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.
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
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 undoManager(&self) -> Option<Retained<NSUndoManager>>
pub fn editingInteractionConfiguration( &self, ) -> UIEditingInteractionConfiguration
pub fn inputView(&self) -> Option<Retained<UIView>>
UIView only.pub fn inputAccessoryView(&self) -> Option<Retained<UIView>>
UIView only.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 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.
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
pub fn class(&self) -> &'static AnyClass
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.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
this is difficult to use correctly, use Ivar::load instead.
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,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastTarget,
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<AnyObject> for BEScrollView
impl AsRef<AnyObject> for BEScrollView
Source§impl AsRef<BEScrollView> for BEScrollView
impl AsRef<BEScrollView> for BEScrollView
Source§impl AsRef<NSObject> for BEScrollView
impl AsRef<NSObject> for BEScrollView
Source§impl AsRef<UIResponder> for BEScrollView
impl AsRef<UIResponder> for BEScrollView
Source§fn as_ref(&self) -> &UIResponder
fn as_ref(&self) -> &UIResponder
Source§impl AsRef<UIScrollView> for BEScrollView
impl AsRef<UIScrollView> for BEScrollView
Source§fn as_ref(&self) -> &UIScrollView
fn as_ref(&self) -> &UIScrollView
Source§impl AsRef<UIView> for BEScrollView
impl AsRef<UIView> for BEScrollView
Source§impl Borrow<AnyObject> for BEScrollView
impl Borrow<AnyObject> for BEScrollView
Source§impl Borrow<NSObject> for BEScrollView
impl Borrow<NSObject> for BEScrollView
Source§impl Borrow<UIResponder> for BEScrollView
impl Borrow<UIResponder> for BEScrollView
Source§fn borrow(&self) -> &UIResponder
fn borrow(&self) -> &UIResponder
Source§impl Borrow<UIScrollView> for BEScrollView
impl Borrow<UIScrollView> for BEScrollView
Source§fn borrow(&self) -> &UIScrollView
fn borrow(&self) -> &UIScrollView
Source§impl Borrow<UIView> for BEScrollView
impl Borrow<UIView> for BEScrollView
Source§impl CALayerDelegate for BEScrollView
impl CALayerDelegate for BEScrollView
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 BEScrollView
impl ClassType for BEScrollView
Source§const NAME: &'static str = "BEScrollView"
const NAME: &'static str = "BEScrollView"
Source§type Super = UIScrollView
type Super = UIScrollView
Source§type ThreadKind = dyn MainThreadOnly
type ThreadKind = dyn MainThreadOnly
Source§impl Debug for BEScrollView
impl Debug for BEScrollView
Source§impl Deref for BEScrollView
impl Deref for BEScrollView
Source§impl Hash for BEScrollView
impl Hash for BEScrollView
Source§impl Message for BEScrollView
impl Message for BEScrollView
Source§impl NSCoding for BEScrollView
impl NSCoding for BEScrollView
Source§unsafe fn encodeWithCoder(&self, coder: &NSCoder)
unsafe fn encodeWithCoder(&self, coder: &NSCoder)
NSCoder only.Source§impl NSObjectProtocol for BEScrollView
impl NSObjectProtocol for BEScrollView
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
use isKindOfClass directly, or cast your objects with AnyObject::downcast_ref
Source§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 PartialEq for BEScrollView
impl PartialEq for BEScrollView
Source§impl RefEncode for BEScrollView
impl RefEncode for BEScrollView
Source§const ENCODING_REF: Encoding = <UIScrollView as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <UIScrollView as ::objc2::RefEncode>::ENCODING_REF
Source§impl UIAppearance for BEScrollView
impl UIAppearance for BEScrollView
fn appearance(mtm: MainThreadMarker) -> Retained<Self>
Source§unsafe fn appearanceWhenContainedInInstancesOfClasses(
container_types: &NSArray<AnyClass>,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe fn appearanceWhenContainedInInstancesOfClasses( container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
Source§fn appearanceForTraitCollection(
trait: &UITraitCollection,
mtm: MainThreadMarker,
) -> Retained<Self>
fn appearanceForTraitCollection( trait: &UITraitCollection, mtm: MainThreadMarker, ) -> Retained<Self>
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>
UITraitCollection only.Source§impl UIDynamicItem for BEScrollView
impl UIDynamicItem for BEScrollView
Source§fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
Source§impl UIFocusEnvironment for BEScrollView
impl UIFocusEnvironment for BEScrollView
Source§fn preferredFocusEnvironments(
&self,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
fn preferredFocusEnvironments( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
Source§fn parentFocusEnvironment(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
fn parentFocusEnvironment( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
Source§fn focusItemContainer(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
fn focusItemContainer( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
Source§fn setNeedsFocusUpdate(&self)
fn setNeedsFocusUpdate(&self)
[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self];Source§fn updateFocusIfNeeded(&self)
fn updateFocusIfNeeded(&self)
[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];.Source§fn shouldUpdateFocusInContext(&self, context: &UIFocusUpdateContext) -> bool
fn shouldUpdateFocusInContext(&self, context: &UIFocusUpdateContext) -> bool
Source§fn soundIdentifierForFocusUpdateInContext(
&self,
context: &UIFocusUpdateContext,
) -> Option<Retained<NSString>>
fn soundIdentifierForFocusUpdateInContext( &self, context: &UIFocusUpdateContext, ) -> Option<Retained<NSString>>
Source§impl UIFocusItem for BEScrollView
impl UIFocusItem for BEScrollView
Source§fn canBecomeFocused(&self) -> bool
fn canBecomeFocused(&self) -> bool
Source§fn focusGroupPriority(&self) -> isize
fn focusGroupPriority(&self) -> isize
Source§fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
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
Source§impl UIFocusItemContainer for BEScrollView
impl UIFocusItemContainer for BEScrollView
Source§fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
fn coordinateSpace(&self) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
UIView only.Source§impl UIResponderStandardEditActions for BEScrollView
impl UIResponderStandardEditActions for BEScrollView
Source§unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
Source§unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
Source§unsafe fn updateTextAttributesWithConversionHandler(
&self,
conversion_handler: *mut Block<dyn Fn(NonNull<NSDictionary<NSString>>) -> NonNull<NSDictionary<NSString>>>,
)
unsafe fn updateTextAttributesWithConversionHandler( &self, conversion_handler: *mut Block<dyn Fn(NonNull<NSDictionary<NSString>>) -> NonNull<NSDictionary<NSString>>>, )
block2 only.Source§impl UITraitEnvironment for BEScrollView
impl UITraitEnvironment for BEScrollView
fn traitCollection(&self) -> Retained<UITraitCollection>
Source§fn traitCollectionDidChange(
&self,
previous_trait_collection: Option<&UITraitCollection>,
)
fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
Use the trait change registration APIs declared in the UITraitChangeObservable protocol
impl DowncastTarget for BEScrollView
impl Eq for BEScrollView
impl UIAppearanceContainer for BEScrollView
impl UICoordinateSpace for BEScrollView
impl UIFocusItemScrollableContainer for BEScrollView
Auto Trait Implementations§
impl !Freeze for BEScrollView
impl !RefUnwindSafe for BEScrollView
impl !Send for BEScrollView
impl !Sync for BEScrollView
impl !Unpin for BEScrollView
impl UnsafeUnpin for BEScrollView
impl !UnwindSafe for BEScrollView
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