DTCSSListStyle Class Reference
Inherits from | NSObject |
Conforms to | NSCoding |
Declared in | DTCSSListStyle.h |
Overview
This class is the equivalent of NSTextList
on Mac with the added handling of the marker position.
Tasks
Getting Types from Strings
Creating List Styles
Working with CSS Styles
Working with Prefixes
Managing Item Numbering
Comparing Lists
Getting Information about Lists
-
– isOrdered
-
inherit
property -
type
property -
position
property -
imageName
property
Properties
imageName
The image name to use for the marker
@property (nonatomic, copy) NSString *imageName
Declared In
DTCSSListStyle.h
inherit
If the list style is inherited.
@property (nonatomic, assign) BOOL inherit
Discussion
@warn This is not implemented.
Declared In
DTCSSListStyle.h
position
The position of the marker in the prefix. See DTCSSListStylePosition for available positions.
@property (nonatomic, assign) DTCSSListStylePosition position
Declared In
DTCSSListStyle.h
type
The type of the text list. See DTCSSListStyleType for available types
@property (nonatomic, assign) DTCSSListStyleType type
Declared In
DTCSSListStyle.h
Class Methods
listStylePositionFromString:
Convert a string into a marker position.
+ (DTCSSListStylePosition)listStylePositionFromString:(NSString *)string
Parameters
- string
The string to convert
Declared In
DTCSSListStyle.h
listStyleTypeFromString:
Convert a string into a list style type.
+ (DTCSSListStyleType)listStyleTypeFromString:(NSString *)string
Parameters
- string
The string to convert
Declared In
DTCSSListStyle.h
Instance Methods
initWithStyles:
Creates a list style from the passed CSS style dictionary
- (id)initWithStyles:(NSDictionary *)styles
Parameters
- styles
A CSS style dictionary from which the construct a suitable list style
Declared In
DTCSSListStyle.h
isEqualToListStyle:
Determine if another list style has equivalent settings. Note that this does not mean that they are identical, only that they look the same.
- (BOOL)isEqualToListStyle:(DTCSSListStyle *)otherListStyle
Parameters
- otherListStyle
The other list style to compare the receiver with
Return Value
YES
if the other list style has the same values
Declared In
DTCSSListStyle.h
isOrdered
Returns if the receiver is an ordered or unordered list
- (BOOL)isOrdered
Return Value
YES
if the receiver is ordered, NO
if it is unordered
Declared In
DTCSSListStyle.h
prefixWithCounter:
Returns the prefix for lists of the receiver’s settings.
- (NSString *)prefixWithCounter:(NSInteger)counter
Parameters
- counter
The counter value to use for ordered lists.
Return Value
The prefix string to prepend to list items.
Declared In
DTCSSListStyle.h
setStartingItemNumber:
Sets the starting item number for the text list.
- (void)setStartingItemNumber:(NSInteger)itemNum
Parameters
- itemNum
The item number.
Discussion
The default value is 1
. This value will be used only for ordered lists, and ignored in other cases.
Declared In
DTCSSListStyle.h