Hi i created a TTStyledTextLabel, works well.
Now i want to make URL clickable, i've done this:
textLabel.text = [TTStyledText textFromXHTML:[content objectForKey:@"content"] lineBreaks:YES URLs:YES];
but my links are still unclickable. Do i have to setup a UIWebView first? Where to declare it?
Another thing is, is it possible to resize Images inside my TTStyledTextLabel to fit them to the Label Size?
Thanks in advance
// edit
what i have exactly done:
textLabel = [[TTStyledTextLabel alloc] initWithFrame:CGRectMake(0.0f, 70.0f, 320.0f, 297.0f)];
textLabel.contentInset = UIEdgeInsetsMake(20, 15, 20, 15);
textLabel.font = [UIFont systemFontOfSize:14];
textLabel.text = [TTStyledText textFromXHTML:[content objectForKey:@"content"] lineBreaks:YES URLs:YES];
[textLabel sizeToFit];
//CGFloat height = textLabel.height;
[scrollView addSubview:textLabel];
scrollView.contentSize = textLabel.frame.size;
an NSLog of my [content objectForKey:@"content"]
returns something like this:
<a href="http://www.abc.com/">Download-Link</a>
My Links are highlighted in my label, but they are unclickable.
i initialized my textlabel in - (void)viewDidLoad
in a UIViewController