Modifier

Partager via


UITableViewSource Class

Definition

Joint UITableViewDataSource and UITableViewDelegate base class. Preferred way to provide data and handle lifecycle events for UITableViews.

[Foundation.Register("UITableViewSource", false)]
public abstract class UITableViewSource : UIKit.UIScrollViewDelegate
type UITableViewSource = class
    inherit UIScrollViewDelegate
Inheritance
Derived
Attributes

Remarks

UITableViewSource merges both the UITableViewDataSource and the UITableViewDelegate into a single class. It is more cohesive than subclassing those independently, but there is no technical barrier to application developers working with those types directly.

Application developers must subtype this class, override the methods as necessary, and assign an instance of this object to the Source property.

The methods merged from UITableViewDataSource provide the table view with all the information it requires to display its data - such as informing it of the number of sections and rows, and what cell view to use for each row. The methods merged from UITableViewDelegate provide the table view with the ability to manage selection, configure section headers and footers, delete and reorder cells and control the editing menu.

Constructors

UITableViewSource()

Default constructor that initializes a new instance of this class with no parameters.

UITableViewSource(IntPtr)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

UITableViewSource(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

Properties

Class (Inherited from NSObject)
ClassHandle

The handle for this class.

(Inherited from NSObject)
DebugDescription

A developer-meaningful description of this object.

(Inherited from NSObject)
Description

Description of the object, the Objective-C version of ToString.

(Inherited from NSObject)
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
IsDirectBinding (Inherited from NSObject)
IsProxy (Inherited from NSObject)
RetainCount

Returns the current Objective-C retain count for the object.

(Inherited from NSObject)
Self (Inherited from NSObject)
Superclass (Inherited from NSObject)
SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
Zone (Inherited from NSObject)

Methods

AccessoryButtonTapped(UITableView, NSIndexPath)

Called when the user taps the DetailDisclosureButton accessory on the row located at indexPath.

AccessoryForRow(UITableView, NSIndexPath)

Developers should not use this deprecated method.

AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using NSString keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using string keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AwakeFromNib()

Called after the object has been loaded from the nib file. Overriders must call base.AwakeFromNib().

(Inherited from NSObject)
BeginInvokeOnMainThread(Action) (Inherited from NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
Bind(NSString, NSObject, String, NSDictionary) (Inherited from NSObject)
Bind(String, NSObject, String, NSDictionary)
Obsolete.
(Inherited from NSObject)
BindingInfo(String)
Obsolete.
(Inherited from NSObject)
BindingOptionDescriptions(String)
Obsolete.
(Inherited from NSObject)
BindingValueClass(String)
Obsolete.
(Inherited from NSObject)
CanEditRow(UITableView, NSIndexPath)

Whether the row located at indexPath should be editable.

CanFocusRow(UITableView, NSIndexPath)

Whether the row at the specified indexPath may receive focus.

CanMoveRow(UITableView, NSIndexPath)

Whether the row located at indexPath can be moved to another location in the table view.

CanPerformAction(UITableView, Selector, NSIndexPath, NSObject)

Whether the editing menu should omit the Copy or Paste command for the specified row.

CellDisplayingEnded(UITableView, UITableViewCell, NSIndexPath)

Indicates that the cell at the specified indexPath has finished displaying.

CommitEditing() (Inherited from NSObject)
CommitEditing(NSObject, Selector, IntPtr) (Inherited from NSObject)
CommitEditingStyle(UITableView, UITableViewCellEditingStyle, NSIndexPath)

Commits the insertion or deletion of the specified row.

ConformsToProtocol(IntPtr)

Invoked to determine if this object implements the specified protocol.

(Inherited from NSObject)
Copy()

Performs a copy of the underlying Objective-C object.

(Inherited from NSObject)
CustomizeMoveTarget(UITableView, NSIndexPath, NSIndexPath)

Return a new index path to change the final location of a row being moved by the user.

DangerousAutorelease() (Inherited from NSObject)
DangerousRelease() (Inherited from NSObject)
DangerousRetain() (Inherited from NSObject)
DecelerationEnded(UIScrollView)

Called when deceleration has ended (at the end of a scrolling movement).

(Inherited from UIScrollViewDelegate)
DecelerationStarted(UIScrollView)

Called when deceleration has started (at the end of a scrolling movement).

(Inherited from UIScrollViewDelegate)
DidChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates a change occurred to the indexes for a to-many relationship.

(Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
DidChangeAdjustedContentInset(UIScrollView)

Method that is called when the inset values change.

(Inherited from UIScrollViewDelegate)
DidChangeValue(String)

Indicates that a change occurred on the specified key.

(Inherited from NSObject)
DidEndEditing(UITableView, NSIndexPath)

Called when the table view has left editing mode for the row specified by indexPath.

DidUpdateFocus(UITableView, UITableViewFocusUpdateContext, UIFocusAnimationCoordinator)

Indicates that the focus changed as detailed in the context.

DidZoom(UIScrollView)

Called when the scroll view's zoom factor has changed.

(Inherited from UIScrollViewDelegate)
Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean)

Releases the resources used by the NSObject object.

(Inherited from NSObject)
DoesNotRecognizeSelector(Selector)

Indicates that this object does not recognize the specified selector.

(Inherited from NSObject)
DraggingEnded(UIScrollView, Boolean)

Called when dragging has ended.

(Inherited from UIScrollViewDelegate)
DraggingStarted(UIScrollView)

Called when dragging is about to begin.

(Inherited from UIScrollViewDelegate)
EditActionsForRow(UITableView, NSIndexPath)

Returns an array of row actions to display after the user swipes the row in the tableView table view that is identified by indexPath.

EditingStyleForRow(UITableView, NSIndexPath)

Called for each row being displayed by the table view, to determine what editing style to use for that row.

Equals(NSObject) (Inherited from NSObject)
Equals(Object) (Inherited from NSObject)
EstimatedHeight(UITableView, NSIndexPath)

The estimated height of the table cell at the specified indexPath.

EstimatedHeightForFooter(UITableView, nint)

The estimated height of the footer for the specified section.

EstimatedHeightForHeader(UITableView, nint)

The estimated height of the header for the specified section.

ExposedBindings() (Inherited from NSObject)
FooterViewDisplayingEnded(UITableView, UIView, nint)

Indicates that the footerView for the specified section is about to be removed.

GetBindingInfo(NSString) (Inherited from NSObject)
GetBindingOptionDescriptions(NSString) (Inherited from NSObject)
GetBindingValueClass(NSString) (Inherited from NSObject)
GetCell(UITableView, NSIndexPath)

Called by the table view to get populate the row at indexPath with a cell view.

GetDictionaryOfValuesFromKeys(NSString[])

Retrieves the values of the specified keys.

(Inherited from NSObject)
GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetHeightForFooter(UITableView, nint)

Called to determine the height of the footer for the section specified by section.

GetHeightForHeader(UITableView, nint)

Called to determine the height of the header for the section specified by section.

GetHeightForRow(UITableView, NSIndexPath)

Called to determine the height of the row at indexPath.

GetIndexPathForPreferredFocusedView(UITableView)

The index path of the table's preferred focus view.

GetLeadingSwipeActionsConfiguration(UITableView, NSIndexPath)

Gets the UISwipeActionsConfiguration describing swipe actions to display at the beginning of the row at .

GetMethodForSelector(Selector) (Inherited from NSObject)
GetNativeField(String)
Obsolete.
(Inherited from NSObject)
GetNativeHash() (Inherited from NSObject)
GetTrailingSwipeActionsConfiguration(UITableView, NSIndexPath)

Gets the UISwipeActionsConfiguration describing swipe actions to display at the end of the row at .

GetViewForFooter(UITableView, nint)

Returns a view object to display at the end of the given section.

GetViewForHeader(UITableView, nint)

Returns a view object to display at the start of the given section.

HeaderViewDisplayingEnded(UITableView, UIView, nint)

Called when a section header is removed from a table (for instance, due to scrolling).

IndentationLevel(UITableView, NSIndexPath)

Get the indentation level for the row specified by indexPath.

Init() (Inherited from NSObject)
InitializeHandle(IntPtr, String) (Inherited from NSObject)
InitializeHandle(IntPtr) (Inherited from NSObject)
Invoke(Action, Double) (Inherited from NSObject)
Invoke(Action, TimeSpan) (Inherited from NSObject)
InvokeOnMainThread(Action) (Inherited from NSObject)
InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) (Inherited from NSObject)
IsKindOfClass(Class) (Inherited from NSObject)
IsMemberOfClass(Class) (Inherited from NSObject)
MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MoveRow(UITableView, NSIndexPath, NSIndexPath)

Called when a row has been moved so that the data source can 'implement' the changed row position that has been performed in the user interface. This ensures the data is kept in-sync with what is being displayed.

MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
NumberOfSections(UITableView)

Returns the number of sections that are required to display the data.

ObjectDidEndEditing(NSObject) (Inherited from NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr)

Indicates that the value at the specified keyPath relative to this object has changed.

(Inherited from NSObject)
PerformAction(UITableView, Selector, NSIndexPath, NSObject)

Called to perform a copy or paste operation on the row specified by indexPath.

PerformSelector(Selector, NSObject, Double, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSObject, Double)

Invokes the selector on the current instance and if the obj is not null, it passes this as its single parameter.

(Inherited from NSObject)
PerformSelector(Selector, NSObject, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (Inherited from NSObject)
PerformSelector(Selector) (Inherited from NSObject)
PrepareForInterfaceBuilder() (Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, NSString)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, String)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RespondsToSelector(Selector)

Whether this object recognizes the specified selector.

(Inherited from NSObject)
RowDeselected(UITableView, NSIndexPath)

Called when the row specified by indexPath is de-selected.

RowHighlighted(UITableView, NSIndexPath)

Called when a row is highlighted.

RowSelected(UITableView, NSIndexPath)

Called when the row specified by indexPath is selected.

RowsInSection(UITableView, nint)

Called by the table view to find out how many rows are to be rendered in the section specified by section.

RowUnhighlighted(UITableView, NSIndexPath)

Called when a row is unhighlighted.

ScrollAnimationEnded(UIScrollView)

Called when a scrolling animation in the scroll view is finished.

(Inherited from UIScrollViewDelegate)
Scrolled(UIScrollView)

Called when the user scrolls the content.

(Inherited from UIScrollViewDelegate)
ScrolledToTop(UIScrollView)

Called when the scroll view is scrolled to the top of the content.

(Inherited from UIScrollViewDelegate)
SectionFor(UITableView, String, nint)

Returns the index of the section with the given tableView and atIndex.

SectionIndexTitles(UITableView)

Returns an array of titles to be displayed as an index on the table view.

SetNativeField(String, NSObject)
Obsolete.
(Inherited from NSObject)
SetNilValueForKey(NSString)

Sets the value of the specified key to null.

(Inherited from NSObject)
SetValueForKey(NSObject, NSString)

Sets the value of the property specified by the key to the specified value.

(Inherited from NSObject)
SetValueForKeyPath(IntPtr, NSString)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

(Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString)

Sets the value of a property that can be reached using a keypath.

(Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString)

Indicates an attempt to write a value to an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary)

Sets the values of this NSObject to those in the specified dictionary.

(Inherited from NSObject)
ShouldHighlightRow(UITableView, NSIndexPath)

Called prior to highlighting. If this method returns false, the row will not be highlighted.

ShouldIndentWhileEditing(UITableView, NSIndexPath)

Whether the row specified by indexPath should be indented while the table is in edit mode.

ShouldScrollToTop(UIScrollView)

Called by the scroll view to determine whether it should scroll to the top of the content.

(Inherited from UIScrollViewDelegate)
ShouldShowMenu(UITableView, NSIndexPath)

Whether the editing menu should be displayed for the row specified by indexPath.

ShouldSpringLoadRow(UITableView, NSIndexPath, IUISpringLoadedInteractionContext)

Whether the system should display the row at using the spring-loaded effect.

ShouldUpdateFocus(UITableView, UITableViewFocusUpdateContext)

Called prior to the this either losing or receiving focus. If either focus environment returns false, the focus update is canceled.

TitleForDeleteConfirmation(UITableView, NSIndexPath)

Sets the text of the Delete button for the specified row.

TitleForFooter(UITableView, nint)

Called to populate the footer for the specified section.

TitleForHeader(UITableView, nint)

Called to populate the header for the specified section.

ToString()

Returns a string representation of the value of the current instance.

(Inherited from NSObject)
Unbind(NSString) (Inherited from NSObject)
Unbind(String)
Obsolete.
(Inherited from NSObject)
ValueForKey(NSString)

Returns the value of the property associated with the specified key.

(Inherited from NSObject)
ValueForKeyPath(NSString)

Returns the value of a property that can be reached using a keypath.

(Inherited from NSObject)
ValueForUndefinedKey(NSString)

Indicates an attempt to read a value of an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
ViewForZoomingInScrollView(UIScrollView)

Returns the view to scale when zooming is about to occur in the scroll view.

(Inherited from UIScrollViewDelegate)
WillBeginEditing(UITableView, NSIndexPath)

Called when the table view is about to enter swipe-to-delete editing mode.

WillChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates that the values of the specified indices in the specified key are about to change.

(Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
WillChangeValue(String)

Indicates that the value of the specified key is about to change.

(Inherited from NSObject)
WillDeselectRow(UITableView, NSIndexPath)

Called prior to the de-selection of a row.

WillDisplay(UITableView, UITableViewCell, NSIndexPath)

Called just before a cell is rendered for the row specified by indexPath.

WillDisplayFooterView(UITableView, UIView, nint)

Called prior to the display of a footer view for a section.

WillDisplayHeaderView(UITableView, UIView, nint)

Called prior to the display of a header view for a section.

WillEndDragging(UIScrollView, CGPoint, CGPoint)

Called when the user finishes scrolling the content.

(Inherited from UIScrollViewDelegate)
WillSelectRow(UITableView, NSIndexPath)

Called when a row is about to be selected.

ZoomingEnded(UIScrollView, UIView, nfloat)

Called when content zooming is complete.

(Inherited from UIScrollViewDelegate)
ZoomingStarted(UIScrollView, UIView)

Called when a zooming operation is about to start.

(Inherited from UIScrollViewDelegate)

Extension Methods

GetDebugDescription(INSObjectProtocol)
GetAccessibilityCustomRotors(NSObject)

Gets the array of UIAccessibilityCustomRotor objects appropriate for this object.

SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

Sets the array of UIAccessibilityCustomRotor objects appropriate for this object.

DecelerationEnded(IUIScrollViewDelegate, UIScrollView)

Indicates that deceleration relating to a scroll event has ended.

DecelerationStarted(IUIScrollViewDelegate, UIScrollView)

Indicates that deceleration of a scrolling event has begun.

DidChangeAdjustedContentInset(IUIScrollViewDelegate, UIScrollView)

Method that is called when the inset values change.

DidZoom(IUIScrollViewDelegate, UIScrollView)

Indicates that the specified scrollView has zoomed.

DraggingEnded(IUIScrollViewDelegate, UIScrollView, Boolean)

Indicates that dragging has completed.

DraggingStarted(IUIScrollViewDelegate, UIScrollView)

Indicates that dragging has begun.

ScrollAnimationEnded(IUIScrollViewDelegate, UIScrollView)

Indicates that all animations relating to scrolling have completed.

Scrolled(IUIScrollViewDelegate, UIScrollView)

Indicates that the specified scrollView has scrolled.

ScrolledToTop(IUIScrollViewDelegate, UIScrollView)

Indicates that the specified scrollView's scrolling has ended at the top.

ShouldScrollToTop(IUIScrollViewDelegate, UIScrollView)

Whether a scroll to the beginning of the scrollView should be permitted.

ViewForZoomingInScrollView(IUIScrollViewDelegate, UIScrollView)

The UIView to scale when zooming is requested.

WillEndDragging(IUIScrollViewDelegate, UIScrollView, CGPoint, CGPoint)

Indicates that dragging is about to end.

ZoomingEnded(IUIScrollViewDelegate, UIScrollView, UIView, nfloat)

Indicates that zooming has completed.

ZoomingStarted(IUIScrollViewDelegate, UIScrollView, UIView)

Indicates that zooming has begun.

Applies to

See also