Skip to content

How to get "...More" action ? #51

@yalamandarao

Description

@yalamandarao

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions