語言

NSMutableAttributedString 類別

定義

[Foundation.Register("NSMutableAttributedString", true)]
public class NSMutableAttributedString : Foundation.NSAttributedString
[<Foundation.Register("NSMutableAttributedString", true)>]
type NSMutableAttributedString = class
    inherit NSAttributedString
繼承
NSMutableAttributedString
衍生
屬性

建構函式

名稱 Description
NSMutableAttributedString()

建立一個預設值的新版本 NSMutableAttributedString 。

NSMutableAttributedString(NativeHandle)

一種用於建立未受管理物件的受管理表示的建構器。 由執行時呼叫。

NSMutableAttributedString(NSAttributedString)
NSMutableAttributedString(NSCoder)

一個建構器,能從未封存物件中儲存的資料初始化物件。

NSMutableAttributedString(NSObjectFlag)

用來呼叫衍生類別跳過初始化,僅僅配置物件。

NSMutableAttributedString(String, CTStringAttributes)

從 C# 字串建立 NSMutableAttributedString,並將指定的 CoreText 屬性套用到整個字串。

NSMutableAttributedString(String, NSDictionary)
NSMutableAttributedString(String, UIFont, UIColor, UIColor, UIColor, NSParagraphStyle, NSLigatureType, Single, NSUnderlineStyle, NSShadow, Single, NSUnderlineStyle)

從帶有獨立 UIKit 樣式屬性的字串建立 NSMutableAttributedString。

NSMutableAttributedString(String, UIStringAttributes)

從帶有 UIKit 屬性的字串建立 NSMutableAttributedString。

NSMutableAttributedString(String)

屬性

名稱 Description
AccessibilityAttributedUserInputLabels (繼承來源 NSObject)
AccessibilityRespondsToUserInteraction (繼承來源 NSObject)
AccessibilityTextualContext (繼承來源 NSObject)
AccessibilityUserInputLabels (繼承來源 NSObject)
AttributedStringByInflectingString (繼承來源 NSAttributedString)
Class (繼承來源 NSObject)
ClassHandle

Objective-C 類別是這個類別的處理方式。

ContainsAttachments (繼承來源 NSAttributedString)
DebugDescription (繼承來源 NSObject)
Description (繼承來源 NSObject)
ExposedBindings (繼承來源 NSObject)
Handle

Handle(指標)指向未管理物件表示。

(繼承來源 NSObject)
IsDirectBinding

取得或設定一個值,指示此實例是否使用直接 Objective-C 綁定。

(繼承來源 NSObject)
IsProxy (繼承來源 NSObject)
Length (繼承來源 NSAttributedString)
LowLevelValue (繼承來源 NSAttributedString)
MutableString
RetainCount (繼承來源 NSObject)
Self (繼承來源 NSObject)
Size (繼承來源 NSAttributedString)
Superclass (繼承來源 NSObject)
SuperHandle

用 handle 表示此 NSObject基底類別中的方法。

(繼承來源 NSObject)
Value

物件的內容會以字串形式呈現。

(繼承來源 NSAttributedString)
WritableTypeIdentifiersForItemProvider (繼承來源 NSAttributedString)
Zone (繼承來源 NSObject)

方法

名稱 Description
AddAttribute(NSString, NSObject, NSRange)
AddAttributes(CTStringAttributes, NSRange)

將屬性加入字串中指定的字元範圍。

AddAttributes(NSDictionary, NSRange)
AddAttributes(NSStringAttributes, NSRange)
AddAttributes(UIStringAttributes, NSRange)

將屬性加入字串中指定的字元範圍。

AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) (繼承來源 NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) (繼承來源 NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

以任意方法註冊物件以便外部觀察。

(繼承來源 NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

以任意方法註冊物件以便外部觀察。

(繼承來源 NSObject)
Append(NSAttributedString, Object[])

在接收端加上一個已歸屬的字串及額外物件。

Append(NSAttributedString)
AwakeFromNib() (繼承來源 NSObject)
BeginEditing()
BeginInvokeOnMainThread(Action)

在主介面執行緒上非同步呼叫指定的動作。

(繼承來源 NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

非同步地在主介面執行緒中呼叫指定的程式碼。

(繼承來源 NSObject)
Bind(NSString, NSObject, String, NSBindingOptions) (繼承來源 NSObject)
Bind(NSString, NSObject, String, NSDictionary) (繼承來源 NSObject)
BoundingRectWithSize(CGSize, NSStringDrawingOptions) (繼承來源 NSAttributedString)
CommitEditing() (繼承來源 NSObject)
CommitEditing(NSObject, Selector, IntPtr) (繼承來源 NSObject)
ConformsToProtocol(NativeHandle) (繼承來源 NSObject)
ContainsAttachmentsInRange(NSRange) (繼承來源 NSAttributedString)
Copy() (繼承來源 NSObject)
Copy(NSZone)

執行底層 Objective-C 物件的複製。

(繼承來源 NSAttributedString)
DangerousAutorelease()

呼叫此物件的「自動釋放」選擇器。

(繼承來源 NSObject)
DangerousRelease()

呼叫此物件的「釋放」選擇器。

(繼承來源 NSObject)
DangerousRetain()

呼叫此物件的「保留」選擇器。

(繼承來源 NSObject)
DeleteRange(NSRange)
DidChange(NSKeyValueChange, NSIndexSet, NSString) (繼承來源 NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (繼承來源 NSObject)
DidChangeValue(String) (繼承來源 NSObject)
Dispose()

釋放物件 NSObject 所使用的資源。

(繼承來源 NSObject)
Dispose(Boolean)

釋放此物件所使用的資源。

(繼承來源 NSObject)
DoesNotRecognizeSelector(Selector) (繼承來源 NSObject)
DoubleClick(UIntPtr) (繼承來源 NSAttributedString)
DrawString(CGPoint)

在指定點繪製字串。

(繼承來源 NSAttributedString)
DrawString(CGRect, NSStringDrawingOptions, NSStringDrawingContext) (繼承來源 NSAttributedString)
DrawString(CGRect, NSStringDrawingOptions) (繼承來源 NSAttributedString)
DrawString(CGRect) (繼承來源 NSAttributedString)
EncodeTo(NSCoder)

使用提供的編碼器編碼物件的狀態。

(繼承來源 NSAttributedString)
EndEditing()
EnumerateAttribute(NSString, NSRange, NSAttributedStringEnumeration, NSAttributedStringCallback) (繼承來源 NSAttributedString)
EnumerateAttributes(NSRange, NSAttributedStringEnumeration, NSAttributedRangeCallback) (繼承來源 NSAttributedString)
Equals(NSObject)

判斷指定的 NSObject 是否等於電流 NSObject。

(繼承來源 NSObject)
Equals(Object)

判斷指定的物件是否等於當前 NSObject的 。

(繼承來源 NSObject)
GetAppKitAttributes(IntPtr, NSRange, NSRange) (繼承來源 NSAttributedString)
GetAppKitAttributes(IntPtr, NSRange) (繼承來源 NSAttributedString)
GetAttribute(String, IntPtr, NSRange, NSRange) (繼承來源 NSAttributedString)
GetAttribute(String, IntPtr, NSRange) (繼承來源 NSAttributedString)
GetAttributes(IntPtr, NSRange, NSRange) (繼承來源 NSAttributedString)
GetAttributes(IntPtr, NSRange) (繼承來源 NSAttributedString)
GetBindingInfo(NSString) (繼承來源 NSObject)
GetBindingOptionDescriptions(NSString) (繼承來源 NSObject)
GetBindingValueClass(NSString) (繼承來源 NSObject)
GetBoundingRect(CGSize, NSStringDrawingOptions, NSStringDrawingContext) (繼承來源 NSAttributedString)
GetCoreTextAttributes(IntPtr, NSRange, NSRange) (繼承來源 NSAttributedString)
GetCoreTextAttributes(IntPtr, NSRange) (繼承來源 NSAttributedString)
GetData(NSRange, NSAttributedStringDocumentAttributes, NSError) (繼承來源 NSAttributedString)
GetData(NSRange, NSDictionary, NSError) (繼承來源 NSAttributedString)
GetDataFromRange(NSRange, NSAttributedStringDocumentAttributes, NSError)
已淘汰.
(繼承來源 NSAttributedString)
GetDataFromRange(NSRange, NSDictionary, NSError)
已淘汰.
(繼承來源 NSAttributedString)
GetDictionaryOfValuesFromKeys(NSString[]) (繼承來源 NSObject)
GetDocFormat(NSRange, NSAttributedStringDocumentAttributes) (繼承來源 NSAttributedString)
GetDocFormat(NSRange, NSDictionary) (繼承來源 NSAttributedString)
GetFileWrapper(NSRange, NSAttributedStringDocumentAttributes, NSError) (繼承來源 NSAttributedString)
GetFileWrapper(NSRange, NSDictionary, NSError) (繼承來源 NSAttributedString)
GetFileWrapperFromRange(NSRange, NSAttributedStringDocumentAttributes, NSError)
已淘汰.
(繼承來源 NSAttributedString)
GetFileWrapperFromRange(NSRange, NSDictionary, NSError)
已淘汰.
(繼承來源 NSAttributedString)
GetFontAttributes(NSRange) (繼承來源 NSAttributedString)
GetHashCode()

為目前實例產生雜湊碼。

(繼承來源 NSObject)
GetItemNumber(NSTextList, UIntPtr) (繼承來源 NSAttributedString)
GetItemProviderVisibilityForTypeIdentifier(String) (繼承來源 NSAttributedString)
GetLineBreak(UIntPtr, NSRange) (繼承來源 NSAttributedString)
GetLineBreakByHyphenating(UIntPtr, NSRange) (繼承來源 NSAttributedString)
GetMethodForSelector(Selector) (繼承來源 NSObject)
GetNativeHash() (繼承來源 NSObject)
GetNextWord(UIntPtr, Boolean) (繼承來源 NSAttributedString)
GetPasteboardPropertyListForType(String) (繼承來源 NSAttributedString)
GetRange(NSTextBlock, UIntPtr) (繼承來源 NSAttributedString)
GetRange(NSTextList, UIntPtr) (繼承來源 NSAttributedString)
GetRange(NSTextTable, UIntPtr) (繼承來源 NSAttributedString)
GetRtf(NSRange, NSAttributedStringDocumentAttributes) (繼承來源 NSAttributedString)
GetRtf(NSRange, NSDictionary) (繼承來源 NSAttributedString)
GetRtfd(NSRange, NSAttributedStringDocumentAttributes) (繼承來源 NSAttributedString)
GetRtfd(NSRange, NSDictionary) (繼承來源 NSAttributedString)
GetRtfdFileWrapper(NSRange, NSAttributedStringDocumentAttributes) (繼承來源 NSAttributedString)
GetRtfdFileWrapper(NSRange, NSDictionary) (繼承來源 NSAttributedString)
GetRulerAttributes(NSRange) (繼承來源 NSAttributedString)
GetUIKitAttributes(IntPtr, NSRange, NSRange) (繼承來源 NSAttributedString)
GetUIKitAttributes(IntPtr, NSRange) (繼承來源 NSAttributedString)
GetUrl(UIntPtr, NSRange) (繼承來源 NSAttributedString)
GetWritableTypesForPasteboard(NSPasteboard) (繼承來源 NSAttributedString)
GetWritingOptionsForType(String, NSPasteboard) (繼承來源 NSAttributedString)
Init()

透過呼叫 Objective-C init 方法初始化物件。

(繼承來源 NSObject)
InitializeHandle(NativeHandle, String) (繼承來源 NSObject)
InitializeHandle(NativeHandle) (繼承來源 NSObject)
Insert(NSAttributedString, IntPtr)

將一個帶有屬性的字串插入到目前的字串中。

Invoke(Action, Double)

在指定的延遲後執行指定動作。

(繼承來源 NSObject)
Invoke(Action, TimeSpan)

在指定的延遲後執行指定動作。

(繼承來源 NSObject)
InvokeOnMainThread(Action)

同步呼叫指定動作於主介面執行緒。

(繼承來源 NSObject)
InvokeOnMainThread(Selector, NSObject)

同步呼叫主介面執行緒中指定的程式碼。

(繼承來源 NSObject)
IsEqual(NSAttributedString) (繼承來源 NSAttributedString)
IsEqual(NSObject) (繼承來源 NSObject)
IsKindOfClass(Class) (繼承來源 NSObject)
IsMemberOfClass(Class) (繼承來源 NSObject)
LoadData(String, Action<NSData,NSError>)

實作此方法以自訂資料載入方式 NSItemProvider。

(繼承來源 NSAttributedString)
LoadDataAsync(String, NSProgress) (繼承來源 NSAttributedString)
LoadDataAsync(String)

非同步從項目提供者載入已識別型別的資料,並回傳包含該資料的任務。

(繼承來源 NSAttributedString)
LowLevelGetAttributes(IntPtr, IntPtr) (繼承來源 NSAttributedString)
LowLevelGetAttributes(IntPtr, NSRange)

低階版本,提供指定範圍內屬性的 NSDictionary。

(繼承來源 NSAttributedString)
LowLevelSetAttributes(IntPtr, NSRange)
MarkDirty()

將一般的對等物件(IsDirectBinding 為真)升格為 toggleref 物件。

(繼承來源 NSObject)
MutableCopy() (繼承來源 NSObject)
MutableCopy(NSZone) (繼承來源 NSAttributedString)
ObjectDidEndEditing(NSObject) (繼承來源 NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr) (繼承來源 NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) (繼承來源 NSObject)
PerformSelector(Selector, NSObject, Double) (繼承來源 NSObject)
PerformSelector(Selector, NSObject, NSObject) (繼承來源 NSObject)
PerformSelector(Selector, NSObject) (繼承來源 NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (繼承來源 NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (繼承來源 NSObject)
PerformSelector(Selector) (繼承來源 NSObject)
PrefersRtfdInRange(NSRange) (繼承來源 NSAttributedString)
PrepareForInterfaceBuilder() (繼承來源 NSObject)
ReadFromData(NSData, NSAttributedStringDocumentAttributes, NSDictionary, NSError)
ReadFromData(NSData, NSDictionary, NSDictionary, NSError)
ReadFromFile(NSUrl, NSAttributedStringDocumentAttributes, NSDictionary, NSError)

開發者不應該使用這種已淘汰的方法。 開發者應該改用「ReadFromUrl」。

ReadFromFile(NSUrl, NSDictionary, NSDictionary, NSError)
ReadFromUrl(NSUrl, NSAttributedStringDocumentAttributes, NSDictionary<NSString,NSObject>, NSError)
ReadFromUrl(NSUrl, NSDictionary<NSString,NSObject>, NSDictionary<NSString,NSObject>, NSError)
RemoveAttribute(String, NSRange)
RemoveObserver(NSObject, NSString, IntPtr) (繼承來源 NSObject)
RemoveObserver(NSObject, NSString) (繼承來源 NSObject)
RemoveObserver(NSObject, String, IntPtr) (繼承來源 NSObject)
RemoveObserver(NSObject, String) (繼承來源 NSObject)
Replace(NSRange, NSAttributedString)
Replace(NSRange, String)
RespondsToSelector(Selector) (繼承來源 NSObject)
SetAttributes(CTStringAttributes, NSRange)

設定指定範圍的屬性。 該範圍內的先前屬性會被新值取代。

SetAttributes(NSDictionary, NSRange)

設定指定範圍的屬性。 該範圍內的先前屬性會被新值取代。

SetAttributes(UIStringAttributes, NSRange)

設定指定範圍的屬性。 該範圍內的先前屬性會被新值取代。

SetNilValueForKey(NSString) (繼承來源 NSObject)
SetString(NSAttributedString)
SetValueForKey(NSObject, NSString) (繼承來源 NSObject)
SetValueForKeyPath(NativeHandle, NSString)

將由給定金鑰路徑所識別的屬性值設定給定值。

(繼承來源 NSObject)
SetValueForKeyPath(NSObject, NSString) (繼承來源 NSObject)
SetValueForUndefinedKey(NSObject, NSString) (繼承來源 NSObject)
SetValuesForKeysWithDictionary(NSDictionary) (繼承來源 NSObject)
Substring(IntPtr, IntPtr) (繼承來源 NSAttributedString)
ToString()

回傳當前實例值的字串表示。

(繼承來源 NSObject)
Unbind(NSString) (繼承來源 NSObject)
ValueForKey(NSString) (繼承來源 NSObject)
ValueForKeyPath(NSString) (繼承來源 NSObject)
ValueForUndefinedKey(NSString) (繼承來源 NSObject)
WillChange(NSKeyValueChange, NSIndexSet, NSString) (繼承來源 NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (繼承來源 NSObject)
WillChangeValue(String) (繼承來源 NSObject)

擴充方法

名稱 Description
AcceptsPreviewPanelControl(NSObject, QLPreviewPanel)
AccessibilityHitTest(NSObject, CGPoint, UIEvent)
ApplyFontTraits(NSMutableAttributedString, NSFontTraitMask, NSRange)
BeginPreviewPanelControl(NSObject, QLPreviewPanel)
BoundingRectWithSize(NSAttributedString, CGSize, NSStringDrawingOptions, NSStringDrawingContext)
BrowserAccessibilityDeleteTextAtCursor(NSObject, IntPtr)
BrowserAccessibilityInsertTextAtCursor(NSObject, String)
ContainsAttachments(NSAttributedString, NSRange)

若電流NSAttributedString中包含指定的range附件,則返回true。

DrawAtPoint(NSAttributedString, CGPoint)
DrawInRect(NSAttributedString, CGRect)
DrawWithRect(NSAttributedString, CGRect, NSStringDrawingOptions, NSStringDrawingContext)
EndPreviewPanelControl(NSObject, QLPreviewPanel)
FixAttachmentAttributeInRange(NSMutableAttributedString, NSRange)
FixAttributesInRange(NSMutableAttributedString, NSRange)

修正多次編輯中可能累積的不一致之處。

FixFontAttributeInRange(NSMutableAttributedString, NSRange)
FixParagraphStyleAttributeInRange(NSMutableAttributedString, NSRange)
GetAccessibilityCustomRotors(NSObject)

取得適合物件this的UIAccessibilityCustomRotor物件陣列。

GetAccessibilityLineEndPositionFromCurrentSelection(NSObject)
GetAccessibilityLineRangeForPosition(NSObject, IntPtr)
GetAccessibilityLineStartPositionFromCurrentSelection(NSObject)
GetAccessibilityNextTextNavigationElement(NSObject)
GetAccessibilityNextTextNavigationElementBlock(NSObject)
GetAccessibilityPreviousTextNavigationElement(NSObject)
GetAccessibilityPreviousTextNavigationElementBlock(NSObject)
GetAccessibilityTextInputResponder(NSObject)
GetAccessibilityTextInputResponderHandler(NSObject)
GetBrowserAccessibilityAttributedValue(NSObject, NSRange)
GetBrowserAccessibilityContainerType(NSObject)
GetBrowserAccessibilityCurrentStatus(NSObject)
GetBrowserAccessibilityHasDomFocus(NSObject)
GetBrowserAccessibilityIsRequired(NSObject)
GetBrowserAccessibilityPressedState(NSObject)
GetBrowserAccessibilityRoleDescription(NSObject)
GetBrowserAccessibilitySelectedTextRange(NSObject)
GetBrowserAccessibilitySortDirection(NSObject)
GetBrowserAccessibilityValue(NSObject, NSRange)
GetDebugDescription(INSObjectProtocol)
GetHandle(INativeObject)
GetItemProviderVisibilityForTypeIdentifier(INSItemProviderWriting, String)
GetNonNullHandle(INativeObject, String)
GetSize(NSAttributedString)
GetValidModes(NSObject, NSFontPanel)
GetWritableTypeIdentifiersForItemProvider(INSItemProviderWriting)
GetWritingOptionsForType(INSPasteboardWriting, String, NSPasteboard)
LoadDataAsync(INSItemProviderWriting, String, NSProgress)
LoadDataAsync(INSItemProviderWriting, String)

非同步從項目提供者載入已識別型別的資料,並回傳包含該資料的任務。

ObjectDidBeginEditing(NSObject, INSEditor)
ObjectDidEndEditing(NSObject, INSEditor)
ProvideImageData(NSObject, IntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
ProvideImageToMTLTexture(NSObject, IMTLTexture, IMTLCommandBuffer, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
ReadFromData(NSMutableAttributedString, NSData, NSAttributedStringDocumentAttributes, NSDictionary, NSError)
ReadFromData(NSMutableAttributedString, NSData, NSAttributedStringDocumentAttributes, NSDictionary)
ReadFromData(NSMutableAttributedString, NSData, NSDictionary, NSDictionary, NSError)
ReadFromData(NSMutableAttributedString, NSData, NSDictionary, NSDictionary)
ReadFromURL(NSMutableAttributedString, NSUrl, NSAttributedStringDocumentAttributes, NSDictionary, NSError)
ReadFromURL(NSMutableAttributedString, NSUrl, NSAttributedStringDocumentAttributes, NSDictionary)
ReadFromURL(NSMutableAttributedString, NSUrl, NSDictionary, NSDictionary, NSError)
ReadFromURL(NSMutableAttributedString, NSUrl, NSDictionary, NSDictionary)
SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

設定適合物件this的UIAccessibilityCustomRotor物件陣列。

SetAccessibilityNextTextNavigationElement(NSObject, NSObject)
SetAccessibilityNextTextNavigationElementBlock(NSObject, AXObjectReturnBlock)
SetAccessibilityPreviousTextNavigationElement(NSObject, NSObject)
SetAccessibilityPreviousTextNavigationElementBlock(NSObject, AXObjectReturnBlock)
SetAccessibilityTextInputResponder(NSObject, IUITextInput)
SetAccessibilityTextInputResponderHandler(NSObject, UITextInputReturnHandler)
SetAlignment(NSMutableAttributedString, NSTextAlignment, NSRange)
SetBaseWritingDirection(NSMutableAttributedString, NSWritingDirection, NSRange)
SetBrowserAccessibilityContainerType(NSObject, BEAccessibilityContainerType)
SetBrowserAccessibilityCurrentStatus(NSObject, String)
SetBrowserAccessibilityHasDomFocus(NSObject, Boolean)
SetBrowserAccessibilityIsRequired(NSObject, Boolean)
SetBrowserAccessibilityPressedState(NSObject, BEAccessibilityPressedState)
SetBrowserAccessibilityRoleDescription(NSObject, String)
SetBrowserAccessibilitySelectedTextRange(NSObject, NSRange)
SetBrowserAccessibilitySortDirection(NSObject, String)
SetSharedObservers(NSObject, NSKeyValueSharedObserversSnapshot)
SubscriptRange(NSMutableAttributedString, NSRange)
SuperscriptRange(NSMutableAttributedString, NSRange)
UnscriptRange(NSMutableAttributedString, NSRange)
UpdateAttachmentsFromPath(NSMutableAttributedString, String)
ValidateToolbarItem(NSObject, NSToolbarItem)

適用於