-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
@property(strong, nonatomic) IBOutlet MDHTMLLabel *customMessageLabel;
_customMessageLabel.delegate = self;
_customMessageLabel.numberOfLines = 3;
[_customMessageLabel sizeToFit];
_customMessageLabel.verticalAlignment = MDHTMLLabelVerticalAlignmentCenter;
_customMessageLabel.linkAttributes = @{ NSForegroundColorAttributeName: [UIColor blueColor],
NSFontAttributeName: [UIFont boldSystemFontOfSize:_customMessageLabel.font.pointSize],
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle) };
_customMessageLabel.activeLinkAttributes = @{ NSForegroundColorAttributeName: [UIColor redColor],
NSFontAttributeName: [UIFont boldSystemFontOfSize:_customMessageLabel.font.pointSize],
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle) };
_customMessageLabel.htmlText = @"Welcome to clickable link clickable link - <a href='http://store.apple.com'>link to apple store</a> <a href='http://www.google.com'>link to google</a> <a href='http://www.yahoo.com'>link to yahoo</a> <a href='https://github.com/honcheng/RTLabel'>link to RTLabel in GitHub</a> <a href='http://www.wiki.com'>link to wiki.com website</a> NSAttributtedString have a property string and it is read only property you can not change it NSAttributtedString have a property string and it is read only property you can not change it NSAttributtedString have a property string and it is read only property you can not change it";
_customMessageLabel.truncationTokenString = @"...More";
_customMessageLabel.truncationTokenStringAttributes = @{
NSForegroundColorAttributeName:[UIColor redColor],
NSFontAttributeName:_customMessageLabel.font,
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle),
NSLinkAttributeName: [NSURL URLWithString:@"http://more.com"]
};
Link :StackOverFlow
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels