A drop-in replacement for UILabel that supports attributes, data detectors, links, and more

Overview

TTTAttributedLabel

Circle CI Version Status codecov license MIT Platform Carthage compatible

A drop-in replacement for UILabel that supports attributes, data detectors, links, and more

TTTAttributedLabel is a drop-in replacement for UILabel providing a simple way to performantly render attributed strings. As a bonus, it also supports link embedding, both automatically with NSTextCheckingTypes and manually by specifying a range for a URL, address, phone number, event, or transit information.

Even though UILabel received support for NSAttributedString in iOS 6, TTTAttributedLabel has several unique features:

  • Automatic data detection
  • Manual link embedding
  • Label style inheritance for attributed strings
  • Custom styling for links within the label
  • Long-press gestures in addition to tap gestures for links

It also includes advanced paragraph style properties:

  • attributedTruncationToken
  • firstLineIndent
  • highlightedShadowRadius
  • highlightedShadowOffset
  • highlightedShadowColor
  • lineHeightMultiple
  • lineSpacing
  • minimumLineHeight
  • maximumLineHeight
  • shadowRadius
  • textInsets
  • verticalAlignment

Requirements

  • iOS 8+ / tvOS 9+
  • Xcode 7+

Accessibility

As of version 1.10.0, TTTAttributedLabel supports VoiceOver through the UIAccessibilityElement protocol. Each link can be individually selected, with an accessibilityLabel equal to its string value, and a corresponding accessibilityValue for URL, phone number, and date links. Developers who wish to change this behavior or provide custom values should create a subclass and override accessibilityElements.

Communication

  • If you need help, use Stack Overflow. (Tag tttattributedlabel)
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

CocoaPods is the recommended method of installing TTTAttributedLabel. Simply add the following line to your Podfile:

# Podfile

pod 'TTTAttributedLabel'

Usage

TTTAttributedLabel can display both plain and attributed text: just pass an NSString or NSAttributedString to the setText: setter. Never assign to the attributedText property.

// NSAttributedString

TTTAttributedLabel *attributedLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];

NSAttributedString *attString = [[NSAttributedString alloc] initWithString:@"Tom Bombadil"
                                                                attributes:@{
        (id)kCTForegroundColorAttributeName : (id)[UIColor redColor].CGColor,
        NSFontAttributeName : [UIFont boldSystemFontOfSize:16],
        NSKernAttributeName : [NSNull null],
        (id)kTTTBackgroundFillColorAttributeName : (id)[UIColor greenColor].CGColor
}];

// The attributed string is directly set, without inheriting any other text
// properties of the label.
attributedLabel.text = attString;
// NSString

TTTAttributedLabel *label = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];
label.font = [UIFont systemFontOfSize:14];
label.textColor = [UIColor darkGrayColor];
label.lineBreakMode = NSLineBreakByWordWrapping;
label.numberOfLines = 0;

// If you're using a simple `NSString` for your text,
// assign to the `text` property last so it can inherit other label properties.
NSString *text = @"Lorem ipsum dolor sit amet";
[label setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^ NSMutableAttributedString *(NSMutableAttributedString *mutableAttributedString) {
  NSRange boldRange = [[mutableAttributedString string] rangeOfString:@"ipsum dolor" options:NSCaseInsensitiveSearch];
  NSRange strikeRange = [[mutableAttributedString string] rangeOfString:@"sit amet" options:NSCaseInsensitiveSearch];

  // Core Text APIs use C functions without a direct bridge to UIFont. See Apple's "Core Text Programming Guide" to learn how to configure string attributes.
  UIFont *boldSystemFont = [UIFont boldSystemFontOfSize:14];
  CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)boldSystemFont.fontName, boldSystemFont.pointSize, NULL);
  if (font) {
    [mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font range:boldRange];
    [mutableAttributedString addAttribute:kTTTStrikeOutAttributeName value:@YES range:strikeRange];
    CFRelease(font);
  }

  return mutableAttributedString;
}];

First, we create and configure the label, the same way you would instantiate UILabel. Any text properties that are set on the label are inherited as the base attributes when using the -setText:afterInheritingLabelAttributesAndConfiguringWithBlock: method. In this example, the substring "ipsum dolar", would appear in bold, such that the label would read "Lorem ipsum dolar sit amet", in size 14 Helvetica, with a dark gray color.

IBDesignable

TTTAttributedLabel includes IBInspectable and IB_DESIGNABLE annotations to enable configuring the label inside Interface Builder. However, if you see these warnings when building...

IB Designables: Failed to update auto layout status: Failed to load designables from path (null)
IB Designables: Failed to render instance of TTTAttributedLabel: Failed to load designables from path (null)

...then you are likely using TTTAttributedLabel as a static library, which does not support IB annotations. Some workarounds include:

  • Install TTTAttributedLabel as a dynamic framework using CocoaPods with use_frameworks! in your Podfile, or with Carthage
  • Install TTTAttributedLabel by dragging its source files to your project

Links and Data Detection

In addition to supporting rich text, TTTAttributedLabel can automatically detect links for dates, addresses, URLs, phone numbers, transit information, and allows you to embed your own links.

label.enabledTextCheckingTypes = NSTextCheckingTypeLink; // Automatically detect links when the label text is subsequently changed
label.delegate = self; // Delegate methods are called when the user taps on a link (see `TTTAttributedLabelDelegate` protocol)

label.text = @"Fork me on GitHub! (https://github.com/mattt/TTTAttributedLabel/)"; // Repository URL will be automatically detected and linked

NSRange range = [label.text rangeOfString:@"me"];
[label addLinkToURL:[NSURL URLWithString:@"http://github.com/mattt/"] withRange:range]; // Embedding a custom link in a substring

Demo

pod try TTTAttributedLabel

...or clone this repo and build and run/test the Espressos project in Xcode to see TTTAttributedLabel in action. If you don't have CocoaPods installed, grab it with [sudo] gem install cocoapods.

cd Example
pod install
open Espressos.xcworkspace

License

TTTAttributedLabel is available under the MIT license. See the LICENSE file for more info.

Comments
  • Unable to tap hyperlink

    Unable to tap hyperlink

    The label is not tappable as a hyperlink. I am creating the label inside a custom UITableViewCell using the following piece of code.

    messageLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];

    messageLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:(NSString *)kCTUnderlineStyleAttributeName];

    messageLabel.dataDetectorTypes = UIDataDetectorTypeLink;

    messageLabel.userInteractionEnabled = YES;

    I have implemented the delegate method like this:

    • (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url { NSLog(@"links on uilabel work"); }

    Also there are no gesture recognizers on the view.

    opened by sanketfirodiya 45
  • Usage in IB gives error messages but app works

    Usage in IB gives error messages but app works

    Hi, I tried to use this library/component for its link-ability. I added it as a Pod. This works without problems.

    One of my projects needs to have touchable words in a UILabel. The view hosting this UILabel is designed in a xib.

    I tried to set the Class of the UILabel to TTTAttributedLabel, because it seems to support IB_DESIGNABLE and the respective Inspectables.

    The Inspectable attributes appear in the attributes inspector and the app compiles and runs fine.

    I just have nasty error message which I dont quiet get:

    screen shot 2014-11-21 at 12 37 54 screen shot 2014-11-21 at 12 38 35

    They seem just to be about the component to fail being renderable inside Interface Builder. If thats the case, how to disable these errors? If its more than that I would appreciate help to get rid of them.

    Thanks in advance.

    opened by aiQon 39
  • Request for Comment: Drop support for iOS 4, 5, and 6

    Request for Comment: Drop support for iOS 4, 5, and 6

    I'm considering dropping support for iOS 4, 5, and 6.

    This would allow:

    • a shorter, more readable, more maintainable code base, bereft of compile and runtime checks for old symbol names and features
    • modern Objective-C syntax

    The current version would still exist on a separate branch.

    While long-running backwards compatibility has been a hallmark of TTTAttributedLabel for some time, as @galambalazs points out, it may be mostly an academic exercise.

    • Does anyone use TTTAttributedLabel in apps which support large numbers of iOS 4, 5, and 6 users? If so, can you share your data?
    • One possible improvement with this change would be to delegate all drawing to UILabel, which would mostly end discrepancies between its appearance and this library's. This would remove some of the custom drawing features too. How would people feel about that?

    I'll let this issue sit here for 4-6 weeks before moving forward.

    opened by getaaron 37
  • Fixes zero size issue when using an attributedTruncationToken.

    Fixes zero size issue when using an attributedTruncationToken.

    Fixes sizeThatFits issue where the size returned was (0, 0) when using an attributedTruncationToken.

    Addresses: #621 and #678.

    I added a unit test to demonstrate the issue and its resolution. You can run the test from commit [2be9753] to see the size being returned as (0, 0). Re-run the test with commit [b82d006] to see the test pass.

    opened by dillan 29
  • feature request: NSTextAttachment

    feature request: NSTextAttachment

    As mentioned in #447, TTTAttributedLabel does not support NSTextAttachment. This was surprising, and undesirable.

    This is a feature request for NSTextAttachment support.

    enhancement 
    opened by ghazel 23
  • Bug when adding link to truncation attributed string

    Bug when adding link to truncation attributed string

    The link attributed isn't added to the attributed truncation token correctly.

    - (void)viewDidLoad {
        [super viewDidLoad];
    
        NSString *text = @"The NSString class declares the programmatic interface for an object that manages immutable strings. An immutable string is a text string that is defined when it is created and subsequently cannot be changed. NSString is implemented to represent an array of Unicode characters, in other words, a text string.";
        for (int i = 0; i < 10; i++) {
            TTTAttributedLabel *l1 = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(10, 10*(i+1) + (i * 50) + 10, self.view.bounds.size.width - (i +1)*20, 50)];
            l1.delegate = self;
            l1.userInteractionEnabled = YES;
            l1.numberOfLines = 2;
            l1.attributedTruncationToken = [[NSAttributedString alloc] initWithString:@"...more" attributes:@{NSForegroundColorAttributeName : [UIColor blueColor],
                                                                                                              NSLinkAttributeName : [NSURL URLWithString:@"http://more.com"]}];
    //        l1.backgroundColor = [UIColor redColor];
            l1.text = text;
            [self.view addSubview:l1];
            l1.layer.borderColor = [UIColor redColor].CGColor;
            l1.layer.borderWidth = 2;
        }
    
    }
    - (void)attributedLabel:(TTTAttributedLabel *)label
       didSelectLinkWithURL:(NSURL *)url {
        NSLog(@"Here");
    }
    

    Notice that the link underlines are also not placed in the correct locations

    screen shot 2015-04-13 at 3 20 40 pm

    opened by avnerbarr 22
  • Emoji renders incorrectly

    Emoji renders incorrectly

    Hi, I've been trying to replace UILabel with TTTAttributedLabel so I can lankily URLS, I came across a weird edge-case involving emoji, I don't know if its indicative of a "larger problem", but might be worth looking at.

    background: This is a tableview in which the cells contains a UILabel, in

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    

    I calculate the height of the cell using the following:

    
                    CGSize requiredSize = [text sizeWithFont:[UIFont fontWithName:@"American Typewriter" size:17]
                                           constrainedToSize:CGSizeMake(POST_WIDTH, CGFLOAT_MAX)
                                               lineBreakMode:UILineBreakModeWordWrap];
    
                    return 30 + requiredSize.height + 10;
    

    (30 for the header + the required label height + 10 for the footer).

    This works fine for UILabel and TTTAttributedLabel as long as they're displaying "plain text". As soon as the text contains an emoji the UILabel continues to render correctly, however the TTAttributedLabel no longer renders anything! (i.e. the TTTAttributedLabel view is completely "empty" as if nothing was rendered into it).

    If I change the +10 to +16 (i.e to add an extra 6 pixels to the label) the text then renders properly, except with extra whitespace.

    Initial investigation shows that the text is being rendered differently (some screenshots):

    UILabel: uilabel

    TTTAttributedLabel uilabel

    Notice how the Emoji is rendered vertically centred on the UILabel, but baseline on the TTTAttributedLabel?

    I don't have a solution just yet - I'll report back any findings but I wanted to log the issue incase you already know how to fix it!

    opened by tonymillion 19
  • Only one heavy NSDataDetector instance per type (combination)

    Only one heavy NSDataDetector instance per type (combination)

    NSDataDetector is very heavyweight and it’s unnecessary to create a separate instance for every single Label. One detector can deal with a specific type (combination) and so we can just store them in a dictionary.

    This way all Labels using the same data detection type share the same detector instance.

    opened by gblazex 17
  • Create TTTAttributedLabelLink class, and use it to manage default/active/inactive link state and accessibility values for non-default link types

    Create TTTAttributedLabelLink class, and use it to manage default/active/inactive link state and accessibility values for non-default link types

    • Create TTTAttributedLabelLink class, and use it to manage default/active/inactive link state and accessibility values for non-default link types
    • Updates example project to compile properly with this new class
    • Update documentation
    opened by getaaron 16
  • New Version?

    New Version?

    Last version update was June 15, 2015. Looks like there's been quite a bit of work since then, including bug fixes, could a new version be added please?

    opened by rex-remind101 14
  • Invalid range selection for set up links

    Invalid range selection for set up links

    I'm trying to set links on a string with specific range.

    Here's the example: My string looks like this:

    H started tic tac toe event

    (which is joining of these three strings, H + started + tic tac toe event)

    I'm setting links on H and tic tac toe event. With following range.

    2015-02-06 11:40:34.210 Event[5968:38268] {0, 2} --> This is for first string i.e. H 2015-02-06 11:40:35.305 Event[5968:38268] {11, 17} --> This is for last string i.e.tic tac toe event

    However when I touch on it, - (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url would call even if I touched on started word on the label. It should only call if I'll tap on H or tic tac toe event.

    What's wrong? Please help.

    opened by hemangshah 14
  • Second link not accessible when VoiceOver is enabled.

    Second link not accessible when VoiceOver is enabled.

    iPhone 12 mini iOS 15.2.1

    Steps to repro:

    1. Configure a TTTAttributedLabel with an NSAttributedString.
    2. Add 2 links to the text.
    3. Make sure the font of the attributed string wraps the text onto a second line.
    4. Enable VoiceOver.

    Expected: Both links are accessible via VoiceOver. Actual: Only the first link is accessible via VoiceOver.


    To test you can create a single view app with a Storyboard and replace the ViewController code with the following:

    Code snippet
    import UIKit
    import TTTAttributedLabel
    import PureLayout
    
    class ViewController: UIViewController, TTTAttributedLabelDelegate {
    
        let labelText = "I have read and understand Foo's Privacy Policy. I accept the Foo Terms of Use."
        let privacyPolicyLinkText = "Privacy Policy"
        let privacyPolicyLinkURL = URL(string: "https://www.privacy.com")!
        let termsLinkText = "Terms of Use"
        let termsLinkURL = URL(string: "https://www.terms.com")!
    
        override func viewDidLoad() {
            super.viewDidLoad()
            view.backgroundColor = .white
    
            let label = TTTAttributedLabel(forAutoLayout: ())
            label.numberOfLines = 0
            label.delegate = self
    
            view.addSubview(label)
            label.autoAlignAxis(toSuperviewAxis: .horizontal)
            label.autoPinEdge(toSuperviewEdge: .leading, withInset: 20)
            label.autoPinEdge(toSuperviewEdge: .trailing, withInset: 20)
    
            let attributedString = NSAttributedString(string: labelText,
                                                      attributes: [
                                                        NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
    
            label.setText(attributedString)
            label.addLink(to: privacyPolicyLinkURL, with: (labelText as NSString).range(of: privacyPolicyLinkText))
            label.addLink(to: termsLinkURL, with: (labelText as NSString).range(of: termsLinkText))
        }
    
        func attributedLabel(_ label: TTTAttributedLabel!, didSelectLinkWith url: URL!) {
            let alert = UIAlertController(title: "Alert",
                                          message: "Tapped link: \(url.absoluteString)",
                                          preferredStyle: .alert)
            let action = UIAlertAction(title: "Ok", style: .default, handler: nil)
            alert.addAction(action)
            present(alert, animated: true, completion: nil)
        }
    }
    

    Here is the Podfile being used. I used PureLayout in addition to TTTAttributedLabel.

    Podfile
    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'AttributedLabelLinkBug' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      pod 'TTTAttributedLabel'
      pod 'PureLayout'
    
      target 'AttributedLabelLinkBugTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
      target 'AttributedLabelLinkBugUITests' do
        # Pods for testing
      end
    
    end
    

    Here is a video of the issue: https://user-images.githubusercontent.com/7491869/151636127-948eec72-c3a4-4452-b698-c1815e6c6bec.mp4

    Notice how the links are clickable when VO is not enabled.


    The technical issue seems to be in the boundingRectForCharacterRange method. boundingRectForGlyphRange does not return the correct CGRect for the second link.

    opened by nservidio 0
  • Using the links with HTML attributed string

    Using the links with HTML attributed string

    Maybe you can add this feature.. Or anybody needs this, can use this..

    First setup your attributed text. Then find the links for each character. Then setup them with addLinkToUrl method.

    NSAttributedString *attrString = [[NSAttributedString alloc] initWithData: 
                                       [text dataUsingEncoding:NSUTF8StringEncoding]   
                                       options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)}
                                        documentAttributes:nil error:nil];
    [label setAttributedText: attrString];
        
    if (label.attributedText != nil && label.attributedText.length > 0) {
        for (int i= 0; i < label.attributedText.length; i++) {
            NSRange range = NSMakeRange(0,1);
            NSDictionary<NSAttributedStringKey,id> *dict = [label.attributedText attributesAtIndex:i effectiveRange:&range];
            if (dict[NSLinkAttributeName] != nil) {
                NSURL *url = dict[NSLinkAttributeName];
                [label addLinkToURL:url withRange:range];
            }
        }
    }
    

    After you do this you will be able to detect link taps with TTTAttributedLabelDelegate

    - (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url {
        if([[UIApplication sharedApplication] canOpenURL:url]) {
            [[UIApplication sharedApplication] openURL:url];
        } 
    }
    

    I also shared this solution in one of the stackoverflow question: https://stackoverflow.com/questions/30872730/detecting-links-in-html-with-changing-positions-in-uilabel-tttattributedlabel/66747280#66747280

    opened by devgokhan 0
  • iOS 13 deprecates certain CTFont calls

    iOS 13 deprecates certain CTFont calls

    Apparently Apple is cracking down!

    2020-04-07 16:32:51.136814-0400 MyApp[94123:1058712] CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
    2020-04-07 16:32:51.136994-0400 MyApp[94123:1058712] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
    

    The result is that the text does indeed show as Times Roman.

    The offending code is in static inline NSAttributedString * NSAttributedStringByScalingFontSize(NSAttributedString *attributedString, CGFloat scale) . There may be other places.

    opened by Permusoft 0
Releases(2.0.0)
  • 2.0.0(May 10, 2016)

    Breaking changes:

    • Change extendsLinkTouchArea default to NO (#551)
    • Bumped the minimum iOS deployment target to 8.0
    • Removed all deprecated methods

    Features:

    • Add NSAttributes support for links (#549)
    • Expose -[TTTAttributedLabel linkAtPoint:] to help with 3D Touch peeking
    • Add tvOS support
    • Addressed all warnings

    Bug fixes:

    • Fix data detector crash when setting text to nil (#546)
    • Fix accessibilityElements' accessibilityFrame attribute (#458)
    • Use CGPathRelease instead of CFRelease
    • Reset framesetter when adjusting size for width (#393)
    • Fix hang due to contention between OS drawing and setText: calls
    Source code(tar.gz)
    Source code(zip)
  • 1.13.4(Jun 15, 2015)

    • Carthage support!
    • Fixed some issues where label width is greater than text width #527
    • Fixed line drawing xOffset #528
    • Accessibility link range sanity checking #533
    • Label sizing considers attributed truncation token, if any #491
    • Marked init initializer as unavailable. Use the designated initializers initWithFrame: and initWithCoder: instead
    • Minor fixes for Xcode 7 warnings
    Source code(tar.gz)
    Source code(zip)
  • 1.13.3(Mar 18, 2015)

  • 1.13.2(Feb 17, 2015)

    • Label links are now managed internally by the new TTTAttributedLabelLink class
    • Improved long-press gesture handling
    • Added extendsLinkTouchArea property to enable (default) or disable the new UIWebView-inspired link touch approximation added in 1.13.1
    Source code(tar.gz)
    Source code(zip)
  • 1.13.1(Jan 20, 2015)

  • 1.13.0(Dec 21, 2014)

Owner
TTTAttributedLabel
TTTAttributedLabel
UILabel drop-in replacement supporting Hashtags

ActiveLabel.swift UILabel drop-in replacement supporting Hashtags (#), Mentions (@), URLs (http://), Emails and custom regex patterns, written in Swif

Optonaut 4.2k Dec 31, 2022
UILabel replacement with fine-grain appear/disappear animation

ZCAnimatedLabel UILabel-like view with easy to extend appear/disappear animation Features Rich text support (with NSAttributedString) Group aniamtion

Chen 2.3k Dec 5, 2022
Simple countdown UILabel with morphing animation, and some useful function.

CountdownLabel Simple countdown UILabel with morphing animation, and some useful function. features Simple creation Easily get status of countdown fro

keishi suzuki 903 Dec 29, 2022
Incrementable UILabel for iOS and tvOS

IncrementableLabel IncrementableLabel is the easiest way to have incrementable numbers in an UILabel! Usage let myIncrementableLabel = IncrementableLa

Tom Baranes 81 Feb 4, 2022
UILabel subclass, which additionally allows shadow blur, inner shadow, stroke text and fill gradient.

THLabel THLabel is a subclass of UILabel, which additionally allows shadow blur, inner shadow, stroke text and fill gradient. Requirements iOS 4.0 or

Tobias Hagemann 654 Nov 27, 2022
A simple designable subclass on UILabel with extra IBDesignable and Blinking features.

JSLabel Demo pod try JSLabel ...or clone this repo and build and run/test the JSLabel project in Xcode to see JSLabel in action. If you don't have Coc

Jogendra 6 May 9, 2022
Glitching UILabel for iOS 📺

Glitching UILabel for iOS ?? Created by Lee Sun-Hyoup. Try the sample $ pod try GlitchLabel Requirements iOS 8.0+ Swift 3 Xcode 8 Installation CocoaP

Lee Sun-Hyoup 1k Dec 14, 2022
KDEDateLabel is an UILabel subclass that updates itself to make time ago's format easier.

KDEDateLabel KDEDateLabel is an UILabel subclass that saves you from refreshing it when using 'time ago' format. Installation You have multiple choice

Kevin Delannoy 117 May 16, 2022
A morphing UILabel subclass written in Swift.

LTMorphingLabel A morphing UILabel subclass written in Swift. The .Scale effect mimicked Apple's QuickType animation of iOS 8 of WWDC 2014. New morphi

Lex Tang 7.9k Jan 4, 2023
UILabel with image placed from left or right

SMIconLabel UILabel with possibility to place small icon on the left or on the right side. Take a look at preview image or build sample app to see how

Anatoliy Voropay 94 Apr 27, 2022
A handy class for iOS to use UILabel as a countdown timer or stopwatch just like in Apple Clock App.

MZTimerLabel Purpose MZTimerLabel is a UILabel subclass, which is a handy way to use UILabel as a countdown timer or stopwatch just like that in Apple

Mines Chan 1.6k Dec 14, 2022
MTLLinkLabel is linkable UILabel. Written in Swift.

# MTLLinkLabel is linkable UILabel. Written in Swift. Requirements iOS 8.0+ Xcode 7.3+ Installation Carthage You can install Carthage with Homebrew. $

Recruit Holdings. Media Technology Lab 74 Jul 1, 2022
Adds animated counting support to UILabel.

UICountingLabel Adds animated counting support to UILabel. CocoaPods UICountingLabel is available on CocoaPods. Add this to your Podfile: pod 'UICount

Tim Gostony 1.9k Dec 1, 2022
Swift TTTAttributedLabel replacement

Nantes ?? This library is a Swift port/fork of the popular Objective-C library TTTAttributedLabel. Much ❤️ and credit goes to Mattt for creating such

Instacart 1k Dec 22, 2022
A faster and more flexible label view for iOS

STULabel is an open source iOS framework for Swift and Objective-C that provides a label view (STULabel), a label layer (STULabelLayer) and a flexible

Stephan Tolksdorf 96 Dec 22, 2022
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Atributika is an easy and painless way to build NSAttributedString. It is able to detect HTML-like tags, links, phone numbers, hashtags, any regex or

Pavel Sharanda 1.1k Dec 26, 2022
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Atributika is an easy and painless way to build NSAttributedString. It is able to detect HTML-like tags, links, phone numbers, hashtags, any regex or

Pavel Sharanda 1.1k Jan 8, 2023
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Pavel Sharanda 1.1k Dec 26, 2022
UILabel drop-in replacement supporting Hashtags

ActiveLabel.swift UILabel drop-in replacement supporting Hashtags (#), Mentions (@), URLs (http://), Emails and custom regex patterns, written in Swif

Optonaut 4.2k Dec 31, 2022
UIViewController drop in replacement with much more customisation

PopupViewController UIAlertController drop in replacement with much more customization You can literally replace UIAlertController by PopupViewControl

Thomas Ricouard 21 Jun 27, 2022