IUITableViewDataSource Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This interface represents the Objective-C protocol UITableViewDataSource.
[Foundation.Protocol(Name="UITableViewDataSource", WrapperType=typeof(UIKit.UITableViewDataSourceWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="RowsInSection", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.IntPtr), Selector="tableView:numberOfRowsInSection:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetCell", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(UIKit.UITableViewCell), Selector="tableView:cellForRowAtIndexPath:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="NumberOfSections", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView) }, ReturnType=typeof(System.IntPtr), Selector="numberOfSectionsInTableView:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="TitleForHeader", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.String), Selector="tableView:titleForHeaderInSection:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="TitleForFooter", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.String), Selector="tableView:titleForFooterInSection:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CanEditRow", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(System.Boolean), Selector="tableView:canEditRowAtIndexPath:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CanMoveRow", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(System.Boolean), Selector="tableView:canMoveRowAtIndexPath:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="SectionIndexTitles", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView) }, ReturnType=typeof(System.String[]), Selector="sectionIndexTitlesForTableView:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="SectionFor", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.String), typeof(System.IntPtr) }, ReturnType=typeof(System.IntPtr), Selector="tableView:sectionForSectionIndexTitle:atIndex:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CommitEditingStyle", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(UIKit.UITableViewCellEditingStyle), typeof(Foundation.NSIndexPath) }, Selector="tableView:commitEditingStyle:forRowAtIndexPath:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="MoveRow", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath), typeof(Foundation.NSIndexPath) }, Selector="tableView:moveRowAtIndexPath:toIndexPath:")]
public interface IUITableViewDataSource : IDisposable, ObjCRuntime.INativeObject
[<Foundation.Protocol(Name="UITableViewDataSource", WrapperType=typeof(UIKit.UITableViewDataSourceWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="RowsInSection", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.IntPtr), Selector="tableView:numberOfRowsInSection:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetCell", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(UIKit.UITableViewCell), Selector="tableView:cellForRowAtIndexPath:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="NumberOfSections", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView) }, ReturnType=typeof(System.IntPtr), Selector="numberOfSectionsInTableView:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="TitleForHeader", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.String), Selector="tableView:titleForHeaderInSection:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="TitleForFooter", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.IntPtr) }, ReturnType=typeof(System.String), Selector="tableView:titleForFooterInSection:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CanEditRow", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(System.Boolean), Selector="tableView:canEditRowAtIndexPath:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CanMoveRow", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath) }, ReturnType=typeof(System.Boolean), Selector="tableView:canMoveRowAtIndexPath:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="SectionIndexTitles", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView) }, ReturnType=typeof(System.String[]), Selector="sectionIndexTitlesForTableView:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="SectionFor", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(System.String), typeof(System.IntPtr) }, ReturnType=typeof(System.IntPtr), Selector="tableView:sectionForSectionIndexTitle:atIndex:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="CommitEditingStyle", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(UIKit.UITableViewCellEditingStyle), typeof(Foundation.NSIndexPath) }, Selector="tableView:commitEditingStyle:forRowAtIndexPath:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="MoveRow", ParameterByRef=new System.Boolean[] { false, false, false }, ParameterType=new System.Type[] { typeof(UIKit.UITableView), typeof(Foundation.NSIndexPath), typeof(Foundation.NSIndexPath) }, Selector="tableView:moveRowAtIndexPath:toIndexPath:")>]
type IUITableViewDataSource = interface
interface INativeObject
interface IDisposable
- Derived
- Attributes
- Implements
Remarks
A class that implements this interface (and subclasses NSObject) will be exported to Objective-C as implementing the Objective-C protocol this interface represents.
A class may also implement members from this interface to implement members from the protocol.
Properties
| Name | Description |
|---|---|
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from INativeObject) |
Methods
| Name | Description |
|---|---|
| CanEditRow(UITableView, NSIndexPath) |
Whether the row located at should be editable. |
| CanMoveRow(UITableView, NSIndexPath) |
Whether the row located at can be moved to another ___location in the table view. |
| CommitEditingStyle(UITableView, UITableViewCellEditingStyle, NSIndexPath) |
Commits the insertion or deletion of the specified row. |
| GetCell(UITableView, NSIndexPath) |
Returns a cell that can be inserted at |
| 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. |
| NumberOfSections(UITableView) |
Returns the number of sections that are required to display the data. |
| RowsInSection(UITableView, IntPtr) |
The number of rows in the specified section. |
| SectionFor(UITableView, String, IntPtr) |
Returns the index of the section with the given |
| SectionIndexTitles(UITableView) |
Returns an array of titles to be displayed as an index on the table view. |
| TitleForFooter(UITableView, IntPtr) |
Called to populate the footer for the specified section. |
| TitleForHeader(UITableView, IntPtr) |
Called to populate the header for the specified section. |
Extension Methods
| Name | Description |
|---|---|
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |
| CanEditRow(IUITableViewDataSource, UITableView, NSIndexPath) |
Whether the row located at should be editable. |
| CanMoveRow(IUITableViewDataSource, UITableView, NSIndexPath) |
Whether the row located at can be moved to another ___location in the table view. |
| CommitEditingStyle(IUITableViewDataSource, UITableView, UITableViewCellEditingStyle, NSIndexPath) |
Commits the insertion or deletion of the specified row. |
| MoveRow(IUITableViewDataSource, 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. |
| NumberOfSections(IUITableViewDataSource, UITableView) |
Returns the number of sections that are required to display the data. |
| SectionFor(IUITableViewDataSource, UITableView, String, IntPtr) |
Returns the index of the section with the given |
| SectionIndexTitles(IUITableViewDataSource, UITableView) |
Returns an array of titles to be displayed as an index on the table view. |
| TitleForFooter(IUITableViewDataSource, UITableView, IntPtr) |
Called to populate the footer for the specified section. |
| TitleForHeader(IUITableViewDataSource, UITableView, IntPtr) |
Called to populate the header for the specified section. |