NSAttributedString class
NSAttributedString
- Available extensions
- NSAttributedString_ItemProvider
- NSAttributedStringAdaptiveImageGlyphConveniences
- NSAttributedStringAttachmentConveniences
- NSAttributedStringCreateFromMarkdown
- NSAttributedStringDocumentFormats
- NSAttributedStringFormatting
- NSAttributedStringKitAdditions
- NSDeprecatedKitAdditions
- NSExtendedAttributedString
- NSExtendedStringDrawing
- NSMorphology
- NSStringDrawing
Constructors
- NSAttributedString()
-
Returns a new instance of NSAttributedString constructed with the default
newmethod.factory - NSAttributedString.castFrom(ObjCObjectBase other)
-
Constructs a NSAttributedString that points to the same underlying object as
other. -
NSAttributedString.castFromPointer(Pointer<
ObjCObject> other, {bool retain = false, bool release = false}) - Constructs a NSAttributedString that wraps the given raw object pointer.
Properties
- debugDescription$1 → NSString
-
debugDescription
no setterinherited
- description$1 → NSString
-
description
no setterinherited
- hash$1 → int
-
hash
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isProxy → bool
-
isProxy
no setterinherited
- length → int
-
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
lengthno setter - ref → ObjCObjectRef
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- string → NSString
-
string
no setter
- superclass$1 → ObjCObjectBase
-
superclass
no setterinherited
- writableTypeIdentifiersForItemProvider$1 → NSArray
-
Available on NSAttributedString, provided by the NSAttributedString_ItemProvider extension
writableTypeIdentifiersForItemProviderno setter
Methods
-
attribute(
NSString attrName, {required int atIndex, required Pointer< NSRange> effectiveRange}) → ObjCObjectBase? -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
attribute:atIndex:effectiveRange: -
attribute$1(
NSString attrName, {required int atIndex, required Pointer< NSRange> longestEffectiveRange, required NSRange inRange}) → ObjCObjectBase? -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
attribute:atIndex:longestEffectiveRange:inRange: -
attributedStringByInflectingString(
) → NSAttributedString -
Available on NSAttributedString, provided by the NSMorphology extension
attributedStringByInflectingString -
attributedSubstringFromRange(
NSRange range) → NSAttributedString -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
attributedSubstringFromRange: -
attributesAtIndex(
int location, {required Pointer< NSRange> effectiveRange}) → NSDictionary - attributesAtIndex:effectiveRange:
-
attributesAtIndex(
int location, {required Pointer< NSRange> longestEffectiveRange, required NSRange inRange}) → NSDictionary -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
attributesAtIndex:longestEffectiveRange:inRange: -
autorelease(
) → NSObject -
autorelease
inherited
-
boundingRectWithSize(
CGSize size, {required NSStringDrawingOptions options, NSStringDrawingContext? context}) → CGRect -
Available on NSAttributedString, provided by the NSExtendedStringDrawing extension
boundingRectWithSize:options:context: -
class$1(
) → ObjCObjectBase -
class
inherited
-
conformsToProtocol$1(
Protocol aProtocol) → bool -
conformsToProtocol:
inherited
-
containsAttachmentsInRange(
NSRange range) → bool -
Available on NSAttributedString, provided by the NSAttributedStringKitAdditions extension
containsAttachmentsInRange: -
copy(
) → ObjCObjectBase -
copy
inherited
-
dataFromRange(
NSRange range, {required NSDictionary documentAttributes, required Pointer< Pointer< error}) → NSData?ObjCObject> > -
Available on NSAttributedString, provided by the NSAttributedStringDocumentFormats extension
dataFromRange:documentAttributes:error: -
dealloc(
) → void -
dealloc
inherited
-
doesNotRecognizeSelector(
Pointer< ObjCSelector> aSelector) → void -
doesNotRecognizeSelector:
inherited
-
drawAtPoint(
CGPoint point) → void -
Available on NSAttributedString, provided by the NSStringDrawing extension
drawAtPoint: -
drawInRect(
CGRect rect) → void -
Available on NSAttributedString, provided by the NSStringDrawing extension
drawInRect: -
drawWithRect(
CGRect rect, {required NSStringDrawingOptions options, NSStringDrawingContext? context}) → void -
Available on NSAttributedString, provided by the NSExtendedStringDrawing extension
drawWithRect:options:context: -
encodeWithCoder(
NSCoder coder) → void - encodeWithCoder:
-
enumerateAttribute(
NSString attrName, {required NSRange inRange, required NSAttributedStringEnumerationOptions options, required ObjCBlock< Void Function(Pointer< usingBlock}) → voidObjCObject> ?, NSRange, Pointer<Bool> )> -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
enumerateAttribute:inRange:options:usingBlock: -
enumerateAttributesInRange(
NSRange enumerationRange, {required NSAttributedStringEnumerationOptions options, required ObjCBlock< Void Function(NSDictionary, NSRange, Pointer< usingBlock}) → voidBool> )> -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
enumerateAttributesInRange:options:usingBlock: -
fileWrapperFromRange(
NSRange range, {required NSDictionary documentAttributes, required Pointer< Pointer< error}) → NSFileWrapper?ObjCObject> > -
Available on NSAttributedString, provided by the NSAttributedStringDocumentFormats extension
fileWrapperFromRange:documentAttributes:error: -
forwardingTargetForSelector(
Pointer< ObjCSelector> aSelector) → ObjCObjectBase -
forwardingTargetForSelector:
inherited
-
forwardInvocation(
NSInvocation anInvocation) → void -
forwardInvocation:
inherited
-
init(
) → NSAttributedString - init
-
initWithAttributedString(
NSAttributedString attrStr) → NSAttributedString - initWithAttributedString:
-
initWithCoder(
NSCoder coder) → NSAttributedString? - initWithCoder:
-
initWithContentsOfMarkdownFileAtURL(
NSURL markdownFile, {NSAttributedStringMarkdownParsingOptions? options, NSURL? baseURL, required Pointer< Pointer< error}) → NSAttributedString?ObjCObject> > - initWithContentsOfMarkdownFileAtURL:options:baseURL:error:
-
initWithData(
NSData data, {required NSDictionary options, required Pointer< Pointer< documentAttributes, required Pointer<ObjCObject> >Pointer< error}) → NSAttributedString?ObjCObject> > - initWithData:options:documentAttributes:error:
-
initWithFileURL(
NSURL url, {required NSDictionary options, required Pointer< Pointer< documentAttributes, required Pointer<ObjCObject> >Pointer< error}) → NSAttributedString?ObjCObject> > - initWithFileURL:options:documentAttributes:error:
-
initWithFormat(
NSAttributedString format, {required NSAttributedStringFormattingOptions options, NSLocale? locale}) → NSAttributedString - initWithFormat:options:locale:
-
initWithFormat$1(
NSAttributedString format, {required NSAttributedStringFormattingOptions options, NSLocale? locale, required NSDictionary context}) → NSAttributedString - initWithFormat:options:locale:context:
-
initWithMarkdown(
NSData markdown, {NSAttributedStringMarkdownParsingOptions? options, NSURL? baseURL, required Pointer< Pointer< error}) → NSAttributedString?ObjCObject> > - initWithMarkdown:options:baseURL:error:
-
initWithMarkdownString(
NSString markdownString, {NSAttributedStringMarkdownParsingOptions? options, NSURL? baseURL, required Pointer< Pointer< error}) → NSAttributedString?ObjCObject> > - initWithMarkdownString:options:baseURL:error:
-
initWithString(
NSString str) → NSAttributedString - initWithString:
-
initWithString$1(
NSString str, {NSDictionary? attributes}) → NSAttributedString - initWithString:attributes:
-
initWithURL(
NSURL url, {required NSDictionary options, required Pointer< Pointer< documentAttributes, required Pointer<ObjCObject> >Pointer< error}) → NSAttributedString?ObjCObject> > - initWithURL:options:documentAttributes:error:
-
isEqual(
ObjCObjectBase object) → bool -
isEqual:
inherited
-
isEqualToAttributedString(
NSAttributedString other) → bool -
Available on NSAttributedString, provided by the NSExtendedAttributedString extension
isEqualToAttributedString: -
isKindOfClass(
ObjCObjectBase aClass) → bool -
isKindOfClass:
inherited
-
isMemberOfClass(
ObjCObjectBase aClass) → bool -
isMemberOfClass:
inherited
-
itemProviderVisibilityForRepresentationWithTypeIdentifier$1(
NSString typeIdentifier) → NSItemProviderRepresentationVisibility -
Available on NSAttributedString, provided by the NSAttributedString_ItemProvider extension
itemProviderVisibilityForRepresentationWithTypeIdentifier: -
loadDataWithTypeIdentifier(
NSString typeIdentifier, {required ObjCBlock< Void Function(NSData?, NSError?)> forItemProviderCompletionHandler}) → NSProgress? -
Available on NSAttributedString, provided by the NSAttributedString_ItemProvider extension
loadDataWithTypeIdentifier:forItemProviderCompletionHandler: -
methodForSelector(
Pointer< ObjCSelector> aSelector) → Pointer<NativeFunction< Void Function()> > -
methodForSelector:
inherited
-
methodSignatureForSelector(
Pointer< ObjCSelector> aSelector) → NSMethodSignature -
methodSignatureForSelector:
inherited
-
mutableCopy(
) → ObjCObjectBase -
mutableCopy
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performSelector(
Pointer< ObjCSelector> aSelector) → ObjCObjectBase -
performSelector:
inherited
-
performSelector$1(
Pointer< ObjCSelector> aSelector, {required ObjCObjectBase withObject}) → ObjCObjectBase -
performSelector:withObject:
inherited
-
performSelector$2(
Pointer< ObjCSelector> aSelector, {required ObjCObjectBase withObject, required ObjCObjectBase withObject$1}) → ObjCObjectBase -
performSelector:withObject:withObject:
inherited
-
prefersRTFDInRange(
NSRange range) → bool -
Available on NSAttributedString, provided by the NSAttributedStringKitAdditions extension
prefersRTFDInRange: -
release(
) → void -
release
inherited
-
respondsToSelector(
Pointer< ObjCSelector> aSelector) → bool -
respondsToSelector:
inherited
-
retain(
) → NSObject -
retain
inherited
-
retainCount(
) → int -
retainCount
inherited
-
self$1(
) → NSObject -
self
inherited
-
size(
) → CGSize -
Available on NSAttributedString, provided by the NSStringDrawing extension
size -
toString(
) → String -
A string representation of this object.
inherited
-
zone(
) → Pointer< NSZone> -
zone
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
alloc(
) → NSAttributedString - alloc
-
allocWithZone(
Pointer< NSZone> zone) → NSAttributedString - allocWithZone:
-
attributedStringWithAdaptiveImageGlyph(
NSAdaptiveImageGlyph adaptiveImageGlyph, {required NSDictionary attributes}) → NSAttributedString - attributedStringWithAdaptiveImageGlyph:attributes:
-
attributedStringWithAttachment(
NSTextAttachment attachment, {required NSDictionary attributes}) → NSAttributedString - attributedStringWithAttachment:attributes:
-
getSupportsSecureCoding(
) → bool - supportsSecureCoding
-
isInstance(
ObjCObjectBase obj) → bool -
Returns whether
objis an instance of NSAttributedString. -
localizedAttributedStringWithFormat(
NSAttributedString format) → NSAttributedString - localizedAttributedStringWithFormat:
-
localizedAttributedStringWithFormat$1(
NSAttributedString format, {required NSAttributedStringFormattingOptions options}) → NSAttributedString - localizedAttributedStringWithFormat:options:
-
localizedAttributedStringWithFormat$2(
NSAttributedString format, {required NSDictionary context}) → NSAttributedString - localizedAttributedStringWithFormat:context:
-
localizedAttributedStringWithFormat$3(
NSAttributedString format, {required NSAttributedStringFormattingOptions options, required NSDictionary context}) → NSAttributedString - localizedAttributedStringWithFormat:options:context:
-
new$(
) → NSAttributedString - new
-
objectWithItemProviderData(
NSData data, {required NSString typeIdentifier, required Pointer< Pointer< error}) → NSAttributedString?ObjCObject> > - objectWithItemProviderData:typeIdentifier:error: