You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ THLabel is a subclass of UILabel, which additionally allows shadow blur, inner s
13
13
14
14
The easiest way to use THLabel in your app is via [CocoaPods](http://cocoapods.org/"CocoaPods").
15
15
16
-
1. Add the following line in the project's Podfile file: `pod 'THLabel', '~> 1.4.4'`
16
+
1. Add the following line in the project's Podfile file: `pod 'THLabel', '~> 1.4.5'`
17
17
2. Run the command `pod install` from the Podfile folder directory.
18
18
19
19
### Manual Installation
@@ -23,51 +23,51 @@ The easiest way to use THLabel in your app is via [CocoaPods](http://cocoapods.o
23
23
24
24
## Usage
25
25
26
-
You can create THLabels programmatically, or create them in Interface Builder by dragging an ordinary UILabel into your view and setting its *Custom Class* to THLabel.
26
+
You can create THLabels programmatically, or create them in Interface Builder by dragging an ordinary UILabel into your view and setting its *Custom Class* to THLabel. With Xcode 6 you can set most of the properties within Interface Builder, which will preview your changes immediately.
You can modify the letter spacing of the text (also known as kerning) by changing the `letterSpacing` property. The default value is `0.0`. A positive value will separate the characters, whereas a negative value will make them closer.
35
+
You can modify letter spacing of the text (also known as kerning) by changing the `letterSpacing` property. The default value is `0.0`. A positive value will separate the characters, whereas a negative value will make them closer.
36
+
37
+
Modify line spacing of the text (also known as leading) by changing the `lineSpacing` property. The default value is `0.0`. Only positive values will have an effect.
The inner shadow has similar properties as UILabel's shadow, once again additionally with a shadow blur. If an inner shadow and a stroke are overlapping, it will appear beneath the stroke.
You can set an outer, centered or inner stroke by setting the `strokePosition` property. Default value is `THLabelStrokePositionOutside`. Other options are `THLabelStrokePositionCenter` and `THLabelStrokePositionInside`.
The gradient can consist of multiple colors, which have to be saved as UIColor objects in the `gradientColors` array. For more convenience, `gradientStartColor` and `gradientEndColor` will fill up the array accordingly.
The gradient can consist of multiple colors, which have to be saved as UIColor objects in the `gradientColors` array. For more convenience, `gradientStartColor` and `gradientEndColor` will fill up the array accordingly.
70
+
71
71
The starting and ending points of the gradient are in the range 0 to 1, where (0, 0) is the top-left and (1, 1) the bottom-right of the text. The default value for `gradientStartPoint` is (0.5, 0.2) and for `gradientEndPoint` it is (0.5, 0.8).
72
72
73
73
```objective-c
@@ -78,7 +78,7 @@ You can fade in/out your label by setting the `fadeTruncatingMode` property. Def
Effects like stroke and shadow can't be drawn outside of the bounds of the label view. You may need to set text insets to move a bit away from the edge so that the effects don't get clipped. This will be automatically done if you set `automaticallyAdjustTextInsets` to YES, which is also the default value.
0 commit comments