NSMutableAttributedString.LowLevelSetAttributes(IntPtr, NSRange) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
適用于高輸送量屬性設定的 SetAttributes 低階版本。
[Foundation.Export("setAttributes:range:")]
public virtual void LowLevelSetAttributes (IntPtr dictionaryAttrsHandle, Foundation.NSRange range);
abstract member LowLevelSetAttributes : nativeint * Foundation.NSRange -> unit
override this.LowLevelSetAttributes : nativeint * Foundation.NSRange -> unit
參數
- dictionaryAttrsHandle
-
IntPtr
nativeint
具有要設定之屬性的 NSDictionary 控制碼。
- range
- NSRange
要套用屬性的範圍。
- 屬性
備註
一般而言,您應該使用 LowLevelGetAttributes(nint, NSRange) 方法,這會傳回高階 NSDictionary。
這是 NSMutableAttributedString 的低階介面,通常只有在您必須子類別並覆寫行為時才使用。 您預期會取用代表 NSDictionary 控制碼的提供的 IntPtr。 此 API 會保留為低階 API,因為 NSTextStorage 會取用此 API,每個字元插入可能會呼叫此方法數千次,因此請務必儘快保留。