Created
February 17, 2014 19:53
-
-
Save timothy1ee/9057758 to your computer and use it in GitHub Desktop.
TTTAttributedLabel example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TTTAttributedLabel *label = [[TTTAttributedLabel alloc] initWithFrame:CGRectMake(10, 10, 200, 20)]; | |
label.linkAttributes = | |
@{ (NSString *)kCTForegroundColorAttributeName : [UIColor redColor], | |
(NSString *)kCTUnderlineStyleAttributeName : @(kCTUnderlineStyleNone) }; | |
label.enabledTextCheckingTypes = NSTextCheckingAllTypes; | |
label.text = @"Link to http://google.com"; | |
[self.view addSubview:label]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment