共用方式為


WKInterfaceTable.SetNumberOfRows(nint, String) 方法

定義

設定資料表中的資料列總數,這些資料列全都與具有指定 rowType 之 的資料列控制器相關聯。

[Foundation.Export("setNumberOfRows:withRowType:")]
public virtual void SetNumberOfRows (nint numberOfRows, string rowType);
abstract member SetNumberOfRows : nint * string -> unit
override this.SetNumberOfRows : nint * string -> unit

參數

numberOfRows
System.System.IntPtr System.nativeint

資料表中所需的資料列數目。

rowType
String

與資料列控制器類型相關聯的分鏡腳本識別碼。

屬性

備註

rowType必須符合 Identifier 與分鏡腳本中資料列控制器相關聯的值。

不同于 iOS,資料列不會虛擬化。 Apple 建議 Watch 應用程式使用少於 20 個數據列。

適用於