Declared in NSDictionary+DTCoreText.h

Overview

Convenience methods for editors dealing with Core Text attribute dictionaries.

Instance Methods

backgroundColor

Retrieves the background color. On iOS as UIColor, on Mac as NSColor. This supports both the DT as well as the NS/UIKit method of specifying the color. If no background color is defined in the receiver then nil is returned

- (DTColor *)backgroundColor

Return Value

The platform-specific color defined for the background, or nil if none is defined

Declared In

NSDictionary+DTCoreText.h

fontDescriptor

Retrieves the DTCoreTextFontDescriptor from the receiver’s attributes. This supports both CTFont as well as UIFont as a possible representation of the text’s font.

- (DTCoreTextFontDescriptor *)fontDescriptor

Return Value

The font descriptor

Declared In

NSDictionary+DTCoreText.h

foregroundColor

Retrieves the foreground color. On iOS as UIColor, on Mac as NSColor. This supports both the CT as well as the NS/UIKit method of specifying the color. If no foreground color is defined in the receiver then black is assumed.

- (DTColor *)foregroundColor

Return Value

The platform-specific color defined for the foreground

Declared In

NSDictionary+DTCoreText.h

hasAttachment

Whether the receiver’s attributes contain a DTTextAttachment

- (BOOL)hasAttachment

Return Value

YES if ther is an attachment

Declared In

NSDictionary+DTCoreText.h

headerLevel

The header level of the receiver

- (NSUInteger)headerLevel

Return Value

The header level (1-6) or 0 if no header level is set

Declared In

NSDictionary+DTCoreText.h

isBold

Whether the font in the receiver’s attributes is bold.

- (BOOL)isBold

Return Value

YES if the text has a bold trait

Declared In

NSDictionary+DTCoreText.h

isItalic

Whether the font in the receiver’s attributes is italic.

- (BOOL)isItalic

Return Value

YES if the text has an italic trait

Declared In

NSDictionary+DTCoreText.h

isStrikethrough

Whether the receiver’s attributes contains strike-through.

- (BOOL)isStrikethrough

Return Value

YES if the text is strike-through

Declared In

NSDictionary+DTCoreText.h

isUnderline

Whether the receiver’s attributes contains underlining.

- (BOOL)isUnderline

Return Value

YES if the text is underlined

Declared In

NSDictionary+DTCoreText.h

kerning

The text kerning value

- (CGFloat)kerning

Return Value

the kerning value

Declared In

NSDictionary+DTCoreText.h

paragraphStyle

Retrieves the DTCoreTextParagraphStyle from the receiver’s attributes. This supports both CTParagraphStyle as well as NSParagraphStyle as a possible representation of the text’s paragraph style.

- (DTCoreTextParagraphStyle *)paragraphStyle

Return Value

The paragraph style

Declared In

NSDictionary+DTCoreText.h