共用方式為


UITableViewSource.SectionIndexTitles(UITableView) 方法

定義

傳回要顯示為數據表檢視上索引之標題的陣列。

[Foundation.Export("sectionIndexTitlesForTableView:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 2, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual string[] SectionIndexTitles (UIKit.UITableView tableView);
abstract member SectionIndexTitles : UIKit.UITableView -> string[]
override this.SectionIndexTitles : UIKit.UITableView -> string[]

參數

tableView
UITableView

顯示索引的資料表檢視。

傳回

String[]

標題的陣列,例如顯示依字母順序排列的清單,會傳回字串陣列,從 「A」 傳回至 「Z」。

屬性

備註

索引清單會顯示在資料表檢視的右邊緣。

只有具有樣式的資料表應該實作 Plain 這個屬性。

在 [UITableViewDataSource] 中宣告

如果傳回的陣列包含 IndexSearch ,對應的區段索引會顯示放大鏡圖示。 如果應用程式開發人員想要此行為, IndexSearch 通常應該是陣列中的第一個值。

適用於