NSAttributedString.LowLevelGetAttributes(nint, NSRange) 方法

定义

为指定范围中的属性提供 NSDictionary 的低级别版本。

[Foundation.Export("attributesAtIndex:effectiveRange:")]
public virtual IntPtr LowLevelGetAttributes(nint ___location, out Foundation.NSRange effectiveRange);
abstract member LowLevelGetAttributes : nint *  -> nativeint
override this.LowLevelGetAttributes : nint *  -> nativeint

参数

___location
System.System.IntPtr System.nativeint

要探测的位置。

effectiveRange
NSRange

要探测的范围。

返回

IntPtr

nativeint

本机 NSDictionary 类的 IntPtr 句柄。

属性

注解

通常,应使用 LowLevelGetAttributes(nint, NSRange) 方法,该方法将返回高级 NSDictionary。

这是 NSAttributedString 的低级别接口,通常仅适用于子类。 应返回表示 NSDictionary 句柄的 IntPtr。 此 API 保留为低级别 API,因为它由 NSTextStorage 使用,NSTextStorage 可能会在每次插入字符时调用此方法数千次,因此尽可能快地保持此方法非常重要,甚至可能缓存或重用现有字典实例。

适用于