Share via


UITableViewDataSource_Extensions.SectionFor Method

Definition

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

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static IntPtr SectionFor(this UIKit.IUITableViewDataSource This, UIKit.UITableView tableView, string title, IntPtr atIndex);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member SectionFor : UIKit.IUITableViewDataSource * UIKit.UITableView * string * nativeint -> nativeint

Parameters

tableView
UITableView

Table view containing the section.

title
String

The title that's displayed in the table view's index.

atIndex
IntPtr

nativeint

The index of the title in the array returned from the SectionIndexTitles(UITableView).

Returns

IntPtr

nativeint

The index of the section in the table view.

Attributes

Remarks

This method is only required for table views that have an index: they must have the Plain style and implement the SectionIndexTitles(UITableView) property.

The index for a table view may contain fewer items than the number of actual sections in the table. This method is passed the text and index of an item in the index, and should return the position of the corresponding section.

Applies to