FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSAttributedString+UIKit.h
Go to the documentation of this file.
1 //
2 // NSAttributedString+UIKit.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 12. 11. 1..
6 // Copyright (c) 2012 youknowone.org. All rights reserved.
7 //
8 
21 #import <UIKit/UIKit.h>
22 
23 
24 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
25 
27 
28 #if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000
29 
43 typedef NSUInteger NSUnderlineStyle;
44 
45 #endif
46 
52 enum {
54  NSLigatureNo = 1, // default
55 };
61 typedef NSUInteger NSLigatureType;
62 
63 
69 enum {
72 };
78 typedef NSUInteger NSVerticalGlyphForm;
79 
80 
85 
90 - (void)addAttributeFont:(UIFont *)font range:(NSRange)range;
95 - (void)removeAttributeFontFromRange:(NSRange)range;
96 
101 - (void)addAttributeParagraphStyle:(NSParagraphStyle *)paragraphStyle range:(NSRange)range;
106 - (void)removeAttributeParagraphStyleFromRange:(NSRange)range;
107 
112 - (void)addAttributeForegroundColor:(UIColor *)foregroundColor range:(NSRange)range;
117 - (void)removeAttributeForegroundColorFromRange:(NSRange)range;
118 
123 - (void)addAttributeBackgroundColor:(UIColor *)backgroundColor range:(NSRange)range;
128 - (void)removeAttributeBackgroundColorFromRange:(NSRange)range;
129 
134 - (void)addAttributeLigature:(NSLigatureType)ligature range:(NSRange)range;
139 - (void)removeAttributeLigatureFromRange:(NSRange)range;
140 
145 - (void)addAttributeKern:(float)kern range:(NSRange)range;
150 - (void)removeAttributeKernFromRange:(NSRange)range;
151 
156 - (void)addAttributeStrikethroughStyle:(NSUnderlineStyle)strikethroughStyle range:(NSRange)range;
161 - (void)removeAttributeStrikethroughStyleFromRange:(NSRange)range;
162 
167 - (void)addAttributeUnderlineStyle:(NSUnderlineStyle)underlineStyle range:(NSRange)range;
172 - (void)removeAttributeUnderlineStyleFromRange:(NSRange)range;
173 
178 - (void)addAttributeStrokeColor:(UIColor *)strokeColor range:(NSRange)range;
183 - (void)removeAttributeStrokeColorFromRange:(NSRange)range;
184 
189 - (void)addAttributeStrokeWidth:(float)strokeWidth range:(NSRange)range;
194 - (void)removeAttributeStrokeWidthFromRange:(NSRange)range;
195 
200 - (void)addAttributeShadow:(NSShadow *)shadow range:(NSRange)range;
205 - (void)removeAttributeShadowFromRange:(NSRange)range;
206 
211 - (void)addAttributeVerticalGlyphForm:(NSVerticalGlyphForm)verticalGlyphForm range:(NSRange)range;
216 - (void)removeAttributeVerticalGlyphFormFromRange:(NSRange)range;
217 
218 
219 @end
220 
221 
223 
228 @property(strong) UIFont *font;
233 @property(strong) NSParagraphStyle *paragraphStyle;
238 @property(strong) UIColor *foregroundColor;
243 @property(strong) UIColor *backgroundColor;
248 @property(strong) NSNumber *ligatureNumber;
253 @property(assign) NSLigatureType ligature;
258 @property(strong) NSNumber *kernNumber;
263 @property(assign) float kern;
268 @property(strong) NSNumber *strikethroughStyleNumber;
273 @property(assign) NSUnderlineStyle strikethroughStyle;
278 @property(strong) NSNumber *underlineStyleNumber;
283 @property(assign) NSUnderlineStyle underlineStyle;
288 @property(strong) UIColor *strokeColor;
293 @property(strong) NSNumber *strokeWidthNumber;
298 @property(assign) float strokeWidth;
303 @property(strong) NSShadow *shadow;
308 @property(strong) NSNumber *verticalGlyphFormNumber;
313 @property(assign) NSVerticalGlyphForm verticalGlyphForm;
314 
315 
316 @end
317 
318 #endif
NSMutableDictionary subclass-available implementation.
Definition: NSADictionary.h:32
NSUInteger NSVerticalGlyphForm
Type for vertical glyph form.
Definition: NSAttributedString+Cocoa.h:86
Dictionary with easy attribute interface.
Definition: NSAttributedString+Cocoa.h:92
See CoreFoundation-Subclass for concept of these objects.
NSMutableAttributedString attributes dictionary.
Definition: NSAttributedString+Cocoa.h:390
Definition: NSAttributedString+UIKit.h:71
NSInteger NSUnderlineStyle
Definition: NSAttributedString+Cocoa.h:39
NSUInteger NSLigatureType
Type for ligature style.
Definition: NSAttributedString+Cocoa.h:36
Definition: NSAttributedString+UIKit.h:53
Definition: NSAttributedString+UIKit.h:70
NSUInteger NSVerticalGlyphForm
Type for vertical glyph form.
Definition: NSAttributedString+UIKit.h:78
NSUInteger NSLigatureType
Type for ligature style.
Definition: NSAttributedString+UIKit.h:61
Definition: NSAttributedString+UIKit.h:54