Editar

Compartir a través de


UITableViewDelegate Class

Definition

A class that receives notifications from a UITableView. MonoTouch developers should generally use UITableViewSource instead of this class.

[Foundation.Protocol]
[Foundation.Register("UITableViewDelegate", false)]
public class UITableViewDelegate : UIKit.UIScrollViewDelegate, IDisposable, UIKit.IUITableViewDelegate
type UITableViewDelegate = class
    inherit UIScrollViewDelegate
    interface IUITableViewDelegate
    interface INativeObject
    interface IDisposable
    interface IUIScrollViewDelegate
Inheritance
UITableViewDelegate
Attributes
Implements

Remarks

Implementing UITableView often requires subclasses of both UITableViewDataSource and UITableViewDelegate to provide data and behavior for the table view. MonoTouch provides a single class - UITableViewSource - so that only one class needs to be implemented.

The UITableViewDelegate class methods provide a table view with the ability to manage selection, configure section headers and footers, delete and reorder cells and control the editing menu.

Constructors

UITableViewDelegate()

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

UITableViewDelegate(IntPtr)

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

UITableViewDelegate(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)
CanFocusRow(UITableView, NSIndexPath)

Whether the row at the specified indexPath may receive focus.

CanPerformAction(UITableView, Selector, NSIndexPath, NSObject)

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

CellDisplayingEnded(UITableView, UITableViewCell, NSIndexPath)

Called when a table row is removed from a UITableView (for example, due to scrolling).

CommitEditing() (Inherited from NSObject)
CommitEditing(NSObject, Selector, IntPtr) (Inherited from NSObject)
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 cell at the 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)

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

GetBindingInfo(NSString) (Inherited from NSObject)
GetBindingOptionDescriptions(NSString) (Inherited from NSObject)
GetBindingValueClass(NSString) (Inherited from NSObject)
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)

Returns the swipe action configuration for swipes that begin from the leading edge.

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

Returns the swipe action configuration for swipes that begin from the trailing edge.

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) (Inherited from NSObject)
InitializeHandle(IntPtr, String) (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)
MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
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) (Inherited from NSObject)
PerformSelector(Selector, NSObject) (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, Double, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSObject, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (Inherited from NSObject)
PrepareForInterfaceBuilder() (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, NSString, 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)
RemoveObserver(NSObject, String, IntPtr)

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

(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.

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)
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)

Method that is called to indicate whether the identified row should springload in the specified context.

ShouldUpdateFocus(UITableView, UITableViewFocusUpdateContext)

Called prior to the tableView 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.

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.

AccessoryButtonTapped(IUITableViewDelegate, UITableView, NSIndexPath)

Indictes that the user has tapped the accessory / disclosure buttom at the specified indexPath.

AccessoryForRow(IUITableViewDelegate, UITableView, NSIndexPath)

Developers should not use this deprecated method.

CanFocusRow(IUITableViewDelegate, UITableView, NSIndexPath)

Whether the row at the specified indexPath may receive focus.

CanPerformAction(IUITableViewDelegate, UITableView, Selector, NSIndexPath, NSObject)

Whether the cell at the specified indexPath can perform the specified Copy or Paste operation.

CellDisplayingEnded(IUITableViewDelegate, UITableView, UITableViewCell, NSIndexPath)

Indicates that the cell has just been removed.

CustomizeMoveTarget(IUITableViewDelegate, UITableView, NSIndexPath, NSIndexPath)

Used to change a cell move destination, for example, to prevent dropping a cell in a certain position.

DidEndEditing(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that editing of the cell at the specified indexPath has finished.

DidUpdateFocus(IUITableViewDelegate, UITableView, UITableViewFocusUpdateContext, UIFocusAnimationCoordinator)

Indicates that the focus changed as detailed in the context.

EditActionsForRow(IUITableViewDelegate, 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(IUITableViewDelegate, UITableView, NSIndexPath)

The UITableViewCellEditingStyle for the specified indexPath.

EstimatedHeight(IUITableViewDelegate, UITableView, NSIndexPath)

An estimate of the height for the specified indexPath. Implementations should perform minimal calculation, as it is called repeatedly.

EstimatedHeightForFooter(IUITableViewDelegate, UITableView, nint)

The estimated height of the footer of the specified section.

EstimatedHeightForHeader(IUITableViewDelegate, UITableView, nint)

The estimated height of the header of the specified section.

FooterViewDisplayingEnded(IUITableViewDelegate, UITableView, UIView, nint)

Indicates that the footerView of the specified section has been removed.

GetHeightForFooter(IUITableViewDelegate, UITableView, nint)

The height of the footer for the specified section.

GetHeightForHeader(IUITableViewDelegate, UITableView, nint)

The height of the header for the specified section.

GetHeightForRow(IUITableViewDelegate, UITableView, NSIndexPath)

The height of the cell at the specified indexPath.

GetIndexPathForPreferredFocusedView(IUITableViewDelegate, UITableView)

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

GetLeadingSwipeActionsConfiguration(IUITableViewDelegate, UITableView, NSIndexPath)

Returns the swipe action configuration for swipes that begin from the leading edge.

GetTrailingSwipeActionsConfiguration(IUITableViewDelegate, UITableView, NSIndexPath)

Returns the swipe action configuration for swipes that begin from the trailing edge.

GetViewForFooter(IUITableViewDelegate, UITableView, nint)

The view used for the footer of the specified section.

GetViewForHeader(IUITableViewDelegate, UITableView, nint)

The view used for the header of the specified section.

HeaderViewDisplayingEnded(IUITableViewDelegate, UITableView, UIView, nint)

Indicates that the header of the specified section has been removed.

IndentationLevel(IUITableViewDelegate, UITableView, NSIndexPath)

The indentation level for the cell at the specified indexPath.

PerformAction(IUITableViewDelegate, UITableView, Selector, NSIndexPath, NSObject)

Performs the specified Copy or Paste action.

RowDeselected(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the cell at the specified indexPath has been deselected.

RowHighlighted(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the cell at the specified indexPath has been highlighted.

RowSelected(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the call at the specified indexPath has been selected.

RowUnhighlighted(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the cell at the specified indexPath has been unhighlighted.

ShouldHighlightRow(IUITableViewDelegate, UITableView, NSIndexPath)

Whether the cell at the specified indexPath should be highlighted.

ShouldIndentWhileEditing(IUITableViewDelegate, UITableView, NSIndexPath)

Whether the cell at the specified indexPath should be indented while it is being edited.

ShouldShowMenu(IUITableViewDelegate, UITableView, NSIndexPath)

Whether the cell at the specified rowAtIndexPath should show an action menu.

ShouldSpringLoadRow(IUITableViewDelegate, UITableView, NSIndexPath, IUISpringLoadedInteractionContext)

Method that is called to indicate whether the identified row should springload in the specified context.

ShouldUpdateFocus(IUITableViewDelegate, UITableView, UITableViewFocusUpdateContext)

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

TitleForDeleteConfirmation(IUITableViewDelegate, UITableView, NSIndexPath)

When overridden, changes the default title of the delete confirmation button.

WillBeginEditing(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the cell at the specified indexPath is about to be edited.

WillDeselectRow(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates that the cell at the specified indexPath is about to be deselected.

WillDisplay(IUITableViewDelegate, UITableView, UITableViewCell, NSIndexPath)

Indicates that the cell at the specified indexPath is about to be shown.

WillDisplayFooterView(IUITableViewDelegate, UITableView, UIView, nint)

Indicates that the footer view for the specified section is about to be shown.

WillDisplayHeaderView(IUITableViewDelegate, UITableView, UIView, nint)

Indicates that the header view of the specified section is about to be shown.

WillSelectRow(IUITableViewDelegate, UITableView, NSIndexPath)

Indicates the the cell at the specified indexPath is about to be selected.

Applies to

See also