UILabel drop-in replacement supporting Hashtags

Overview

ActiveLabel.swift Carthage compatible Build Status

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

Features

  • Swift 5.0 (1.1.0+) and 4.2 (1.0.1)
  • Default support for Hashtags, Mentions, Links, Emails
  • Support for custom types via regex
  • Ability to enable highlighting only for the desired types
  • Ability to trim urls
  • Super easy to use and lightweight
  • Works as UILabel drop-in replacement
  • Well tested and documented

Install (iOS 10+)

Carthage

Add the following to your Cartfile and follow these instructions

github "optonaut/ActiveLabel.swift"

CocoaPods

CocoaPods 0.36 adds supports for Swift and embedded frameworks. To integrate ActiveLabel into your project add the following to your Podfile:

platform :ios, '10.0'
use_frameworks!

pod 'ActiveLabel'

Usage

import ActiveLabel

let label = ActiveLabel()
label.numberOfLines = 0
label.enabledTypes = [.mention, .hashtag, .url, .email]
label.text = "This is a post with #hashtags and a @userhandle."
label.textColor = .black
label.handleHashtagTap { hashtag in
    print("Success. You just tapped the \(hashtag) hashtag")
}

Custom types

let customType = ActiveType.custom(pattern: "\\swith\\b") //Regex that looks for "with"
label.enabledTypes = [.mention, .hashtag, .url, .email, customType]
label.text = "This is a post with #hashtags and a @userhandle."
label.customColor[customType] = UIColor.purple
label.customSelectedColor[customType] = UIColor.green
label.handleCustomTap(for: customType) { element in
    print("Custom type tapped: \(element)")
}

Enable/disable highlighting

By default, an ActiveLabel instance has the following configuration

label.enabledTypes = [.mention, .hashtag, .url, .email]

But feel free to enable/disable to fit your requirements

Batched customization

When using ActiveLabel, it is recommended to use the customize(block:) method to customize it. The reason is that ActiveLabel is reacting to each property that you set. So if you set 3 properties, the textContainer is refreshed 3 times.

When using customize(block:), you can group all the customizations on the label, that way ActiveLabel is only going to refresh the textContainer once.

Example:

label.customize { label in
    label.text = "This is a post with #multiple #hashtags and a @userhandle."
    label.textColor = UIColor(red: 102.0/255, green: 117.0/255, blue: 127.0/255, alpha: 1)
    label.hashtagColor = UIColor(red: 85.0/255, green: 172.0/255, blue: 238.0/255, alpha: 1)
    label.mentionColor = UIColor(red: 238.0/255, green: 85.0/255, blue: 96.0/255, alpha: 1)
    label.URLColor = UIColor(red: 85.0/255, green: 238.0/255, blue: 151.0/255, alpha: 1)
    label.handleMentionTap { self.alert("Mention", message: $0) }
    label.handleHashtagTap { self.alert("Hashtag", message: $0) }
    label.handleURLTap { self.alert("URL", message: $0.absoluteString) }
}

Trim long urls

You have the possiblity to set the maximum lenght a url can have;

label.urlMaximumLength = 30

From now on, a url that's bigger than that, will be trimmed.

https://afancyurl.com/whatever -> https://afancyurl.com/wh...

API

mentionColor: UIColor = .blueColor()
mentionSelectedColor: UIColor?
hashtagColor: UIColor = .blueColor()
hashtagSelectedColor: UIColor?
URLColor: UIColor = .blueColor()
URLSelectedColor: UIColor?
customColor: [ActiveType : UIColor]
customSelectedColor: [ActiveType : UIColor]
lineSpacing: Float?
handleMentionTap: (String) -> ()
label.handleMentionTap { userHandle in print("\(userHandle) tapped") }
handleHashtagTap: (String) -> ()
label.handleHashtagTap { hashtag in print("\(hashtag) tapped") }
handleURLTap: (NSURL) -> ()
label.handleURLTap { url in UIApplication.shared.openURL(url) }
handleEmailTap: (String) -> ()
label.handleEmailTap { email in print("\(email) tapped") }
handleCustomTap(for type: ActiveType, handler: (String) -> ())
label.handleCustomTap(for: customType) { element in print("\(element) tapped") }
filterHashtag: (String) -> Bool
label.filterHashtag { hashtag in validHashtags.contains(hashtag) }
filterMention: (String) -> Bool
label.filterMention { mention in validMentions.contains(mention) }

Alternatives

Before writing ActiveLabel we've tried a lot of the following alternatives but weren't quite satisfied with the quality level or ease of usage, so we decided to contribute our own solution.

  • TTTAttributedLabel (ObjC) - A drop-in replacement for UILabel that supports attributes, data detectors, links, and more
  • STTweetLabel (ObjC) - A UILabel with #hashtag @handle and links tappable
  • AMAttributedHighlightLabel (ObjC) - A UILabel subclass with mention/hashtag/link highlighting
  • KILabel (ObjC) - A simple to use drop in replacement for UILabel for iOS 7 and above that highlights links such as URLs, twitter style usernames and hashtags and makes them touchable
Comments
  • Usernames with periods are not fully highlighted

    Usernames with periods are not fully highlighted

    Would it be possible to expand the search for usernames to include ones that have periods in them, such as my name "@alex.figueroa"? It is currently being highlighted only until the period. (It seems Github does this with their markdown too 😅)

    activelabelscreenshot

    opened by ajfigueroa 23
  • xcode 8 has problem to use ActiveLabel 0.6.2

    xcode 8 has problem to use ActiveLabel 0.6.2

    Hi I'm using the storyboard.

    I got an error like this.

    file:///Users/test_ios9/test/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for FeedVC (EIx-SL-E27): dlopen(ActiveLabel.framework, 1): Symbol not found: __TMPVs19DictionaryGenerator Referenced from: ActiveLabel.framework Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib in ActiveLabel.framework

    Anyone know about this problem?

    My Xcode version is 8 and I had convert to swift 2.3.

    opened by ShawnBaek 20
  • Partially working on Custom UITableViewCell

    Partially working on Custom UITableViewCell

    Handle functions are not working until scrolling the tableview. While scrolling handle functions are working for a moment. It's hard to describe but, cell is on Storyboard. It has single UILabel and constraints, using system-regular font and it's multiline.

    Do you know anything about this issue?

    By the way, it is working on clean UITableView. Unfortunately it is not possible to start making the tableview from the beginning.

    Than you in advance.

    opened by fatihyildizhan 14
  • Not clickable in  table view cell :(

    Not clickable in table view cell :(

        func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
            let cell = tableView.dequeueReusableCell(withIdentifier: "commonCommentCell", for: indexPath) as! CommonCommentTableViewCell
            cell.getData(userPhotoUrl: self.commentList[indexPath.section].userThumbnailUrl!, userName: self.commentList[indexPath.section].userName!, message: self.commentList[indexPath.section].content!, date: self.commentList[indexPath.section].crtm!)
            cell.contentView.backgroundColor = UIColor.white
            cell.layer.cornerRadius = 5.0
            cell.layoutMargins.top = 15
            /*cell.optionsButton.accessibilityHint = String(describing: self.commentList[indexPath.section].id!)
            cell.optionsButton.accessibilityLabel = String(describing: self.commentList[indexPath.section].isOwner!)
            cell.optionsButton.accessibilityValue = "\(indexPath.section)"
            cell.optionsButton.isUserInteractionEnabled = true
            let optionButtonTapGesture : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openOptions(_:)))
            cell.optionsButton.addGestureRecognizer(optionButtonTapGesture)
            */
            //cell.selectionStyle = UITableViewCellSelectionStyle.none
            
            cell.messageLabel.enabledTypes = [.mention, .hashtag]
            cell.messageLabel.hashtagColor = UIColor(r: 78, g: 194, b: 205)
            cell.messageLabel.mentionColor = UIColor(r: 78, g: 194, b: 205)
            
            cell.messageLabel.handleMentionTap { (str) in
                print("NOT WORKING")
            }
            
            cell.messageLabel.handleURLTap { (str) in
                print("NOT WORKING")
            }
            
            return cell
        }
    

    its not working do you know why it is happening ?

    opened by alkincakiralar1996 13
  • Remove Parts of detected String

    Remove Parts of detected String

    Hi, I successfully modified the detection String for my needs to match @userName:userId;

    Where would I best modify the lib to cutoff :userId; during rendering, but keep the original object intact? Optionally also just cutting down to username would be fine ^^

    opened by longbowww 12
  • IB Designables: Failed to render and update auto layout status

    IB Designables: Failed to render and update auto layout status

    Hello! I use ActiveLabel in IB and I get this error

     IB Designables: Failed to render and update auto layout status for RegisterMainViewController (Ovd-Ud-K0B): dlopen(ActiveLabel.framework, 1): no suitable image found.  Did find:
    	ActiveLabel.framework: required code signature missing for 'ActiveLabel.framework'
    
    opened by alexanderkhitev 11
  • Opened up a function configureLinkAttribute to allow fully customizable NSAttributedString

    Opened up a function configureLinkAttribute to allow fully customizable NSAttributedString

    Allows full customization of customTap by opening up the NSAttributedString configuration in a callback

    I, personally, needed this to bold the username at the start of a comment label and this seemed like the best, easiest, and most flexible solution

    Somewhat helps #97 and #118

    Example below simply sets the username at the beginning of the label to a bold system font of size 14

    let customType = ActiveType.custom(pattern: "^\(username)\\b")
    lblComment.enabledTypes = [.mention, .hashtag, .url, customType]
    
    lblComment.configureLinkAttribute = { (type, attributes, isSelected) in
        var atts = attributes
        switch type {
        case .custom:
            atts[NSFontAttributeName] = isSelected ? UIFont.boldSystemFontOfSize(16) : UIFont.boldSystemFontOfSize(14)
        default: ()
        }
    
        return atts
    }
    
    lblComment.handleCustomTap(for: customType) { element in
        print("Custom type tapped: \(element)")
    }
    
    opened by joshdholtz 11
  • It seems that handle taps do not work 0.3.7

    It seems that handle taps do not work 0.3.7

    Thank you guys! It's the best what I've seen! So I'm not sure but it seems like handles do not work in 0.3.7. I downloaded and compiled source code folder 0.3.7 and 0.3.6. In 0.3.6 handleMentionTap, handleHashtagTap, handleURLTap working as expected. In 0.3.7 they don't work.

    opened by ghost 11
  • Improve table view performance

    Improve table view performance

    :tophat: What? Why?

    As pointed out in #27 , when using ActiveLabel inside a cell, the whole customisation process that is behind any change on it, makes the table to drop a lot of frames. The customisation ActiveLabel is doing on every change is expensive, so the intention is to try to reduce the cost of every change.

    :warning: Disclaimer: This PR has a huge refactor, so has to be treated carefully before merging

    Things covered:

    • Changed towards a tableView Demo This change may not be the better option as a the example project, so considering changing it back to the current example.. 🤔

      • [x] Revert to previous Example
    • Rethought way to extract elements from the label text: Previously the way ActiveLabel was searching for ActiveElements was by iterating through all the words the label had, and then passing a Regex individually to each one of them to see if they were ActiveElements or not. Now the Regex Parser is passing the Regex to the whole text at once. And extracting elements based in specific Regex for each ActiveType

      • [x] Added RegexParser whose only responsibility is to manage Regex related things
      • [x] Added ActiveBuilder. Taking advantage of the RegexParser creates ActiveElements
      • [x] Removed top level functions that were passing a regex to each work
    • Changed Way to Test Previously, the way ActiveElement was checking things was by checking if an String was satisfying the requirements to be an specific ActiveType. This way of testing has been broken with the refactor, so the new way the tests are working now is by passing a text to an ActiveLabel and expect that it to contain X amount of active elements, and check the string and type of it.

      • [x] Change Tests
      • [x] Add more Tests
    • Perform only necessary things when changing variables At the moment, each time the user sets a property (overridden & custom) we are executing updateTextStorage(). This is expensive, and could be a bottleneck.

      • [x] Avoid calling updateTextStorage() if possible when changing a prop
    • Regex is now detecting # and @ in the middle of words That should not occur :no_entry:

      • [x] Avoid detecting # and @ in the middle of words ( Closes #9 )
    • Move urlDetector to use regex: I've been looking for a correct URL Regex, and I've came across with this page: https://mathiasbynens.be/demo/url-regex. The option I've chosen is the one purposed by @krijnhoetmer, and I've tweaked it a bit

      • [x] Use regex for the urlDetector

      :warning: Dropped support for detecting urls like google.com. Maintaining support for old school www.google.com

    📈 DATA

    This table reflects the necessary time to customise a cell changing text and textAlignment when calling cellForRow:

    | Necessary time (s) | Before | After | | :-: | :-: | --- | | First iteration | 0.015 - 0.020 | 0.002 - 0.003 | | Going async | 0.015 - 0.020 | 0.0005 - 0.0007 |

    In some cases 10x less time :scream:

    :open_mouth: IMPORTANT:

    Even that this PR reduces the label reuse cost, it is not completely solving the issue

    :ghost: GIF

    enhancement 
    opened by polqf 10
  • NSRangeException

    NSRangeException

    Hi Johannes, thanks for ActiveLabel - nice work!

    I notice that when using ActiveLabel in a CollectionView and scrolling up or down, I sometimes get the following error:

    *** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'

    This has also been documented in another UILabel github lib (Obj-C), here:

    https://github.com/SebastienThiebaud/STTweetLabel/issues/55

    The bug is hard to reproduce, but it has happened multiple times. It doesn't appear to be associated with the speed of scrolling or anything else I can reproduce, but as I mentioned, it has happened multiple times now, and it does seem related to ActiveLabel. Sorry I can't be of more help.

    opened by gloparco 10
  • Events & Scroll conflict revisited

    Events & Scroll conflict revisited

    Hello it's me again :)

    I noticed some unwanted behavior when integrating ActiveLabel in UICollectionViewCell instances. There were 2 problems:

    • Tapping on a URL (or mention or hashtag) would call urlTapHandler, but would immediately trigger the - collectionView:didSelectItemAtIndexPath: delegate method - which can cause unwanted side effects - such as pushing a new ViewController etc.
    • Starting touches on a URL (or mention or hashtag), then scrolling the collection view up / down would not stop urlTapHandler from firing when the touches end (because the touch is always on the label while scrolling), even when UICollectionView has canCancelContentTouches turned on. This is very unpleasant and different from how - say - UIButton works in a UICollectionViewCell.

    I know the changes that caused these are related to #3 - To be fair same problems demonstrated in the video can also occur while using a UIButton in a TableView/CollectionView as well - when canCancelContentTouches and delaysContentTouches are set incorrectly.

    I chose to solve these problems by overriding more UIGestureRecognizerDelegate methods - and have our UILongPressGestureRecognizer fail when the user scrolls.

    I'm working on a single case scenario with ActiveLabel, so I'm not 100% sure (but pretty sure) if this will not break things for anyone.

    Please just let me know if you don't want to merge this, so I can switch to using my own fork in the project.

    Thank you

    opened by kaandedeoglu 10
  • Tap Label outside of tags and mentions

    Tap Label outside of tags and mentions

    I am able to tap on tags and mention but I also want a function to tap on label part except tags and mentions or whatever other detections are there. Is it possible? So, make all label clickable with different kind of taps.

    opened by BhavinBhadani 0
  • Add padding to LabelView in swiftui does not work.

    Add padding to LabelView in swiftui does not work.

    I'm attempting to add padding to the label to present the run off as shown below. Here's how I'm calling the view within SwiftUI

    SUILabel(text: tweet.text, preferredMaxLayoutWidth : UIScreen.main.bounds.width - 50)
                            .fixedSize(horizontal: false, vertical: true)
    

    image

    Here's the code I'm using,

    struct SUILabel: UIViewRepresentable {
        @Environment(\.openURL) var openURL
    
        let text: String
    
        var preferredMaxLayoutWidth: CGFloat = UIScreen.main.bounds.width - 50
        func makeUIView(context: UIViewRepresentableContext<SUILabel>) -> UILabel {
            let label = ActiveLabel()
            label.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 25)
            label.numberOfLines = 10
            label.enabledTypes = [.mention, .hashtag, .url]
            label.hashtagColor = .systemBlue
            label.mentionColor = .systemBlue
            label.URLColor = .systemBlue
            label.text = text
            label.textColor = UITraitCollection().userInterfaceStyle == .light ? .black : .white
            label.preferredMaxLayoutWidth = UIScreen.main.bounds.width
            label.contentMode = .scaleAspectFill
    
            // MARK: - handle types
    
            label.handleHashtagTap { hashtag in
                print("Success. You just tapped the \(hashtag) hashtag")
                openURL(URL(string: "https://twitter.com/hashtag/\(hashtag)")!)
            }
            label.handleURLTap { url in
                openURL(url)
            }
            label.handleMentionTap { handle in
                openURL(URL(string: "https://twitter.com/\(handle)")!)
            }
            return label
        }
    
    
        func updateUIView(_ uiView: UILabel, context: UIViewRepresentableContext<SUILabel>) { }
    }
    
    opened by arbyruns 0
  • configureLinkAttribute 点击后无效

    configureLinkAttribute 点击后无效

    lab.configureLinkAttribute = { type, attributes, isSelected in var atts = attributes switch type { case privacyType, agreementType: atts[NSAttributedString.Key.font] = isSelected ? kxFontMedium(12) : kxFont(12) default: break } return atts } isSelected == true时设置为粗体字, isSelected == false时设置为常规体, 但是点击之后就全部变成常规体了,粗体设置无效

    opened by xygkevin 0
  • string have mention username without space it is not working

    string have mention username without space it is not working

    Simulator Screen Shot - iPhone 13 mini - 2022-04-14 at 01 16 16 if the Uploading Simulator Screen Shot - iPhone 13 mini - 2022-04-14 at 01.16.16.png… the string has a username without space mention is not working, I attach a screenshot for reference. I want @niravtest also clickable like @hitman_007 shown in the screenshot.

    opened by niravpadhiyar09 0
Releases(1.1.5)
  • 1.1.5(Nov 15, 2020)

    • Fixed intrinsicContentSize size calculation thanks to @lancheg https://github.com/optonaut/ActiveLabel.swift/pull/313
    • Added email support based on the URL link thanks to @mehulmodihb https://github.com/optonaut/ActiveLabel.swift/pull/354
    • Added in missing cases for new UITouchPhases, iOS 13.4 thanks to @casperson https://github.com/optonaut/ActiveLabel.swift/pull/360
    • Adjust the height to zero when there's no text set thanks to @filipealva https://github.com/optonaut/ActiveLabel.swift/pull/367
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(May 13, 2019)

    • Support for building with Xcode 10.2 and Swift 5.0
    • Thanks to everyone who contributed to this version and made it possible with their pull requests
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Oct 9, 2018)

    • Support for building with Xcode 10 and Swift 4.2. This version requires Xcode 10 or later with Swift 4.2 compiler.
    • Special thanks @fumiyasac, @derHowie, @BalestraPatrick, and @cruisediary for their pull requests and commits which made this release possible.
    • For using Swift 4.0 or older versions please use ActiveLabel.swift version 0.9.0
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Jun 11, 2018)

  • 0.8.1(Jan 10, 2018)

  • 0.7.1(Jan 24, 2017)

    • Regex caching (Sorry for that 🙏 https://github.com/optonaut/ActiveLabel.swift/commit/a23081d3d18e3f17f82206670d428f03acb6afd6) https://github.com/optonaut/ActiveLabel.swift/issues/114
    • Different font for mention, highlight and URLs (#117) Thanks @Abdul-Moiz
    • Improvements in minimum cell height (#95) Thanks @demonar
    • Create configureLinkAttribute to be able to customize links (#128) Thanks @joshdholtz
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Oct 14, 2016)

  • 0.6.2(Sep 5, 2016)

  • 0.6.1(Aug 25, 2016)

  • 0.6.0(Jul 29, 2016)

    Allow custom patterns highlighting via regex

    The ability to allow custom regex patterns to highlight text has been highly demanded. Now it is available since #98

    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jun 12, 2016)

    😁 This version includes a lot of bug fixes 😁

    FEATURES:

    • Mention and hashtag filtering (#61) - @krjackso

    FIXES:

    • Autolayout issues (#77, #85) - @Econa77 & @nxtstep
    • Clear text when setting empty string (#81) - @Econa77
    • Display text on uncustomized label (#74) - @Econa77
    • Spacing issues (#75, #76) - @Econa77
    • Selected colors not applied appropriately (#65) - @robtimp
    • Fixed wrong URL detection (#69) - @wowbroforce
    • Add support for accent/diacritics (#59) - @lastMove
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Mar 21, 2016)

  • 0.4.2(Mar 11, 2016)

  • 0.4.1(Feb 17, 2016)

  • 0.4.0(Jan 29, 2016)

    :warning: This version contains a full refactor of the internal logic of the library. (#40)

    . Breaking changes inside:

    • Rethought way to extract elements from the label text
    • Perform only necessary things when changing variables
    • Move urlDetector to use regex

    In a sample code, this is the difference of the necessary time to configure a label.

    | | Before | After | | :-: | :-: | --- | | Necessary time (s) | 0.015 - 0.020 | 0.0005 - 0.0007 |

    Disclaimer: The exact amount of time totally depends on the label changes that you do when customising it, but the important thing is that it is up to 10x less time :scream:

    For more information, please take a look at #40

    Source code(tar.gz)
    Source code(zip)
    ActiveLabel.framework.zip(1.24 MB)
  • 0.3.7(Dec 25, 2015)

Owner
Optonaut
3D Panoramas with your Smartphone
Optonaut
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more

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

TTTAttributedLabel 8.8k Dec 30, 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
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
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
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
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
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
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
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
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
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more

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

TTTAttributedLabel 8.8k Dec 30, 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
An iOS text field that represents tags, hashtags, tokens in general.

WSTagsField An iOS text field that represents tags, hashtags, tokens in general. Usage let tagsField = WSTagsField() tagsField.layoutMargins = UIEdgeI

Whitesmith 1.2k Dec 29, 2022