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
19
votes
6 answers

Tapping URL doesn't work in TTTAttributedLabel while there is a UITapGestureRecognizer on its superview

There is container view and a UITapGestureRecognizer on it. And it also has a subview which kind of TTTAttributedLabel. When I remove the gesture recognizer from the container view, the delegate method of TTTAttributedLabelDelegate -…
18
votes
7 answers

Link tap color for TTTAttributedLabel

I am using a TTTAttributedLabel in my project. I have managed to change the default color and underlining for any link that I create by modifying the link attributes. NSArray *pKeys = [[NSArray alloc]…
StudentX
  • 2,506
  • 5
  • 19
  • 28
13
votes
1 answer

how do I detect and make clickable links in a UILabel NOT using UITextView

I am building a chat app and for performance reasons I need to use UILabel's instead of UITextView's to display the chat messages. I have previously used TextView's but with data detection on the scrolling is very slow and choppy. The problem is…
alionthego
  • 8,508
  • 9
  • 52
  • 125
12
votes
6 answers

UILabel: Custom underline color?

I need the text of a UILabel to be black, but have a light gray underline under the text. Is this possible with NSAttributedString or TTTAttributedLabel? Or is custom drawing using Core Graphics needed? CLARIFICATION: I need a specific color text on…
ninjaneer
  • 6,951
  • 8
  • 60
  • 104
9
votes
2 answers

Clickable link in TTTAttributedLabel with Swift

I want to make a UILabel with some text with a click-able links in it. Not links to webpages but to actions like I do with an UIButton. So I used TTTAttributedLabel which is working perfectly with Objective C. Now I want to do the same in Swift, so…
Amit
  • 101
  • 1
  • 1
  • 4
8
votes
5 answers

TTTAttributedLabel Link detecting not work in iOS8 with swift

I want to use TTTAttributedLabel to detect the link of the text in the Label of UITableViewCell, but it doesn't work. I'm using swift with iOS8. below is UITableViewCell code: class StoryTableViewCell: UITableViewCell, TTTAttributedLabelDelegate { …
JeremyWei
  • 93
  • 1
  • 6
7
votes
2 answers

TTTAttributedLabel links are being styled but not clickable

I've been looking into a solution to getting clickable links working. I can get this working when using UITextView + NSAttributedString but it just doesn't autolayout properly when it's a UITableViewCell. Now I've added the TTTAttributedLabel to my…
Mathijs Segers
  • 6,168
  • 9
  • 51
  • 75
7
votes
2 answers

Specify multiple/conditional link colors in TTTAttributedLabel

I've added a link detector to TTTAttributedLabel that identifies @mentions and #hashtags and creates a link at that position in my TTTAttributedLabel instance: - (void)highlightMentionsInString:(NSString *)text withColor:(UIColor *)color…
brandonscript
  • 68,675
  • 32
  • 163
  • 220
5
votes
1 answer

TTTAttributedLabel link font changing when UIAlertView presents

I have a weird problem: I have a TTTAttributedLabel with a link in it: The name "bryan"is the link. When a UIAlertView is presented over this label, the font of the link changes: As you can see the link lost its font size and weight. Has anyone…
bcattle
  • 12,115
  • 6
  • 62
  • 82
4
votes
1 answer

TTTAttributedLabel Truncation Text Issue

I am using TTTAttributedLabel in my Project. All i have a large text which i have to show in uilabel. After certain number of lines, "more" text should be there if text get truncated. All things are working fine but when i am clicking on the…
Aditya
  • 115
  • 3
  • 14
4
votes
1 answer

Incorrect module for custom class in Interface Builder

When I use some custom UI class in Interface Builder from module/frameworks everything work perfect. But if I write extension for this class in my project and set custom class(in Interface Builder), Interface Builder will set module of custom class…
4
votes
1 answer

Displaying HTML Text in UILabel, performance issues. [iPhone SDK, iOS 8, Swift]

I am attempting to display, correctly formatted HTML text in a UILabel and have succeeded with the following code: // Create the html body var attributedHTMLBody = NSAttributedString(data:…
matthew.kempson
  • 1,014
  • 1
  • 12
  • 23
4
votes
1 answer

How to make an HTML anchor as clickable link in TTTAttributedLabel?

I have an ios application which fetch a piece of text from server and display it in a TTTAttributedLabel. The text displayed is stripped from a HTML. E.g. Original HTML

Hello World!

Text display in…
cppcho
  • 319
  • 2
  • 14
4
votes
2 answers

TTTAttributedLabel can detect links,but can't be pressed correctly

I am using TTTAttributedLabel to detect links, here is the code I init the label: - (TTTAttributedLabel *)getLinkLabelWithSize:(CGSize)size text:(NSString *)text{ TTTAttributedLabel *linkLabel; linkLabel = [[TTTAttributedLabel alloc]…
Weizhi
  • 174
  • 4
  • 22
3
votes
1 answer

TTTAttributedLabel clickable truncation token

I have a TTTAttributedLabel and specified a custom attributed truncation token for it: NSAttributedString *atributedTruncationToken = [[[NSAttributedString alloc] initWithString:@" More..." …
Andrey Solovyov
  • 551
  • 7
  • 21
1
2 3 4 5 6