Skip to content

Link does not appear on iOS version 10.3 but the same code works on iOS 11.0 or later. #36

@rahulbluemark

Description

@rahulbluemark

Link does NOT appear on iOS version 10.3 but the same code works on iOS 11.0 or later.

Here my code snippet:

NSString *string1 = @"Hi I am Rahul Varma";
            NSDictionary *attributes1 = @{NSForegroundColorAttributeName: [UIColor blackColor],NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleTitle1]};
            
            _hyperLabel.attributedText = [[NSAttributedString alloc]initWithString:string1 attributes:attributes1];
            self.hyperLabel.text = string1;
            
            void(^handler)(FRHyperLabel *label, NSString *substring) = ^(FRHyperLabel *label, NSString *substring){
                //Action taken here    
            };
            
            //Step 3: Add link substrings
            [self.hyperLabel setLinksForSubstrings:self.arrLinks withLinkHandler:handler];

Please help!

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