BOStringAttribute Class Reference
| Inherits from | NSObject |
| Declared in | BOStringAttribute.h |
Tasks
-
attributeRangeproperty -
stringLengthproperty -
attributeNameproperty -
attributeValueproperty -
– with -
– range -
– stringRange
Properties
attributeName
Name of the attribute to apply.
@property (nonatomic, copy) NSString *attributeNameDiscussion
Name of the attribute to apply.
Declared In
BOStringAttribute.hattributeRange
Range of attribute. Default is (0, stringLength).
@property (nonatomic, assign) NSRange attributeRangeDiscussion
Range of attribute. Default is (0, stringLength).
Declared In
BOStringAttribute.hInstance Methods
range
Sets range of the attribute.
- (BOStringAttribute *( ^ ) ( NSRange ))rangeDiscussion
Sets range of the attribute.
Declared In
BOStringAttribute.hstringRange
Sets range of the attribute to whole string. Equivalent:
- (void ( ^ ) ( ))stringRangeDiscussion
Sets range of the attribute to whole string. Equivalent:
range(NSMakeRange(0, self.stringLength));
Declared In
BOStringAttribute.hwith
Semantic filler. Does nothing, just returns self. May be helpful in case if range needs to be changed:
- (instancetype)withReturn Value
self
Discussion
Semantic filler. Does nothing, just returns self. May be helpful in case if range needs to be changed:
make.foregroundColor([UIColor blueColor]).with.range(NSMakeRange(1, 2));
However, this code is equivalent to a bit shorter form:
make.foregroundColor([UIColor blueColor]).range(NSMakeRange(1, 2));
Which is a bit less human readable.
Declared In
BOStringAttribute.h