Skip to content
This repository
Newer
Older
100644 165 lines (145 sloc) 4.252 kb
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
1 //
2 // Copyright 2011 Roger Chapman
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 #import <Foundation/Foundation.h>
87c494ef »
2011-11-07 [attributedlabel] More non-PCH auditing. Add UIKit to attributed stri…
18 #import <UIKit/UIKit.h>
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
19 #import <CoreText/CoreText.h>
20
21 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
22 * For easier formatting of NSAttributedString.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
23 *
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
24 * Most of these methods are called directly from NIAttributedLabel. Normally you should
25 * not have to call these methods directly. Have a look at NIAttributedLabel first, it's most
26 * likely what you are after.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
27 */
28 @interface NSMutableAttributedString (NimbusAttributedLabel)
29
30 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
31 * Sets the text alignment and the line break mode for a given range.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
32 *
33 * TextAlignment Values:
34 * - kCTLeftTextAlignment
35 * - kCTCenterTextAlignment
36 * - kCTRightTextAlignment
37 * - kCTJustifiedTextAlignment
38 * - kCTNaturalTextAlignment
39 *
40 * LineBreakMode Values
41 * - kCTLineBreakByWordWrapping
42 * - kCTLineBreakByCharWrapping
43 * - kCTLineBreakByClipping
44 * - kCTLineBreakByTruncatingHead
45 * - kCTLineBreakByTruncatingTail
46 * _ kCTLineBreakByTruncatingMiddle
47 */
48 -(void) setTextAlignment:(CTTextAlignment)textAlignment
49 lineBreakMode:(CTLineBreakMode)lineBreakMode
50 range:(NSRange)range;
51
52
53 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
54 * Sets the text alignment and the line break mode for the whole string.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
55 *
56 * TextAlignment Values:
57 * - kCTLeftTextAlignment
58 * - kCTCenterTextAlignment
59 * - kCTRightTextAlignment
60 * - kCTJustifiedTextAlignment
61 * - kCTNaturalTextAlignment
62 *
63 * LineBreakMode Values
64 * - kCTLineBreakByWordWrapping
65 * - kCTLineBreakByCharWrapping
66 * - kCTLineBreakByClipping
67 * - kCTLineBreakByTruncatingHead
68 * - kCTLineBreakByTruncatingTail
69 * _ kCTLineBreakByTruncatingMiddle
70
71 */
72 -(void) setTextAlignment:(CTTextAlignment)textAlignment
73 lineBreakMode:(CTLineBreakMode)lineBreakMode;
74
75
76 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
77 * Sets the text color for a given range.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
78 */
79 -(void) setTextColor:(UIColor*)color range:(NSRange)range;
80
81 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
82 * Sets the text color for the whole string.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
83 */
84 -(void) setTextColor:(UIColor*)color;
85
86 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
87 * Sets the font for a given range.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
88 */
89 -(void) setFont:(UIFont*)font range:(NSRange)range;
90
91 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
92 * Sets the font for the whole string.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
93 */
94 -(void) setFont:(UIFont*)font;
95
96 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
97 * Sets the underline style and modifier for a given range.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
98 *
99 * Style Values:
100 * - kCTUnderlineStyleNone
101 * - kCTUnderlineStyleSingle
102 * - kCTUnderlineStyleThick
103 * - kCTUnderlineStyleDouble
104 *
105 * Modifier Values:
106 * - kCTUnderlinePatternSolid
107 * - kCTUnderlinePatternDot
108 * - kCTUnderlinePatternDash
109 * - kCTUnderlinePatternDashDot
110 * - kCTUnderlinePatternDashDotDot
111 */
112 -(void) setUnderlineStyle:(CTUnderlineStyle)style
113 modifier:(CTUnderlineStyleModifiers)modifier
114 range:(NSRange)range;
115
116 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
117 * Sets the underline style and modifier for the whole string.
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
118 *
119 * Style Values:
120 * - kCTUnderlineStyleNone
121 * - kCTUnderlineStyleSingle
122 * - kCTUnderlineStyleThick
123 * - kCTUnderlineStyleDouble
124 *
125 * Modifier Values:
126 * - kCTUnderlinePatternSolid
127 * - kCTUnderlinePatternDot
128 * - kCTUnderlinePatternDash
129 * - kCTUnderlinePatternDashDot
130 * - kCTUnderlinePatternDashDotDot
131 */
132 -(void) setUnderlineStyle:(CTUnderlineStyle)style
133 modifier:(CTUnderlineStyleModifiers)modifier;
134
62a02593 » rogchap
2011-08-26 Added text stroke support
135 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
136 * Sets the stroke width for a given range.
62a02593 » rogchap
2011-08-26 Added text stroke support
137 */
138 -(void) setStrokeWidth:(CGFloat)width range:(NSRange)range;
139
140 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
141 * Sets the stroke width for the whole string.
62a02593 » rogchap
2011-08-26 Added text stroke support
142 */
143 -(void) setStrokeWidth:(CGFloat)width;
144
145 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
146 * Sets the stroke color for a given range.
62a02593 » rogchap
2011-08-26 Added text stroke support
147 */
148 -(void) setStrokeColor:(UIColor*)color range:(NSRange)range;
149
150 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
151 * Sets the stroke color for the whole string.
62a02593 » rogchap
2011-08-26 Added text stroke support
152 */
153 -(void) setStrokeColor:(UIColor*)color;
154
dfccc11e » rogchap
2011-08-26 Added custom links support
155 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
156 * Sets the text kern for a given range.
dfccc11e » rogchap
2011-08-26 Added custom links support
157 */
158 -(void) setKern:(CGFloat)kern range:(NSRange)range;
159
160 /**
0f6ccea1 »
2011-09-20 [attributedlabel] Minor documentation touchups.
161 * Sets the text kern for the whole string.
dfccc11e » rogchap
2011-08-26 Added custom links support
162 */
163 -(void) setKern:(CGFloat)kern;
164
c9e4f5a8 » rogchap
2011-08-26 Refactored NSAttributedString methods into Category additions and add…
165 @end
Something went wrong with that request. Please try again.