THLabel alternatives and similar libraries
Based on the "Label" category.
Alternatively, view THLabel alternatives based on common mentions on social networks and blogs.
TTTAttributedLabel9.8 0.0 L2 THLabel VS TTTAttributedLabelA drop-in replacement for UILabel that supports attributes, data detectors, links, and more
LTMorphingLabel9.7 0.0 L3 THLabel VS LTMorphingLabel[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
ActiveLabel.swift9.3 0.0 L4 THLabel VS ActiveLabel.swiftUILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
ZCAnimatedLabel8.5 0.0 L4 THLabel VS ZCAnimatedLabelUILabel replacement with fine-grain appear/disappear animation
RQShineLabel8.3 0.0 L3 THLabel VS RQShineLabelSecret app like text animation
UICountingLabel8.3 0.0 L4 THLabel VS UICountingLabelAdds animated counting support to UILabel.
TOMSMorphingLabel8.1 0.0 L5 THLabel VS TOMSMorphingLabelConfigurable morphing transitions between text values of a label.
MZTimerLabel8.0 0.0 L3 THLabel VS MZTimerLabelA handy class for iOS to use UILabel as a countdown timer or stopwatch just like in Apple Clock App.
NumberMorphView7.8 0.0 THLabel VS NumberMorphViewA label view for displaying numbers which can transition or animate using a technique called number tweening or number morphing.
CountdownLabel7.2 0.0 L3 THLabel VS CountdownLabelSimple countdown UILabel with morphing animation, and some useful function.
GlitchLabel6.9 0.0 L4 THLabel VS GlitchLabelG..lit...c...hing UILa..bel fo..r iO...S :tv:
Preloader.Ophiuchus6.9 0.0 L5 THLabel VS Preloader.OphiuchusCustom Label to apply animations on whole text or letters.
ResponsiveLabel4.0 0.0 L4 THLabel VS ResponsiveLabelA UILabel subclass to highlight patterns
TriLabelView3.3 0.0 L5 THLabel VS TriLabelViewA triangle shaped corner label view for iOS written in Swift.
STULabel2.8 0.0 THLabel VS STULabelA faster and more flexible label view for iOS
MTLLinkLabel2.7 0.0 L5 THLabel VS MTLLinkLabelMTLLinkLabel is linkable UILabel. Written in Swift.
IncrementableLabel2.2 0.0 L5 THLabel VS IncrementableLabelIncrementable UILabel for iOS and tvOS
SlidingText1.5 0.0 L4 THLabel VS SlidingTextSwift UIView for sliding text with page indicator
SwiftResponsiveLabel1.4 0.0 L5 THLabel VS SwiftResponsiveLabelA UILabel subclass to highlight patterns
NumericAnimatedLabel1.1 0.0 THLabel VS NumericAnimatedLabelAnimate numeric value while setting new value to label
AnimatedMaskLabel0.7 0.0 THLabel VS AnimatedMaskLabelAnimated Mask Label is a nice gradient animated label. This is an easy way to add a shimmering effect to any view in your app. It is useful as an unobtrusive loading indicator.
JSLabel0.4 0.0 THLabel VS JSLabelA simple designable subclass on UILabel with extra IBDesignable and Blinking features.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of THLabel or a related project?
THLabel is a subclass of UILabel, which additionally allows shadow blur, inner shadow, stroke text and fill gradient.
- iOS 4.0 or higher (below iOS 7.0 is untested though)
- ARC enabled
The easiest way to use THLabel in your app is via CocoaPods.
- Add the following line in the project's Podfile file:
pod 'THLabel', '~> 1.4.0'
- Run the command
pod installfrom the Podfile folder directory.
CoreText.frameworkto your Link Binary with Libraries list.
- Drag these files into your project:
IBDesignable / IBInspectable
There is an
ibdesignable branch, if you're interested in this feature. It has been removed from the
master branch, because IBDesignable and IBInspectable cause problems with CocoaPods, if you're not using
use_frameworks! in your Podfile.
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.
@property CGFloat letterSpacing; @property CGFloat lineSpacing;
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.
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.
@property CGFloat shadowBlur;
Additionally to UILabel's
shadowOffset, you can set a shadow blur to soften the shadow.
@property CGFloat innerShadowBlur; @property CGSize innerShadowOffset; @property UIColor *innerShadowColor;
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.
@property CGFloat strokeSize; @property UIColor *strokeColor; @property THLabelStrokePosition strokePosition;
You can set an outer, centered or inner stroke by setting the
strokePosition property. Default value is
THLabelStrokePositionOutside. Other options are
@property UIColor *gradientStartColor; @property UIColor *gradientEndColor; @property NSArray *gradientColors; @property CGPoint gradientStartPoint; @property CGPoint gradientEndPoint;
The gradient can consist of multiple colors, which have to be saved as UIColor objects in the
gradientColors array. For more convenience,
gradientEndColor will fill up the array accordingly.
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).
@property THLabelFadeTruncatingMode fadeTruncatingMode;
You can fade in/out your label by setting the
fadeTruncatingMode property. Default value is
THLabelFadeTruncatingModeNone. The options are
Text Insets / Padding
@property UIEdgeInsets textInsets; @property BOOL automaticallyAdjustTextInsets;
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
YES, which is also the default value.
THLabel respects (unlike UILabel) the
contentMode property, which is used for vertical alignment. The
textAlignment still has the higher priority, when it comes to horizontal alignment.
However THLabel doesn't respect the
numberOfLines property, because Core Text doesn't support it natively. If you would like to have multiple lines, set
THLabels are slower to draw than UILabels, so be aware of that.
Original source and inspiration from:
- FXLabel by Nick Lockwood, https://github.com/nicklockwood/FXLabel
- KSLabel by Kai Schweiger, https://github.com/vigorouscoding/KSLabel
- GTMFadeTruncatingLabel by Google, https://github.com/google/google-toolbox-for-mac/tree/master/iPhone
Big thanks to Jason Miller for showing me sample code of his implementation using Core Text! It inspired me to dig deeper and move away from drawing with NSAttributedString on iOS 7, which caused a lot of problems.
Distributed under the permissive zlib license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the THLabel README section above are relevant to that project's source code only.