#[repr(C)]pub struct UITableView { /* private fields */ }UIResponder and UIScrollView and UITableView and UIView only.Expand description
Implementations§
Source§impl UITableView
impl UITableView
pub unsafe fn initWithFrame_style( this: Allocated<Self>, frame: CGRect, style: UITableViewStyle, ) -> Retained<Self>
objc2-core-foundation only.pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder, ) -> Option<Retained<Self>>
pub unsafe fn style(&self) -> UITableViewStyle
pub unsafe fn dataSource( &self, ) -> Option<Retained<ProtocolObject<dyn UITableViewDataSource>>>
Sourcepub unsafe fn setDataSource(
&self,
data_source: Option<&ProtocolObject<dyn UITableViewDataSource>>,
)
pub unsafe fn setDataSource( &self, data_source: Option<&ProtocolObject<dyn UITableViewDataSource>>, )
This is a weak property.
Setter for dataSource.
pub unsafe fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn UITableViewDelegate>>>
Sourcepub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UITableViewDelegate>>,
)
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn UITableViewDelegate>>, )
This is a weak property.
Setter for delegate.
pub unsafe fn prefetchDataSource( &self, ) -> Option<Retained<ProtocolObject<dyn UITableViewDataSourcePrefetching>>>
Sourcepub unsafe fn setPrefetchDataSource(
&self,
prefetch_data_source: Option<&ProtocolObject<dyn UITableViewDataSourcePrefetching>>,
)
pub unsafe fn setPrefetchDataSource( &self, prefetch_data_source: Option<&ProtocolObject<dyn UITableViewDataSourcePrefetching>>, )
This is a weak property.
Setter for prefetchDataSource.
pub unsafe fn isPrefetchingEnabled(&self) -> bool
Sourcepub unsafe fn setPrefetchingEnabled(&self, prefetching_enabled: bool)
pub unsafe fn setPrefetchingEnabled(&self, prefetching_enabled: bool)
Setter for isPrefetchingEnabled.
pub unsafe fn dragDelegate( &self, ) -> Option<Retained<ProtocolObject<dyn UITableViewDragDelegate>>>
Sourcepub unsafe fn setDragDelegate(
&self,
drag_delegate: Option<&ProtocolObject<dyn UITableViewDragDelegate>>,
)
pub unsafe fn setDragDelegate( &self, drag_delegate: Option<&ProtocolObject<dyn UITableViewDragDelegate>>, )
This is a weak property.
Setter for dragDelegate.
pub unsafe fn dropDelegate( &self, ) -> Option<Retained<ProtocolObject<dyn UITableViewDropDelegate>>>
Sourcepub unsafe fn setDropDelegate(
&self,
drop_delegate: Option<&ProtocolObject<dyn UITableViewDropDelegate>>,
)
pub unsafe fn setDropDelegate( &self, drop_delegate: Option<&ProtocolObject<dyn UITableViewDropDelegate>>, )
This is a weak property.
Setter for dropDelegate.
pub unsafe fn rowHeight(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setRowHeight(&self, row_height: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setRowHeight(&self, row_height: CGFloat)
objc2-core-foundation only.Setter for rowHeight.
pub unsafe fn sectionHeaderHeight(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setSectionHeaderHeight(&self, section_header_height: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setSectionHeaderHeight(&self, section_header_height: CGFloat)
objc2-core-foundation only.Setter for sectionHeaderHeight.
objc2-core-foundation only.Available on crate feature objc2-core-foundation only.
objc2-core-foundation only.Setter for sectionFooterHeight.
pub unsafe fn estimatedRowHeight(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setEstimatedRowHeight(&self, estimated_row_height: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setEstimatedRowHeight(&self, estimated_row_height: CGFloat)
objc2-core-foundation only.Setter for estimatedRowHeight.
pub unsafe fn estimatedSectionHeaderHeight(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setEstimatedSectionHeaderHeight(
&self,
estimated_section_header_height: CGFloat,
)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setEstimatedSectionHeaderHeight( &self, estimated_section_header_height: CGFloat, )
objc2-core-foundation only.Setter for estimatedSectionHeaderHeight.
objc2-core-foundation only.Available on crate feature objc2-core-foundation only.
objc2-core-foundation only.Setter for estimatedSectionFooterHeight.
Sourcepub unsafe fn fillerRowHeight(&self) -> CGFloat
Available on crate feature objc2-core-foundation only.
pub unsafe fn fillerRowHeight(&self) -> CGFloat
objc2-core-foundation only.The height for filler rows added below the last row when there aren’t enough rows to fill a plain style table view.
Set 0 to disable filler rows entirely, use UITableViewAutomaticDimension for the default height.
Sourcepub unsafe fn setFillerRowHeight(&self, filler_row_height: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setFillerRowHeight(&self, filler_row_height: CGFloat)
objc2-core-foundation only.Setter for fillerRowHeight.
Sourcepub unsafe fn sectionHeaderTopPadding(&self) -> CGFloat
Available on crate feature objc2-core-foundation only.
pub unsafe fn sectionHeaderTopPadding(&self) -> CGFloat
objc2-core-foundation only.Padding above each section header. The default value is UITableViewAutomaticDimension.
Sourcepub unsafe fn setSectionHeaderTopPadding(
&self,
section_header_top_padding: CGFloat,
)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setSectionHeaderTopPadding( &self, section_header_top_padding: CGFloat, )
objc2-core-foundation only.Setter for sectionHeaderTopPadding.
pub unsafe fn separatorInset(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setSeparatorInset(&self, separator_inset: UIEdgeInsets)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setSeparatorInset(&self, separator_inset: UIEdgeInsets)
UIGeometry and objc2-core-foundation only.Setter for separatorInset.
pub unsafe fn separatorInsetReference( &self, ) -> UITableViewSeparatorInsetReference
Sourcepub unsafe fn setSeparatorInsetReference(
&self,
separator_inset_reference: UITableViewSeparatorInsetReference,
)
pub unsafe fn setSeparatorInsetReference( &self, separator_inset_reference: UITableViewSeparatorInsetReference, )
Setter for separatorInsetReference.
pub unsafe fn selfSizingInvalidation(&self) -> UITableViewSelfSizingInvalidation
Sourcepub unsafe fn setSelfSizingInvalidation(
&self,
self_sizing_invalidation: UITableViewSelfSizingInvalidation,
)
pub unsafe fn setSelfSizingInvalidation( &self, self_sizing_invalidation: UITableViewSelfSizingInvalidation, )
Setter for selfSizingInvalidation.
pub unsafe fn backgroundView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setBackgroundView(&self, background_view: Option<&UIView>)
pub unsafe fn setBackgroundView(&self, background_view: Option<&UIView>)
Setter for backgroundView.
pub unsafe fn contextMenuInteraction( &self, ) -> Option<Retained<UIContextMenuInteraction>>
UIContextMenuInteraction only.pub unsafe fn numberOfSections(&self) -> NSInteger
pub unsafe fn numberOfRowsInSection(&self, section: NSInteger) -> NSInteger
pub unsafe fn rectForSection(&self, section: NSInteger) -> CGRect
objc2-core-foundation only.pub unsafe fn rectForHeaderInSection(&self, section: NSInteger) -> CGRect
objc2-core-foundation only.objc2-core-foundation only.pub unsafe fn rectForRowAtIndexPath(&self, index_path: &NSIndexPath) -> CGRect
objc2-core-foundation only.pub unsafe fn indexPathForRowAtPoint( &self, point: CGPoint, ) -> Option<Retained<NSIndexPath>>
objc2-core-foundation only.pub unsafe fn indexPathForCell( &self, cell: &UITableViewCell, ) -> Option<Retained<NSIndexPath>>
UITableViewCell only.pub unsafe fn indexPathsForRowsInRect( &self, rect: CGRect, ) -> Option<Retained<NSArray<NSIndexPath>>>
objc2-core-foundation only.pub unsafe fn cellForRowAtIndexPath( &self, index_path: &NSIndexPath, ) -> Option<Retained<UITableViewCell>>
UITableViewCell only.pub unsafe fn visibleCells(&self) -> Retained<NSArray<UITableViewCell>>
UITableViewCell only.pub unsafe fn indexPathsForVisibleRows( &self, ) -> Option<Retained<NSArray<NSIndexPath>>>
pub unsafe fn headerViewForSection( &self, section: NSInteger, ) -> Option<Retained<UITableViewHeaderFooterView>>
UITableViewHeaderFooterView only.UITableViewHeaderFooterView only.pub unsafe fn scrollToRowAtIndexPath_atScrollPosition_animated( &self, index_path: &NSIndexPath, scroll_position: UITableViewScrollPosition, animated: bool, )
pub unsafe fn scrollToNearestSelectedRowAtScrollPosition_animated( &self, scroll_position: UITableViewScrollPosition, animated: bool, )
pub unsafe fn performBatchUpdates_completion( &self, updates: Option<&Block<dyn Fn() + '_>>, completion: Option<&Block<dyn Fn(Bool)>>, )
block2 only.pub unsafe fn beginUpdates(&self)
pub unsafe fn endUpdates(&self)
pub unsafe fn insertSections_withRowAnimation( &self, sections: &NSIndexSet, animation: UITableViewRowAnimation, )
pub unsafe fn deleteSections_withRowAnimation( &self, sections: &NSIndexSet, animation: UITableViewRowAnimation, )
pub unsafe fn moveSection_toSection( &self, section: NSInteger, new_section: NSInteger, )
pub unsafe fn reloadSections_withRowAnimation( &self, sections: &NSIndexSet, animation: UITableViewRowAnimation, )
pub unsafe fn insertRowsAtIndexPaths_withRowAnimation( &self, index_paths: &NSArray<NSIndexPath>, animation: UITableViewRowAnimation, )
pub unsafe fn deleteRowsAtIndexPaths_withRowAnimation( &self, index_paths: &NSArray<NSIndexPath>, animation: UITableViewRowAnimation, )
pub unsafe fn moveRowAtIndexPath_toIndexPath( &self, index_path: &NSIndexPath, new_index_path: &NSIndexPath, )
pub unsafe fn reloadRowsAtIndexPaths_withRowAnimation( &self, index_paths: &NSArray<NSIndexPath>, animation: UITableViewRowAnimation, )
pub unsafe fn reconfigureRowsAtIndexPaths( &self, index_paths: &NSArray<NSIndexPath>, )
pub unsafe fn hasUncommittedUpdates(&self) -> bool
pub unsafe fn reloadData(&self)
pub unsafe fn reloadSectionIndexTitles(&self)
pub unsafe fn isEditing(&self) -> bool
Sourcepub unsafe fn setEditing(&self, editing: bool)
pub unsafe fn setEditing(&self, editing: bool)
Setter for isEditing.
pub unsafe fn setEditing_animated(&self, editing: bool, animated: bool)
pub unsafe fn allowsSelection(&self) -> bool
Sourcepub unsafe fn setAllowsSelection(&self, allows_selection: bool)
pub unsafe fn setAllowsSelection(&self, allows_selection: bool)
Setter for allowsSelection.
pub unsafe fn allowsSelectionDuringEditing(&self) -> bool
Sourcepub unsafe fn setAllowsSelectionDuringEditing(
&self,
allows_selection_during_editing: bool,
)
pub unsafe fn setAllowsSelectionDuringEditing( &self, allows_selection_during_editing: bool, )
Setter for allowsSelectionDuringEditing.
pub unsafe fn allowsMultipleSelection(&self) -> bool
Sourcepub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool)
pub unsafe fn setAllowsMultipleSelection(&self, allows_multiple_selection: bool)
Setter for allowsMultipleSelection.
pub unsafe fn allowsMultipleSelectionDuringEditing(&self) -> bool
Sourcepub unsafe fn setAllowsMultipleSelectionDuringEditing(
&self,
allows_multiple_selection_during_editing: bool,
)
pub unsafe fn setAllowsMultipleSelectionDuringEditing( &self, allows_multiple_selection_during_editing: bool, )
Setter for allowsMultipleSelectionDuringEditing.
pub unsafe fn indexPathForSelectedRow(&self) -> Option<Retained<NSIndexPath>>
pub unsafe fn indexPathsForSelectedRows( &self, ) -> Option<Retained<NSArray<NSIndexPath>>>
pub unsafe fn selectRowAtIndexPath_animated_scrollPosition( &self, index_path: Option<&NSIndexPath>, animated: bool, scroll_position: UITableViewScrollPosition, )
pub unsafe fn deselectRowAtIndexPath_animated( &self, index_path: &NSIndexPath, animated: bool, )
pub unsafe fn sectionIndexMinimumDisplayRowCount(&self) -> NSInteger
Sourcepub unsafe fn setSectionIndexMinimumDisplayRowCount(
&self,
section_index_minimum_display_row_count: NSInteger,
)
pub unsafe fn setSectionIndexMinimumDisplayRowCount( &self, section_index_minimum_display_row_count: NSInteger, )
Setter for sectionIndexMinimumDisplayRowCount.
pub unsafe fn sectionIndexColor(&self) -> Option<Retained<UIColor>>
UIColor only.Sourcepub unsafe fn setSectionIndexColor(&self, section_index_color: Option<&UIColor>)
Available on crate feature UIColor only.
pub unsafe fn setSectionIndexColor(&self, section_index_color: Option<&UIColor>)
UIColor only.Setter for sectionIndexColor.
pub unsafe fn sectionIndexBackgroundColor(&self) -> Option<Retained<UIColor>>
UIColor only.Sourcepub unsafe fn setSectionIndexBackgroundColor(
&self,
section_index_background_color: Option<&UIColor>,
)
Available on crate feature UIColor only.
pub unsafe fn setSectionIndexBackgroundColor( &self, section_index_background_color: Option<&UIColor>, )
UIColor only.Setter for sectionIndexBackgroundColor.
pub unsafe fn sectionIndexTrackingBackgroundColor( &self, ) -> Option<Retained<UIColor>>
UIColor only.Sourcepub unsafe fn setSectionIndexTrackingBackgroundColor(
&self,
section_index_tracking_background_color: Option<&UIColor>,
)
Available on crate feature UIColor only.
pub unsafe fn setSectionIndexTrackingBackgroundColor( &self, section_index_tracking_background_color: Option<&UIColor>, )
UIColor only.Setter for sectionIndexTrackingBackgroundColor.
pub unsafe fn separatorStyle(&self) -> UITableViewCellSeparatorStyle
UITableViewCell only.Sourcepub unsafe fn setSeparatorStyle(
&self,
separator_style: UITableViewCellSeparatorStyle,
)
Available on crate feature UITableViewCell only.
pub unsafe fn setSeparatorStyle( &self, separator_style: UITableViewCellSeparatorStyle, )
UITableViewCell only.Setter for separatorStyle.
pub unsafe fn separatorColor(&self) -> Option<Retained<UIColor>>
UIColor only.Sourcepub unsafe fn setSeparatorColor(&self, separator_color: Option<&UIColor>)
Available on crate feature UIColor only.
pub unsafe fn setSeparatorColor(&self, separator_color: Option<&UIColor>)
UIColor only.Setter for separatorColor.
pub unsafe fn separatorEffect(&self) -> Option<Retained<UIVisualEffect>>
UIVisualEffect only.Sourcepub unsafe fn setSeparatorEffect(
&self,
separator_effect: Option<&UIVisualEffect>,
)
Available on crate feature UIVisualEffect only.
pub unsafe fn setSeparatorEffect( &self, separator_effect: Option<&UIVisualEffect>, )
UIVisualEffect only.Setter for separatorEffect.
pub unsafe fn cellLayoutMarginsFollowReadableWidth(&self) -> bool
Sourcepub unsafe fn setCellLayoutMarginsFollowReadableWidth(
&self,
cell_layout_margins_follow_readable_width: bool,
)
pub unsafe fn setCellLayoutMarginsFollowReadableWidth( &self, cell_layout_margins_follow_readable_width: bool, )
Setter for cellLayoutMarginsFollowReadableWidth.
pub unsafe fn insetsContentViewsToSafeArea(&self) -> bool
Sourcepub unsafe fn setInsetsContentViewsToSafeArea(
&self,
insets_content_views_to_safe_area: bool,
)
pub unsafe fn setInsetsContentViewsToSafeArea( &self, insets_content_views_to_safe_area: bool, )
Setter for insetsContentViewsToSafeArea.
pub unsafe fn tableHeaderView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setTableHeaderView(&self, table_header_view: Option<&UIView>)
pub unsafe fn setTableHeaderView(&self, table_header_view: Option<&UIView>)
Setter for tableHeaderView.
Setter for tableFooterView.
pub unsafe fn dequeueReusableCellWithIdentifier( &self, identifier: &NSString, ) -> Option<Retained<UITableViewCell>>
UITableViewCell only.pub unsafe fn dequeueReusableCellWithIdentifier_forIndexPath( &self, identifier: &NSString, index_path: &NSIndexPath, ) -> Retained<UITableViewCell>
UITableViewCell only.UITableViewHeaderFooterView only.pub unsafe fn registerNib_forCellReuseIdentifier( &self, nib: Option<&UINib>, identifier: &NSString, )
UINib only.pub unsafe fn registerClass_forCellReuseIdentifier( &self, cell_class: Option<&AnyClass>, identifier: &NSString, )
UINib only.pub unsafe fn remembersLastFocusedIndexPath(&self) -> bool
Sourcepub unsafe fn setRemembersLastFocusedIndexPath(
&self,
remembers_last_focused_index_path: bool,
)
pub unsafe fn setRemembersLastFocusedIndexPath( &self, remembers_last_focused_index_path: bool, )
Setter for remembersLastFocusedIndexPath.
Sourcepub unsafe fn selectionFollowsFocus(&self) -> bool
pub unsafe fn selectionFollowsFocus(&self) -> bool
When enabled, the table view ensures that selection is automatically triggered when focus moves to a cell. Defaults to a system derived value based on platform and other properties of the table view.
Sourcepub unsafe fn setSelectionFollowsFocus(&self, selection_follows_focus: bool)
pub unsafe fn setSelectionFollowsFocus(&self, selection_follows_focus: bool)
Setter for selectionFollowsFocus.
Sourcepub unsafe fn allowsFocus(&self) -> bool
pub unsafe fn allowsFocus(&self) -> bool
Determines if the table view allows its cells to become focused. When tableView:canFocusRowAtIndexPath: is implemented, its return value takes precedence over this method. Defaults to a system derived value based on platform and other properties of the table view.
Sourcepub unsafe fn setAllowsFocus(&self, allows_focus: bool)
pub unsafe fn setAllowsFocus(&self, allows_focus: bool)
Setter for allowsFocus.
Sourcepub unsafe fn allowsFocusDuringEditing(&self) -> bool
pub unsafe fn allowsFocusDuringEditing(&self) -> bool
Determines if the table view allows its cells to become focused while editing. When tableView:canFocusRowAtIndexPath: is implemented, its return value takes precedence over this method. Defaults to a system derived value based on platform and other properties of the table view.
Sourcepub unsafe fn setAllowsFocusDuringEditing(
&self,
allows_focus_during_editing: bool,
)
pub unsafe fn setAllowsFocusDuringEditing( &self, allows_focus_during_editing: bool, )
Setter for allowsFocusDuringEditing.
pub unsafe fn dragInteractionEnabled(&self) -> bool
Sourcepub unsafe fn setDragInteractionEnabled(&self, drag_interaction_enabled: bool)
pub unsafe fn setDragInteractionEnabled(&self, drag_interaction_enabled: bool)
Setter for dragInteractionEnabled.
pub unsafe fn hasActiveDrag(&self) -> bool
pub unsafe fn hasActiveDrop(&self) -> bool
Sourcepub unsafe fn contentHuggingElements(&self) -> UITableViewContentHuggingElements
pub unsafe fn contentHuggingElements(&self) -> UITableViewContentHuggingElements
Determines the type of items that will tightly hug their content.
The default value for this property is UITableViewContentHuggingElementsSectionHeaders on visionOS for plain style table views and UITableViewContentHuggingElementsNone on all other platforms.
When the value of this property is UITableViewContentHuggingElementsSectionHeaders, any header view will not stretch the width of the table view if their content’s intrinsic content size is less than the table view’s width.
Sourcepub unsafe fn setContentHuggingElements(
&self,
content_hugging_elements: UITableViewContentHuggingElements,
)
pub unsafe fn setContentHuggingElements( &self, content_hugging_elements: UITableViewContentHuggingElements, )
Setter for contentHuggingElements.
Source§impl UITableView
Methods declared on superclass UIView.
impl UITableView
Methods declared on superclass UIView.
pub unsafe fn initWithFrame( this: Allocated<Self>, frame: CGRect, ) -> Retained<Self>
objc2-core-foundation only.Source§impl UITableView
Methods declared on superclass NSObject.
impl UITableView
Methods declared on superclass NSObject.
impl UITableView
UIDragAndDrop.
Methods from Deref<Target = UIScrollView>§
pub unsafe fn contentOffset(&self) -> CGPoint
objc2-core-foundation only.Sourcepub unsafe fn setContentOffset(&self, content_offset: CGPoint)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setContentOffset(&self, content_offset: CGPoint)
objc2-core-foundation only.Setter for contentOffset.
pub unsafe fn contentSize(&self) -> CGSize
objc2-core-foundation only.Sourcepub unsafe fn setContentSize(&self, content_size: CGSize)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setContentSize(&self, content_size: CGSize)
objc2-core-foundation only.Setter for contentSize.
pub unsafe fn contentInset(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets)
UIGeometry and objc2-core-foundation only.Setter for contentInset.
pub unsafe fn contentAlignmentPoint(&self) -> CGPoint
objc2-core-foundation only.Sourcepub unsafe fn setContentAlignmentPoint(&self, content_alignment_point: CGPoint)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setContentAlignmentPoint(&self, content_alignment_point: CGPoint)
objc2-core-foundation only.Setter for contentAlignmentPoint.
pub unsafe fn adjustedContentInset(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.pub unsafe fn adjustedContentInsetDidChange(&self)
pub unsafe fn contentInsetAdjustmentBehavior( &self, ) -> UIScrollViewContentInsetAdjustmentBehavior
Sourcepub unsafe fn setContentInsetAdjustmentBehavior(
&self,
content_inset_adjustment_behavior: UIScrollViewContentInsetAdjustmentBehavior,
)
pub unsafe fn setContentInsetAdjustmentBehavior( &self, content_inset_adjustment_behavior: UIScrollViewContentInsetAdjustmentBehavior, )
Setter for contentInsetAdjustmentBehavior.
pub unsafe fn automaticallyAdjustsScrollIndicatorInsets(&self) -> bool
Sourcepub unsafe fn setAutomaticallyAdjustsScrollIndicatorInsets(
&self,
automatically_adjusts_scroll_indicator_insets: bool,
)
pub unsafe fn setAutomaticallyAdjustsScrollIndicatorInsets( &self, automatically_adjusts_scroll_indicator_insets: bool, )
Setter for automaticallyAdjustsScrollIndicatorInsets.
pub unsafe fn contentLayoutGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.pub unsafe fn frameLayoutGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.pub unsafe fn delegate( &self, ) -> Option<Retained<ProtocolObject<dyn UIScrollViewDelegate>>>
Sourcepub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UIScrollViewDelegate>>,
)
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn UIScrollViewDelegate>>, )
This is a weak property.
Setter for delegate.
pub unsafe fn isDirectionalLockEnabled(&self) -> bool
Sourcepub unsafe fn setDirectionalLockEnabled(&self, directional_lock_enabled: bool)
pub unsafe fn setDirectionalLockEnabled(&self, directional_lock_enabled: bool)
Setter for isDirectionalLockEnabled.
pub unsafe fn bounces(&self) -> bool
Sourcepub unsafe fn setBounces(&self, bounces: bool)
pub unsafe fn setBounces(&self, bounces: bool)
Setter for bounces.
pub unsafe fn bouncesHorizontally(&self) -> bool
Sourcepub unsafe fn setBouncesHorizontally(&self, bounces_horizontally: bool)
pub unsafe fn setBouncesHorizontally(&self, bounces_horizontally: bool)
Setter for bouncesHorizontally.
pub unsafe fn bouncesVertically(&self) -> bool
Sourcepub unsafe fn setBouncesVertically(&self, bounces_vertically: bool)
pub unsafe fn setBouncesVertically(&self, bounces_vertically: bool)
Setter for bouncesVertically.
pub unsafe fn alwaysBounceVertical(&self) -> bool
Sourcepub unsafe fn setAlwaysBounceVertical(&self, always_bounce_vertical: bool)
pub unsafe fn setAlwaysBounceVertical(&self, always_bounce_vertical: bool)
Setter for alwaysBounceVertical.
pub unsafe fn alwaysBounceHorizontal(&self) -> bool
Sourcepub unsafe fn setAlwaysBounceHorizontal(&self, always_bounce_horizontal: bool)
pub unsafe fn setAlwaysBounceHorizontal(&self, always_bounce_horizontal: bool)
Setter for alwaysBounceHorizontal.
pub unsafe fn isPagingEnabled(&self) -> bool
Sourcepub unsafe fn setPagingEnabled(&self, paging_enabled: bool)
pub unsafe fn setPagingEnabled(&self, paging_enabled: bool)
Setter for isPagingEnabled.
pub unsafe fn isScrollEnabled(&self) -> bool
Sourcepub unsafe fn setScrollEnabled(&self, scroll_enabled: bool)
pub unsafe fn setScrollEnabled(&self, scroll_enabled: bool)
Setter for isScrollEnabled.
pub unsafe fn transfersHorizontalScrollingToParent(&self) -> bool
Sourcepub unsafe fn setTransfersHorizontalScrollingToParent(
&self,
transfers_horizontal_scrolling_to_parent: bool,
)
pub unsafe fn setTransfersHorizontalScrollingToParent( &self, transfers_horizontal_scrolling_to_parent: bool, )
Setter for transfersHorizontalScrollingToParent.
pub unsafe fn transfersVerticalScrollingToParent(&self) -> bool
Sourcepub unsafe fn setTransfersVerticalScrollingToParent(
&self,
transfers_vertical_scrolling_to_parent: bool,
)
pub unsafe fn setTransfersVerticalScrollingToParent( &self, transfers_vertical_scrolling_to_parent: bool, )
Setter for transfersVerticalScrollingToParent.
pub unsafe fn showsVerticalScrollIndicator(&self) -> bool
Sourcepub unsafe fn setShowsVerticalScrollIndicator(
&self,
shows_vertical_scroll_indicator: bool,
)
pub unsafe fn setShowsVerticalScrollIndicator( &self, shows_vertical_scroll_indicator: bool, )
Setter for showsVerticalScrollIndicator.
pub unsafe fn showsHorizontalScrollIndicator(&self) -> bool
Sourcepub unsafe fn setShowsHorizontalScrollIndicator(
&self,
shows_horizontal_scroll_indicator: bool,
)
pub unsafe fn setShowsHorizontalScrollIndicator( &self, shows_horizontal_scroll_indicator: bool, )
Setter for showsHorizontalScrollIndicator.
pub unsafe fn indicatorStyle(&self) -> UIScrollViewIndicatorStyle
Sourcepub unsafe fn setIndicatorStyle(
&self,
indicator_style: UIScrollViewIndicatorStyle,
)
pub unsafe fn setIndicatorStyle( &self, indicator_style: UIScrollViewIndicatorStyle, )
Setter for indicatorStyle.
pub unsafe fn verticalScrollIndicatorInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setVerticalScrollIndicatorInsets(
&self,
vertical_scroll_indicator_insets: UIEdgeInsets,
)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setVerticalScrollIndicatorInsets( &self, vertical_scroll_indicator_insets: UIEdgeInsets, )
UIGeometry and objc2-core-foundation only.Setter for verticalScrollIndicatorInsets.
pub unsafe fn horizontalScrollIndicatorInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setHorizontalScrollIndicatorInsets(
&self,
horizontal_scroll_indicator_insets: UIEdgeInsets,
)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setHorizontalScrollIndicatorInsets( &self, horizontal_scroll_indicator_insets: UIEdgeInsets, )
UIGeometry and objc2-core-foundation only.Setter for horizontalScrollIndicatorInsets.
pub unsafe fn scrollIndicatorInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setScrollIndicatorInsets(
&self,
scroll_indicator_insets: UIEdgeInsets,
)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setScrollIndicatorInsets( &self, scroll_indicator_insets: UIEdgeInsets, )
UIGeometry and objc2-core-foundation only.Setter for scrollIndicatorInsets.
pub unsafe fn decelerationRate(&self) -> UIScrollViewDecelerationRate
objc2-core-foundation only.Sourcepub unsafe fn setDecelerationRate(
&self,
deceleration_rate: UIScrollViewDecelerationRate,
)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setDecelerationRate( &self, deceleration_rate: UIScrollViewDecelerationRate, )
objc2-core-foundation only.Setter for decelerationRate.
pub unsafe fn indexDisplayMode(&self) -> UIScrollViewIndexDisplayMode
Sourcepub unsafe fn setIndexDisplayMode(
&self,
index_display_mode: UIScrollViewIndexDisplayMode,
)
pub unsafe fn setIndexDisplayMode( &self, index_display_mode: UIScrollViewIndexDisplayMode, )
Setter for indexDisplayMode.
pub unsafe fn setContentOffset_animated( &self, content_offset: CGPoint, animated: bool, )
objc2-core-foundation only.pub unsafe fn scrollRectToVisible_animated(&self, rect: CGRect, animated: bool)
objc2-core-foundation only.pub unsafe fn flashScrollIndicators(&self)
pub unsafe fn withScrollIndicatorsShownForContentOffsetChanges( &self, changes: &Block<dyn Fn() + '_>, )
block2 only.pub unsafe fn isTracking(&self) -> bool
pub unsafe fn isDragging(&self) -> bool
pub unsafe fn isDecelerating(&self) -> bool
pub unsafe fn isScrollAnimating(&self) -> bool
pub unsafe fn delaysContentTouches(&self) -> bool
Sourcepub unsafe fn setDelaysContentTouches(&self, delays_content_touches: bool)
pub unsafe fn setDelaysContentTouches(&self, delays_content_touches: bool)
Setter for delaysContentTouches.
pub unsafe fn canCancelContentTouches(&self) -> bool
Sourcepub unsafe fn setCanCancelContentTouches(
&self,
can_cancel_content_touches: bool,
)
pub unsafe fn setCanCancelContentTouches( &self, can_cancel_content_touches: bool, )
Setter for canCancelContentTouches.
pub unsafe fn touchesShouldBegin_withEvent_inContentView( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, view: &UIView, ) -> bool
UIEvent and UITouch only.pub unsafe fn touchesShouldCancelInContentView(&self, view: &UIView) -> bool
pub unsafe fn minimumZoomScale(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setMinimumZoomScale(&self, minimum_zoom_scale: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setMinimumZoomScale(&self, minimum_zoom_scale: CGFloat)
objc2-core-foundation only.Setter for minimumZoomScale.
pub unsafe fn maximumZoomScale(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setMaximumZoomScale(&self, maximum_zoom_scale: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setMaximumZoomScale(&self, maximum_zoom_scale: CGFloat)
objc2-core-foundation only.Setter for maximumZoomScale.
pub unsafe fn zoomScale(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setZoomScale(&self, zoom_scale: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setZoomScale(&self, zoom_scale: CGFloat)
objc2-core-foundation only.Setter for zoomScale.
pub unsafe fn setZoomScale_animated(&self, scale: CGFloat, animated: bool)
objc2-core-foundation only.pub unsafe fn zoomToRect_animated(&self, rect: CGRect, animated: bool)
objc2-core-foundation only.pub unsafe fn bouncesZoom(&self) -> bool
Sourcepub unsafe fn setBouncesZoom(&self, bounces_zoom: bool)
pub unsafe fn setBouncesZoom(&self, bounces_zoom: bool)
Setter for bouncesZoom.
pub unsafe fn isZooming(&self) -> bool
pub unsafe fn isZoomBouncing(&self) -> bool
pub unsafe fn isZoomAnimating(&self) -> bool
pub unsafe fn scrollsToTop(&self) -> bool
Sourcepub unsafe fn setScrollsToTop(&self, scrolls_to_top: bool)
pub unsafe fn setScrollsToTop(&self, scrolls_to_top: bool)
Setter for scrollsToTop.
pub unsafe fn stopScrollingAndZooming(&self)
pub unsafe fn panGestureRecognizer(&self) -> Retained<UIPanGestureRecognizer>
UIGestureRecognizer and UIPanGestureRecognizer only.pub unsafe fn pinchGestureRecognizer( &self, ) -> Option<Retained<UIPinchGestureRecognizer>>
UIGestureRecognizer and UIPinchGestureRecognizer only.pub unsafe fn directionalPressGestureRecognizer( &self, ) -> Retained<UIGestureRecognizer>
UIGestureRecognizer only.pub unsafe fn keyboardDismissMode(&self) -> UIScrollViewKeyboardDismissMode
Sourcepub unsafe fn setKeyboardDismissMode(
&self,
keyboard_dismiss_mode: UIScrollViewKeyboardDismissMode,
)
pub unsafe fn setKeyboardDismissMode( &self, keyboard_dismiss_mode: UIScrollViewKeyboardDismissMode, )
Setter for keyboardDismissMode.
pub unsafe fn refreshControl(&self) -> Option<Retained<UIRefreshControl>>
UIControl and UIRefreshControl only.Sourcepub unsafe fn setRefreshControl(
&self,
refresh_control: Option<&UIRefreshControl>,
)
Available on crate features UIControl and UIRefreshControl only.
pub unsafe fn setRefreshControl( &self, refresh_control: Option<&UIRefreshControl>, )
UIControl and UIRefreshControl only.Setter for refreshControl.
Sourcepub unsafe fn allowsKeyboardScrolling(&self) -> bool
pub unsafe fn allowsKeyboardScrolling(&self) -> bool
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 unsafe fn setAllowsKeyboardScrolling(&self, allows_keyboard_scrolling: bool)
pub unsafe fn setAllowsKeyboardScrolling(&self, allows_keyboard_scrolling: bool)
Setter for allowsKeyboardScrolling.
Methods from Deref<Target = UIView>§
pub unsafe fn accessibilityIgnoresInvertColors(&self) -> bool
UIAccessibilityAdditions only.Sourcepub unsafe fn setAccessibilityIgnoresInvertColors(
&self,
accessibility_ignores_invert_colors: bool,
)
Available on crate feature UIAccessibilityAdditions only.
pub unsafe fn setAccessibilityIgnoresInvertColors( &self, accessibility_ignores_invert_colors: bool, )
UIAccessibilityAdditions only.Setter for accessibilityIgnoresInvertColors.
Sourcepub unsafe fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>
Available on crate feature UIHoverStyle only.
pub unsafe 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 unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
Available on crate feature UIHoverStyle only.
pub unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>)
UIHoverStyle only.Setter for hoverStyle.
pub unsafe fn addInteraction( &self, interaction: &ProtocolObject<dyn UIInteraction>, )
UIInteraction only.pub unsafe fn removeInteraction( &self, interaction: &ProtocolObject<dyn UIInteraction>, )
UIInteraction only.pub unsafe fn interactions( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>
UIInteraction only.Sourcepub unsafe fn setInteractions(
&self,
interactions: &NSArray<ProtocolObject<dyn UIInteraction>>,
)
Available on crate feature UIInteraction only.
pub unsafe fn setInteractions( &self, interactions: &NSArray<ProtocolObject<dyn UIInteraction>>, )
UIInteraction only.Setter for interactions.
pub unsafe fn showsLargeContentViewer(&self) -> bool
UILargeContentViewer only.Sourcepub unsafe fn setShowsLargeContentViewer(
&self,
shows_large_content_viewer: bool,
)
Available on crate feature UILargeContentViewer only.
pub unsafe fn setShowsLargeContentViewer( &self, shows_large_content_viewer: bool, )
UILargeContentViewer only.Setter for showsLargeContentViewer.
pub unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>
UILargeContentViewer only.Sourcepub unsafe fn setLargeContentTitle(
&self,
large_content_title: Option<&NSString>,
)
Available on crate feature UILargeContentViewer only.
pub unsafe fn setLargeContentTitle( &self, large_content_title: Option<&NSString>, )
UILargeContentViewer only.Setter for largeContentTitle.
pub unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>
UILargeContentViewer and UIImage only.Sourcepub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
Available on crate features UILargeContentViewer and UIImage only.
pub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>)
UILargeContentViewer and UIImage only.Setter for largeContentImage.
pub unsafe fn scalesLargeContentImage(&self) -> bool
UILargeContentViewer only.Sourcepub unsafe fn setScalesLargeContentImage(
&self,
scales_large_content_image: bool,
)
Available on crate feature UILargeContentViewer only.
pub unsafe fn setScalesLargeContentImage( &self, scales_large_content_image: bool, )
UILargeContentViewer only.Setter for scalesLargeContentImage.
pub unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets
UILargeContentViewer and UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setLargeContentImageInsets(
&self,
large_content_image_insets: UIEdgeInsets,
)
Available on crate features UILargeContentViewer and UIGeometry and objc2-core-foundation only.
pub unsafe fn setLargeContentImageInsets( &self, large_content_image_insets: UIEdgeInsets, )
UILargeContentViewer and UIGeometry and objc2-core-foundation only.Setter for largeContentImageInsets.
pub unsafe fn viewPrintFormatter(&self) -> Retained<UIViewPrintFormatter>
UIPrintFormatter only.pub unsafe fn drawRect_forViewPrintFormatter( &self, rect: CGRect, formatter: &UIViewPrintFormatter, )
UIPrintFormatter and objc2-core-foundation only.pub unsafe fn endEditing(&self, force: bool) -> bool
UITextField only.pub unsafe fn isUserInteractionEnabled(&self) -> bool
Sourcepub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
pub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool)
Setter for isUserInteractionEnabled.
pub unsafe fn tag(&self) -> NSInteger
pub fn layer(&self) -> Retained<CALayer>
objc2-quartz-core and non-watchOS only.pub unsafe fn canBecomeFocused(&self) -> bool
pub unsafe fn isFocused(&self) -> bool
Sourcepub unsafe fn focusGroupIdentifier(&self) -> Option<Retained<NSString>>
pub unsafe 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 unsafe fn setFocusGroupIdentifier(
&self,
focus_group_identifier: Option<&NSString>,
)
pub unsafe fn setFocusGroupIdentifier( &self, focus_group_identifier: Option<&NSString>, )
Setter for focusGroupIdentifier.
Sourcepub unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
Available on crate feature UIFocus only.
pub unsafe 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 unsafe fn setFocusGroupPriority(
&self,
focus_group_priority: UIFocusGroupPriority,
)
Available on crate feature UIFocus only.
pub unsafe fn setFocusGroupPriority( &self, focus_group_priority: UIFocusGroupPriority, )
UIFocus only.Setter for focusGroupPriority.
Sourcepub unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
Available on crate feature UIFocusEffect only.
pub unsafe 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 unsafe fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
Available on crate feature UIFocusEffect only.
pub unsafe fn setFocusEffect(&self, focus_effect: Option<&UIFocusEffect>)
UIFocusEffect only.Setter for focusEffect.
pub unsafe fn semanticContentAttribute(&self) -> UISemanticContentAttribute
Sourcepub unsafe fn setSemanticContentAttribute(
&self,
semantic_content_attribute: UISemanticContentAttribute,
)
pub unsafe fn setSemanticContentAttribute( &self, semantic_content_attribute: UISemanticContentAttribute, )
Setter for semanticContentAttribute.
pub unsafe fn effectiveUserInterfaceLayoutDirection( &self, ) -> UIUserInterfaceLayoutDirection
UIInterface only.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 unsafe fn center(&self) -> CGPoint
objc2-core-foundation only.Sourcepub unsafe fn setCenter(&self, center: CGPoint)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setCenter(&self, center: CGPoint)
objc2-core-foundation only.Setter for center.
pub unsafe fn transform(&self) -> CGAffineTransform
objc2-core-foundation only.Sourcepub unsafe fn setTransform(&self, transform: CGAffineTransform)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setTransform(&self, transform: CGAffineTransform)
objc2-core-foundation only.Setter for transform.
pub unsafe fn transform3D(&self) -> CATransform3D
objc2-quartz-core and non-watchOS only.Sourcepub unsafe fn setTransform3D(&self, transform3_d: CATransform3D)
Available on crate feature objc2-quartz-core and non-watchOS only.
pub unsafe 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 unsafe fn anchorPoint(&self) -> CGPoint
objc2-core-foundation only.Sourcepub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint)
objc2-core-foundation only.Setter for anchorPoint.
pub unsafe fn isMultipleTouchEnabled(&self) -> bool
Sourcepub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
pub fn setMultipleTouchEnabled(&self, multiple_touch_enabled: bool)
Setter for isMultipleTouchEnabled.
pub unsafe fn isExclusiveTouch(&self) -> bool
Sourcepub unsafe fn setExclusiveTouch(&self, exclusive_touch: bool)
pub unsafe fn setExclusiveTouch(&self, exclusive_touch: bool)
Setter for isExclusiveTouch.
pub unsafe fn hitTest_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> Option<Retained<UIView>>
UIEvent and objc2-core-foundation only.pub unsafe fn pointInside_withEvent( &self, point: CGPoint, event: Option<&UIEvent>, ) -> bool
UIEvent and objc2-core-foundation only.pub unsafe fn convertPoint_toView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation only.pub unsafe fn convertPoint_fromView( &self, point: CGPoint, view: Option<&UIView>, ) -> CGPoint
objc2-core-foundation only.pub unsafe fn convertRect_toView( &self, rect: CGRect, view: Option<&UIView>, ) -> CGRect
objc2-core-foundation only.pub unsafe fn convertRect_fromView( &self, rect: CGRect, view: Option<&UIView>, ) -> CGRect
objc2-core-foundation only.pub unsafe fn autoresizesSubviews(&self) -> bool
Sourcepub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
pub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
Setter for autoresizesSubviews.
pub unsafe fn autoresizingMask(&self) -> UIViewAutoresizing
Sourcepub unsafe fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
pub unsafe fn setAutoresizingMask(&self, autoresizing_mask: UIViewAutoresizing)
Setter for autoresizingMask.
pub unsafe fn sizeThatFits(&self, size: CGSize) -> CGSize
objc2-core-foundation only.pub unsafe fn sizeToFit(&self)
pub fn superview(&self) -> Option<Retained<UIView>>
pub fn subviews(&self) -> Retained<NSArray<UIView>>
pub fn window(&self) -> Option<Retained<UIWindow>>
UIWindow only.pub unsafe fn removeFromSuperview(&self)
pub unsafe fn insertSubview_atIndex(&self, view: &UIView, index: NSInteger)
pub unsafe fn exchangeSubviewAtIndex_withSubviewAtIndex( &self, index1: NSInteger, index2: NSInteger, )
pub unsafe fn addSubview(&self, view: &UIView)
pub unsafe fn insertSubview_belowSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub unsafe fn insertSubview_aboveSubview( &self, view: &UIView, sibling_subview: &UIView, )
pub unsafe fn bringSubviewToFront(&self, view: &UIView)
pub unsafe fn sendSubviewToBack(&self, view: &UIView)
pub unsafe fn didAddSubview(&self, subview: &UIView)
pub unsafe fn willRemoveSubview(&self, subview: &UIView)
pub unsafe fn willMoveToSuperview(&self, new_superview: Option<&UIView>)
pub unsafe fn didMoveToSuperview(&self)
pub unsafe fn willMoveToWindow(&self, new_window: Option<&UIWindow>)
UIWindow only.pub unsafe fn didMoveToWindow(&self)
pub unsafe fn isDescendantOfView(&self, view: &UIView) -> bool
pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option<Retained<UIView>>
pub unsafe fn setNeedsLayout(&self)
pub unsafe fn layoutIfNeeded(&self)
pub unsafe fn layoutSubviews(&self)
pub unsafe fn layoutMargins(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setLayoutMargins(&self, layout_margins: UIEdgeInsets)
UIGeometry and objc2-core-foundation only.Setter for layoutMargins.
pub unsafe fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets
UIGeometry and objc2-core-foundation only.Sourcepub unsafe fn setDirectionalLayoutMargins(
&self,
directional_layout_margins: NSDirectionalEdgeInsets,
)
Available on crate features UIGeometry and objc2-core-foundation only.
pub unsafe fn setDirectionalLayoutMargins( &self, directional_layout_margins: NSDirectionalEdgeInsets, )
UIGeometry and objc2-core-foundation only.Setter for directionalLayoutMargins.
pub unsafe fn preservesSuperviewLayoutMargins(&self) -> bool
Sourcepub unsafe fn setPreservesSuperviewLayoutMargins(
&self,
preserves_superview_layout_margins: bool,
)
pub unsafe fn setPreservesSuperviewLayoutMargins( &self, preserves_superview_layout_margins: bool, )
Setter for preservesSuperviewLayoutMargins.
pub unsafe fn insetsLayoutMarginsFromSafeArea(&self) -> bool
Sourcepub unsafe fn setInsetsLayoutMarginsFromSafeArea(
&self,
insets_layout_margins_from_safe_area: bool,
)
pub unsafe fn setInsetsLayoutMarginsFromSafeArea( &self, insets_layout_margins_from_safe_area: bool, )
Setter for insetsLayoutMarginsFromSafeArea.
pub unsafe fn layoutMarginsDidChange(&self)
pub fn safeAreaInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.pub unsafe fn safeAreaInsetsDidChange(&self)
pub unsafe fn layoutMarginsGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.Sourcepub unsafe fn readableContentGuide(&self) -> Retained<UILayoutGuide>
Available on crate feature UILayoutGuide only.
pub unsafe 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 unsafe fn safeAreaLayoutGuide(&self) -> Retained<UILayoutGuide>
UILayoutGuide only.Sourcepub unsafe fn keyboardLayoutGuide(&self) -> Retained<UIKeyboardLayoutGuide>
Available on crate features UIKeyboardLayoutGuide and UILayoutGuide and UITrackingLayoutGuide only.
pub unsafe 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.
pub unsafe fn drawRect(&self, rect: CGRect)
objc2-core-foundation only.pub fn setNeedsDisplay(&self)
pub unsafe fn setNeedsDisplayInRect(&self, rect: CGRect)
objc2-core-foundation only.pub unsafe fn clipsToBounds(&self) -> bool
Sourcepub unsafe fn setClipsToBounds(&self, clips_to_bounds: bool)
pub unsafe 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.
pub unsafe fn alpha(&self) -> CGFloat
objc2-core-foundation only.Sourcepub unsafe fn setAlpha(&self, alpha: CGFloat)
Available on crate feature objc2-core-foundation only.
pub unsafe fn setAlpha(&self, alpha: CGFloat)
objc2-core-foundation only.Setter for alpha.
pub unsafe fn isOpaque(&self) -> bool
pub unsafe fn clearsContextBeforeDrawing(&self) -> bool
Sourcepub unsafe fn setClearsContextBeforeDrawing(
&self,
clears_context_before_drawing: bool,
)
pub unsafe fn setClearsContextBeforeDrawing( &self, clears_context_before_drawing: bool, )
Setter for clearsContextBeforeDrawing.
pub fn isHidden(&self) -> bool
pub unsafe fn contentMode(&self) -> UIViewContentMode
Sourcepub unsafe fn setContentMode(&self, content_mode: UIViewContentMode)
pub unsafe fn setContentMode(&self, content_mode: UIViewContentMode)
Setter for contentMode.
pub unsafe fn contentStretch(&self) -> CGRect
objc2-core-foundation only.Sourcepub unsafe fn setContentStretch(&self, content_stretch: CGRect)
👎DeprecatedAvailable on crate feature objc2-core-foundation only.
pub unsafe fn setContentStretch(&self, content_stretch: CGRect)
objc2-core-foundation only.Setter for contentStretch.
pub unsafe fn maskView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn setMaskView(&self, mask_view: Option<&UIView>)
pub unsafe fn setMaskView(&self, mask_view: Option<&UIView>)
Setter for maskView.
pub unsafe 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.Setter for tintColor.
pub unsafe fn tintAdjustmentMode(&self) -> UIViewTintAdjustmentMode
Sourcepub unsafe fn setTintAdjustmentMode(
&self,
tint_adjustment_mode: UIViewTintAdjustmentMode,
)
pub unsafe fn setTintAdjustmentMode( &self, tint_adjustment_mode: UIViewTintAdjustmentMode, )
Setter for tintAdjustmentMode.
pub unsafe fn tintColorDidChange(&self)
pub fn gestureRecognizers( &self, ) -> Option<Retained<NSArray<UIGestureRecognizer>>>
UIGestureRecognizer only.Sourcepub unsafe fn setGestureRecognizers(
&self,
gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>,
)
Available on crate feature UIGestureRecognizer only.
pub unsafe fn setGestureRecognizers( &self, gesture_recognizers: Option<&NSArray<UIGestureRecognizer>>, )
UIGestureRecognizer only.Setter for gestureRecognizers.
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.Sourcepub unsafe fn addMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect only.
pub unsafe 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 unsafe fn removeMotionEffect(&self, effect: &UIMotionEffect)
Available on crate feature UIMotionEffect only.
pub unsafe 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 unsafe fn motionEffects(&self) -> Retained<NSArray<UIMotionEffect>>
UIMotionEffect only.Sourcepub unsafe fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
Available on crate feature UIMotionEffect only.
pub unsafe fn setMotionEffects(&self, motion_effects: &NSArray<UIMotionEffect>)
UIMotionEffect only.Setter for motionEffects.
pub unsafe fn constraints(&self) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint only.pub unsafe fn addConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint only.pub unsafe fn addConstraints(&self, constraints: &NSArray<NSLayoutConstraint>)
NSLayoutConstraint only.pub unsafe fn removeConstraint(&self, constraint: &NSLayoutConstraint)
NSLayoutConstraint only.pub unsafe fn removeConstraints( &self, constraints: &NSArray<NSLayoutConstraint>, )
NSLayoutConstraint only.pub unsafe fn updateConstraintsIfNeeded(&self)
pub unsafe fn updateConstraints(&self)
pub unsafe fn needsUpdateConstraints(&self) -> bool
pub unsafe fn setNeedsUpdateConstraints(&self)
pub unsafe fn translatesAutoresizingMaskIntoConstraints(&self) -> bool
Sourcepub unsafe fn setTranslatesAutoresizingMaskIntoConstraints(
&self,
translates_autoresizing_mask_into_constraints: bool,
)
pub unsafe fn setTranslatesAutoresizingMaskIntoConstraints( &self, translates_autoresizing_mask_into_constraints: bool, )
Setter for translatesAutoresizingMaskIntoConstraints.
pub unsafe fn alignmentRectForFrame(&self, frame: CGRect) -> CGRect
objc2-core-foundation only.pub unsafe fn frameForAlignmentRect(&self, alignment_rect: CGRect) -> CGRect
objc2-core-foundation only.pub unsafe fn alignmentRectInsets(&self) -> UIEdgeInsets
UIGeometry and objc2-core-foundation only.pub unsafe fn viewForBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn viewForFirstBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn viewForLastBaselineLayout(&self) -> Retained<UIView>
pub unsafe fn intrinsicContentSize(&self) -> CGSize
objc2-core-foundation only.pub unsafe fn invalidateIntrinsicContentSize(&self)
pub unsafe fn contentHuggingPriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint only.pub unsafe fn setContentHuggingPriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint only.pub unsafe fn contentCompressionResistancePriorityForAxis( &self, axis: UILayoutConstraintAxis, ) -> UILayoutPriority
NSLayoutConstraint only.pub unsafe fn setContentCompressionResistancePriority_forAxis( &self, priority: UILayoutPriority, axis: UILayoutConstraintAxis, )
NSLayoutConstraint only.pub unsafe fn systemLayoutSizeFittingSize(&self, target_size: CGSize) -> CGSize
objc2-core-foundation only.pub unsafe fn systemLayoutSizeFittingSize_withHorizontalFittingPriority_verticalFittingPriority( &self, target_size: CGSize, horizontal_fitting_priority: UILayoutPriority, vertical_fitting_priority: UILayoutPriority, ) -> CGSize
NSLayoutConstraint and objc2-core-foundation only.pub unsafe fn layoutGuides(&self) -> Retained<NSArray<UILayoutGuide>>
UILayoutGuide only.pub unsafe fn addLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide only.pub unsafe fn removeLayoutGuide(&self, layout_guide: &UILayoutGuide)
UILayoutGuide only.pub unsafe fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub unsafe fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub unsafe fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub unsafe fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub unsafe fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub unsafe fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub unsafe fn widthAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor only.pub unsafe fn heightAnchor(&self) -> Retained<NSLayoutDimension>
NSLayoutAnchor only.pub unsafe fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>
NSLayoutAnchor only.pub unsafe fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub unsafe fn firstBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub unsafe fn lastBaselineAnchor(&self) -> Retained<NSLayoutYAxisAnchor>
NSLayoutAnchor only.pub unsafe fn constraintsAffectingLayoutForAxis( &self, axis: UILayoutConstraintAxis, ) -> Retained<NSArray<NSLayoutConstraint>>
NSLayoutConstraint only.pub unsafe fn hasAmbiguousLayout(&self) -> bool
pub unsafe fn exerciseAmbiguityInLayout(&self)
pub unsafe fn restorationIdentifier(&self) -> Option<Retained<NSString>>
Sourcepub unsafe fn setRestorationIdentifier(
&self,
restoration_identifier: Option<&NSString>,
)
pub unsafe fn setRestorationIdentifier( &self, restoration_identifier: Option<&NSString>, )
Setter for restorationIdentifier.
pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder)
pub unsafe fn snapshotViewAfterScreenUpdates( &self, after_updates: bool, ) -> Option<Retained<UIView>>
pub unsafe fn resizableSnapshotViewFromRect_afterScreenUpdates_withCapInsets( &self, rect: CGRect, after_updates: bool, cap_insets: UIEdgeInsets, ) -> Option<Retained<UIView>>
UIGeometry and objc2-core-foundation only.pub unsafe fn drawViewHierarchyInRect_afterScreenUpdates( &self, rect: CGRect, after_updates: bool, ) -> bool
objc2-core-foundation only.pub unsafe fn overrideUserInterfaceStyle(&self) -> UIUserInterfaceStyle
UIInterface only.Sourcepub unsafe fn setOverrideUserInterfaceStyle(
&self,
override_user_interface_style: UIUserInterfaceStyle,
)
Available on crate feature UIInterface only.
pub unsafe fn setOverrideUserInterfaceStyle( &self, override_user_interface_style: UIUserInterfaceStyle, )
UIInterface only.Setter for overrideUserInterfaceStyle.
Sourcepub unsafe fn minimumContentSizeCategory(
&self,
) -> Option<Retained<UIContentSizeCategory>>
Available on crate feature UIContentSizeCategory only.
pub unsafe 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 unsafe fn setMinimumContentSizeCategory(
&self,
minimum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory only.
pub unsafe fn setMinimumContentSizeCategory( &self, minimum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory only.Setter for minimumContentSizeCategory.
pub unsafe fn maximumContentSizeCategory( &self, ) -> Option<Retained<UIContentSizeCategory>>
UIContentSizeCategory only.Sourcepub unsafe fn setMaximumContentSizeCategory(
&self,
maximum_content_size_category: Option<&UIContentSizeCategory>,
)
Available on crate feature UIContentSizeCategory only.
pub unsafe fn setMaximumContentSizeCategory( &self, maximum_content_size_category: Option<&UIContentSizeCategory>, )
UIContentSizeCategory only.Setter for maximumContentSizeCategory.
Sourcepub unsafe fn appliedContentSizeCategoryLimitsDescription(
&self,
) -> Retained<NSString>
pub unsafe 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.
pub unsafe fn traitOverrides( &self, ) -> Retained<ProtocolObject<dyn UITraitOverrides>>
UITraitCollection only.Sourcepub unsafe fn updateTraitsIfNeeded(&self)
pub unsafe 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.
Methods from Deref<Target = UIResponder>§
pub unsafe fn nextResponder(&self) -> Option<Retained<UIResponder>>
pub unsafe fn canBecomeFirstResponder(&self) -> bool
pub unsafe fn becomeFirstResponder(&self) -> bool
pub unsafe fn canResignFirstResponder(&self) -> bool
pub unsafe fn resignFirstResponder(&self) -> bool
pub unsafe fn isFirstResponder(&self) -> bool
pub unsafe fn touchesBegan_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub unsafe fn touchesMoved_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub unsafe fn touchesEnded_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub unsafe fn touchesCancelled_withEvent( &self, touches: &NSSet<UITouch>, event: Option<&UIEvent>, )
UIEvent and UITouch only.pub unsafe fn touchesEstimatedPropertiesUpdated(&self, touches: &NSSet<UITouch>)
UITouch only.pub unsafe fn pressesBegan_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub unsafe fn pressesChanged_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub unsafe fn pressesEnded_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub unsafe fn pressesCancelled_withEvent( &self, presses: &NSSet<UIPress>, event: Option<&UIPressesEvent>, )
UIEvent and UIPress and UIPressesEvent only.pub unsafe fn motionBegan_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub unsafe fn motionEnded_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub unsafe fn motionCancelled_withEvent( &self, motion: UIEventSubtype, event: Option<&UIEvent>, )
UIEvent only.pub unsafe fn remoteControlReceivedWithEvent(&self, event: Option<&UIEvent>)
UIEvent only.pub unsafe fn canPerformAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> bool
pub unsafe fn targetForAction_withSender( &self, action: Sel, sender: Option<&AnyObject>, ) -> Option<Retained<AnyObject>>
pub unsafe fn buildMenuWithBuilder( &self, builder: &ProtocolObject<dyn UIMenuBuilder>, )
UIMenuBuilder only.pub unsafe fn validateCommand(&self, command: &UICommand)
UICommand and UIMenuElement only.pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>
pub unsafe fn editingInteractionConfiguration( &self, ) -> UIEditingInteractionConfiguration
pub unsafe fn keyCommands(&self) -> Option<Retained<NSArray<UIKeyCommand>>>
UICommand and UIKeyCommand and UIMenuElement only.pub unsafe fn inputView(&self) -> Option<Retained<UIView>>
pub unsafe fn inputAccessoryView(&self) -> Option<Retained<UIView>>
Sourcepub unsafe fn inputAssistantItem(&self) -> Retained<UITextInputAssistantItem>
Available on crate feature UITextInput only.
pub unsafe 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 unsafe fn inputViewController( &self, ) -> Option<Retained<UIInputViewController>>
UIInputViewController and UIViewController only.pub unsafe fn inputAccessoryViewController( &self, ) -> Option<Retained<UIInputViewController>>
UIInputViewController and UIViewController only.pub unsafe fn textInputMode(&self) -> Option<Retained<UITextInputMode>>
UITextInput only.pub unsafe fn textInputContextIdentifier(&self) -> Option<Retained<NSString>>
pub unsafe fn reloadInputViews(&self)
pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>
Sourcepub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
Setter for userActivity.
pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity)
pub unsafe fn restoreUserActivityState(&self, activity: &NSUserActivity)
pub unsafe fn captureTextFromCamera(&self, sender: Option<&AnyObject>)
pub unsafe fn activityItemsConfiguration( &self, ) -> Option<Retained<ProtocolObject<dyn UIActivityItemsConfigurationReading>>>
UIResponder_UIActivityItemsConfiguration and UIActivityItemsConfigurationReading only.Sourcepub unsafe fn setActivityItemsConfiguration(
&self,
activity_items_configuration: Option<&ProtocolObject<dyn UIActivityItemsConfigurationReading>>,
)
Available on crate features UIResponder_UIActivityItemsConfiguration and UIActivityItemsConfigurationReading only.
pub unsafe 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.
§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<AnyObject> for UITableView
impl AsRef<AnyObject> for UITableView
Source§impl AsRef<NSObject> for UITableView
impl AsRef<NSObject> for UITableView
Source§impl AsRef<UIResponder> for UITableView
impl AsRef<UIResponder> for UITableView
Source§fn as_ref(&self) -> &UIResponder
fn as_ref(&self) -> &UIResponder
Source§impl AsRef<UIScrollView> for UITableView
impl AsRef<UIScrollView> for UITableView
Source§fn as_ref(&self) -> &UIScrollView
fn as_ref(&self) -> &UIScrollView
Source§impl AsRef<UITableView> for UITableView
impl AsRef<UITableView> for UITableView
Source§impl AsRef<UIView> for UITableView
impl AsRef<UIView> for UITableView
Source§impl Borrow<AnyObject> for UITableView
impl Borrow<AnyObject> for UITableView
Source§impl Borrow<NSObject> for UITableView
impl Borrow<NSObject> for UITableView
Source§impl Borrow<UIResponder> for UITableView
impl Borrow<UIResponder> for UITableView
Source§fn borrow(&self) -> &UIResponder
fn borrow(&self) -> &UIResponder
Source§impl Borrow<UIScrollView> for UITableView
impl Borrow<UIScrollView> for UITableView
Source§fn borrow(&self) -> &UIScrollView
fn borrow(&self) -> &UIScrollView
Source§impl Borrow<UIView> for UITableView
impl Borrow<UIView> for UITableView
Source§impl CALayerDelegate for UITableView
Available on crate feature objc2-quartz-core and non-watchOS only.
impl CALayerDelegate for UITableView
objc2-quartz-core and non-watchOS only.unsafe fn displayLayer(&self, layer: &CALayer)
unsafe fn layerWillDraw(&self, layer: &CALayer)
unsafe fn layoutSublayersOfLayer(&self, layer: &CALayer)
unsafe fn actionForLayer_forKey( &self, layer: &CALayer, event: &NSString, ) -> Option<Retained<ProtocolObject<dyn CAAction>>>
Source§impl ClassType for UITableView
impl ClassType for UITableView
Source§const NAME: &'static str = "UITableView"
const NAME: &'static str = "UITableView"
Source§type Super = UIScrollView
type Super = UIScrollView
Source§type ThreadKind = dyn MainThreadOnly
type ThreadKind = dyn MainThreadOnly
Source§impl Debug for UITableView
impl Debug for UITableView
Source§impl Deref for UITableView
impl Deref for UITableView
Source§impl Hash for UITableView
impl Hash for UITableView
Source§impl Message for UITableView
impl Message for UITableView
Source§impl NSCoding for UITableView
impl NSCoding for UITableView
Source§impl NSObjectProtocol for UITableView
impl NSObjectProtocol for UITableView
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 PartialEq for UITableView
impl PartialEq for UITableView
Source§impl RefEncode for UITableView
impl RefEncode for UITableView
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 UITableView
Available on crate feature UIAppearance only.
impl UIAppearance for UITableView
UIAppearance only.unsafe fn appearance(mtm: MainThreadMarker) -> Retained<Self>
unsafe fn appearanceWhenContainedInInstancesOfClasses( container_types: &NSArray<AnyClass>, mtm: MainThreadMarker, ) -> Retained<Self>
Source§unsafe fn appearanceForTraitCollection(
trait: &UITraitCollection,
mtm: MainThreadMarker,
) -> Retained<Self>
unsafe 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 UICoordinateSpace for UITableView
impl UICoordinateSpace for UITableView
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 UIDataSourceTranslating for UITableView
Available on crate feature UIDataSourceTranslating only.
impl UIDataSourceTranslating for UITableView
UIDataSourceTranslating only.unsafe fn presentationSectionIndexForDataSourceSectionIndex( &self, data_source_section_index: NSInteger, ) -> NSInteger
unsafe fn dataSourceSectionIndexForPresentationSectionIndex( &self, presentation_section_index: NSInteger, ) -> NSInteger
unsafe fn presentationIndexPathForDataSourceIndexPath( &self, data_source_index_path: Option<&NSIndexPath>, ) -> Option<Retained<NSIndexPath>>
unsafe fn dataSourceIndexPathForPresentationIndexPath( &self, presentation_index_path: Option<&NSIndexPath>, ) -> Option<Retained<NSIndexPath>>
Source§impl UIDynamicItem for UITableView
Available on crate feature UIDynamicBehavior only.
impl UIDynamicItem for UITableView
UIDynamicBehavior only.Source§unsafe fn setCenter(&self, center: CGPoint)
unsafe fn setCenter(&self, center: CGPoint)
objc2-core-foundation only.center.Source§unsafe fn transform(&self) -> CGAffineTransform
unsafe fn transform(&self) -> CGAffineTransform
objc2-core-foundation only.Source§unsafe fn setTransform(&self, transform: CGAffineTransform)
unsafe fn setTransform(&self, transform: CGAffineTransform)
objc2-core-foundation only.transform.Source§unsafe fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
unsafe fn collisionBoundsType(&self) -> UIDynamicItemCollisionBoundsType
Source§unsafe fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
unsafe fn collisionBoundingPath(&self) -> Retained<UIBezierPath>
UIBezierPath only.Source§impl UIFocusEnvironment for UITableView
Available on crate feature UIFocus only.
impl UIFocusEnvironment for UITableView
UIFocus only.Source§unsafe fn preferredFocusEnvironments(
&self,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
unsafe fn preferredFocusEnvironments( &self, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusEnvironment>>>
Source§unsafe fn parentFocusEnvironment(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
unsafe fn parentFocusEnvironment( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusEnvironment>>>
Source§unsafe fn focusItemContainer(
&self,
) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
unsafe fn focusItemContainer( &self, ) -> Option<Retained<ProtocolObject<dyn UIFocusItemContainer>>>
Source§unsafe fn setNeedsFocusUpdate(&self)
unsafe fn setNeedsFocusUpdate(&self)
[[UIFocusSystem focusSystemForEnvironment:self] requestFocusUpdateToEnvironment:self];Source§unsafe fn updateFocusIfNeeded(&self)
unsafe fn updateFocusIfNeeded(&self)
[[UIFocusSystem focusSystemForEnvironment:self] updateFocusIfNeeded];.Source§unsafe fn shouldUpdateFocusInContext(
&self,
context: &UIFocusUpdateContext,
) -> bool
unsafe fn shouldUpdateFocusInContext( &self, context: &UIFocusUpdateContext, ) -> bool
Source§unsafe fn didUpdateFocusInContext_withAnimationCoordinator(
&self,
context: &UIFocusUpdateContext,
coordinator: &UIFocusAnimationCoordinator,
)
unsafe fn didUpdateFocusInContext_withAnimationCoordinator( &self, context: &UIFocusUpdateContext, coordinator: &UIFocusAnimationCoordinator, )
UIFocusAnimationCoordinator only.Source§unsafe fn soundIdentifierForFocusUpdateInContext(
&self,
context: &UIFocusUpdateContext,
) -> Option<Retained<UIFocusSoundIdentifier>>
unsafe fn soundIdentifierForFocusUpdateInContext( &self, context: &UIFocusUpdateContext, ) -> Option<Retained<UIFocusSoundIdentifier>>
Source§impl UIFocusItem for UITableView
Available on crate feature UIFocus only.
impl UIFocusItem for UITableView
UIFocus only.Source§unsafe fn canBecomeFocused(&self) -> bool
unsafe fn canBecomeFocused(&self) -> bool
Source§unsafe fn frame(&self) -> CGRect
unsafe fn frame(&self) -> CGRect
objc2-core-foundation only.coordinateSpace of the UIFocusItemContainer in which it is contained.Source§unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
unsafe fn focusEffect(&self) -> Option<Retained<UIFocusEffect>>
UIFocusEffect only.Source§unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
unsafe fn focusGroupPriority(&self) -> UIFocusGroupPriority
Source§unsafe fn focusItemDeferralMode(&self) -> UIFocusItemDeferralMode
unsafe 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§unsafe fn isTransparentFocusItem(&self) -> bool
unsafe fn isTransparentFocusItem(&self) -> bool
Source§unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
unsafe fn didHintFocusMovement(&self, hint: &UIFocusMovementHint)
UIFocusMovementHint only.Source§impl UIFocusItemContainer for UITableView
Available on crate feature UIFocus only.
impl UIFocusItemContainer for UITableView
UIFocus only.Source§unsafe fn coordinateSpace(
&self,
) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
unsafe fn coordinateSpace( &self, ) -> Retained<ProtocolObject<dyn UICoordinateSpace>>
Source§unsafe fn focusItemsInRect(
&self,
rect: CGRect,
) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
unsafe fn focusItemsInRect( &self, rect: CGRect, ) -> Retained<NSArray<ProtocolObject<dyn UIFocusItem>>>
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 UIFocusItemScrollableContainer for UITableView
Available on crate feature UIFocus only.
impl UIFocusItemScrollableContainer for UITableView
UIFocus only.Source§unsafe fn contentOffset(&self) -> CGPoint
unsafe fn contentOffset(&self) -> CGPoint
objc2-core-foundation only.bounds property, bounds.origin must be equal to contentOffset.Source§unsafe fn setContentOffset(&self, content_offset: CGPoint)
unsafe fn setContentOffset(&self, content_offset: CGPoint)
objc2-core-foundation only.contentOffset.Source§unsafe fn contentSize(&self) -> CGSize
unsafe fn contentSize(&self) -> CGSize
objc2-core-foundation only.Source§impl UIResponderStandardEditActions for UITableView
impl UIResponderStandardEditActions for UITableView
unsafe fn cut(&self, sender: Option<&AnyObject>)
unsafe fn copy(&self, sender: Option<&AnyObject>)
unsafe fn paste(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndMatchStyle(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndGo(&self, sender: Option<&AnyObject>)
unsafe fn pasteAndSearch(&self, sender: Option<&AnyObject>)
unsafe fn select(&self, sender: Option<&AnyObject>)
unsafe fn selectAll(&self, sender: Option<&AnyObject>)
unsafe fn delete(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&AnyObject>)
unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&AnyObject>)
unsafe fn toggleBoldface(&self, sender: Option<&AnyObject>)
unsafe fn toggleItalics(&self, sender: Option<&AnyObject>)
unsafe fn toggleUnderline(&self, sender: Option<&AnyObject>)
unsafe fn increaseSize(&self, sender: Option<&AnyObject>)
unsafe fn decreaseSize(&self, sender: Option<&AnyObject>)
unsafe fn find(&self, sender: Option<&AnyObject>)
unsafe fn findAndReplace(&self, sender: Option<&AnyObject>)
unsafe fn findNext(&self, sender: Option<&AnyObject>)
unsafe fn findPrevious(&self, sender: Option<&AnyObject>)
unsafe fn useSelectionForFind(&self, sender: Option<&AnyObject>)
Source§unsafe fn updateTextAttributesWithConversionHandler(
&self,
conversion_handler: UITextAttributesConversionHandler,
)
unsafe fn updateTextAttributesWithConversionHandler( &self, conversion_handler: UITextAttributesConversionHandler, )
block2 only.unsafe fn print(&self, sender: Option<&AnyObject>)
unsafe fn rename(&self, sender: Option<&AnyObject>)
unsafe fn duplicate(&self, sender: Option<&AnyObject>)
unsafe fn move(&self, sender: Option<&AnyObject>)
unsafe fn export(&self, sender: Option<&AnyObject>)
unsafe fn showWritingTools(&self, sender: &AnyObject)
Source§impl UISpringLoadedInteractionSupporting for UITableView
Available on crate feature UISpringLoadedInteractionSupporting only.
impl UISpringLoadedInteractionSupporting for UITableView
UISpringLoadedInteractionSupporting only.unsafe fn isSpringLoaded(&self) -> bool
Source§unsafe fn setSpringLoaded(&self, spring_loaded: bool)
unsafe fn setSpringLoaded(&self, spring_loaded: bool)
isSpringLoaded.Source§impl UITraitEnvironment for UITableView
Available on crate feature UITraitCollection only.
impl UITraitEnvironment for UITableView
UITraitCollection only.fn traitCollection(&self) -> Retained<UITraitCollection>
Source§unsafe fn traitCollectionDidChange(
&self,
previous_trait_collection: Option<&UITraitCollection>,
)
unsafe fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
impl DowncastTarget for UITableView
impl Eq for UITableView
impl UIAppearanceContainer for UITableView
UIAppearance only.Auto Trait Implementations§
impl !Freeze for UITableView
impl !RefUnwindSafe for UITableView
impl !Send for UITableView
impl !Sync for UITableView
impl !Unpin for UITableView
impl !UnwindSafe for UITableView
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