Questions tagged [tttattributedlabel]

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

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

Further links:

78 questions
1
vote
1 answer

TTTAttributedLabel:Crash-tapping on link. [NSConcreteAttributedString reverseObjectEnumerator]: unrecognized selector sent to instance 0x8eb7f60'

Working on a chat application. Using TTTAttributedLabel in my custom Cell. So that i can detect links. I implemented that code in my custom cell. self.tttAttributedLabel=[[TTTAttributedLabel alloc] init]; self.tttAttributedLabel.font =…
Gagan Joshi
  • 3,347
  • 2
  • 21
  • 32
1
vote
1 answer

how to set background color of range in TTTAtributedLabel

Can't figure out how to set the background color of a range to make it look like a highlighter The yellow color below does not show up as the background color NSArray *keys = [[NSArray alloc]…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
1
vote
2 answers

How to apply custom font to TTTAttributedLabel

I am using TTTAttributedLabel in my project . And am trying to apply custom font for that label . #define DEFAULT_FONT(s) [UIFont fontWithName:MY_FONT_NAME size:s] I used the below code to set font : @property(nonatomic, strong)…
Vinodh
  • 5,262
  • 4
  • 38
  • 68
0
votes
2 answers

TTTAttributedLabel links not clickable after adding a UITapGestureRcognizer on the label

I have a TTTAttributedLabel to detect the URLs contained in my label, and now I also want to detect @menions. To do so, I've added a UITapGestureRecognizer to the label and on each tap I'm checking if the tapped word starts with @, etc. My custom…
Lucas P.
  • 4,282
  • 4
  • 29
  • 50
0
votes
2 answers

TTTAttributedLabel link's foregroundColor didn't show correctly

I want to match all the MarkDown URLs in the label,so I used TTTAttributedLabel.It's work perfect except the foregroundColor did not show correctly. Here is all my code: import UIKit import TTTAttributedLabel import SnapKit class…
无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
0
votes
1 answer

How to use UITableView and NSLink together in Swift iOS?

Extension Code: extension String { func accentTagAndLink(tags:Array) -> NSMutableAttributedString { let attributedString:NSMutableAttributedString = NSMutableAttributedString(string: self) var NSContents = self as NSString …
Adam
  • 325
  • 1
  • 4
  • 20
0
votes
1 answer

In TTTAttributedLabel two different text color not working

I am using TTTAttributedLabel and set text like "text with #tag and www.example.com". My need is set redColor for "www.example.com" and greenColor for "#tag". But it set blue color. Following is my code: [label setText:@"text with #tag and…
Chirag Kothiya
  • 955
  • 5
  • 12
  • 28
0
votes
1 answer

Natural alignment TTTAttributedLabel for Right Aligned Languages

I'm using TTTAttributedLabel in my applications, now when I tried to add Right aligned languages, I encountered an issue that it doesn't support natural alignment for RTL, text is left aligned for RTL too, any suggestions?
Zubair
  • 915
  • 2
  • 9
  • 28
0
votes
0 answers

"Unrecognized selector sent to instance" when selecting text

I am trying to select and than copy text displayed using the TTTAttributedLabel library. I created the CopyableLabel class to make the TTTAttributedLabel copyable, like when you want to make a UILabel copyable. This works fine but it do not allow to…
kjj8
  • 1
  • 1
0
votes
0 answers

Some attributes have no effect on TTTAttributedLabel

Some attributes have no effect on TTTAttributedLabel, is this a known issue or limitation? let attributedString = NSAttributedString(string: plainText, attributes: attributes) attributedLabel.setText(attributedString) the attributes var contains…
johnnyMac
  • 381
  • 2
  • 14
0
votes
1 answer

Unable to use TTTAttributedLabel framework

I am using TTTAttributedLabel to make UILabel hyperlink, I am trying to do this as below: NSAttributedString *attString = [[NSAttributedString alloc] initWithString:@"By tapping you agree to the Terms of Use and Privacy Policy." …
Uzair Dhada
  • 333
  • 2
  • 6
  • 23
0
votes
1 answer

Adding/Appending Attributed text to label in Swift 3 - iOS

Im trying to add attributed text infront of label at upper right position in swift 3 like [PDF] in picture shown My requirement is... I have a picker view which has text values with list of countries..when a value is selected, I need to show that…
Ashh
  • 569
  • 1
  • 6
  • 28
0
votes
0 answers

Module map not found

I have installed pod File, but in issue this frame work. Any solution? Error: unable to read module map contents from 'Target Support Files/TTTAttributedLabel/TTTAttributedLabel.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file …
0
votes
1 answer

setEnabledTextCheckingTypes unrecognized selector sent to instance

I'm trying to use TTTAttributedLabel from this repo: https://github.com/TTTAttributedLabel/TTTAttributedLabel I have an IBOutlet: @IBOutlet weak var label: TTTAttributedLabel! And when I try to add a link to the label using the code example…
pableiros
  • 14,932
  • 12
  • 99
  • 105
0
votes
2 answers

TTTAttributedLabel link is styled and has UILongPressGestureRecognizer but doesn't have UITapGestureRecognizer

In my project I've added TTTAttributedLabel to a view in IB and added a link to it. I've looked through similar questions on SO (like this and this), but no luck. It displays properly, link is styled as expected. But…
NKorotkov
  • 3,591
  • 1
  • 24
  • 38