-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
FRHyperLabel *label = self.lblTermsAndPrivacyPolicy;
label.numberOfLines = 0;
NSString *string = @"By continuing you indicate that you have read and agree to the Terms Of Service and Privacy Policy";
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.alignment= NSTextAlignmentCenter;
NSDictionary *attributes ;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
attributes = @{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont fontWithName:@"Helvetica" size:20],NSParagraphStyleAttributeName:style};
}
else
{
attributes = @{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName:font13,NSParagraphStyleAttributeName:style,NSUnderlineStyleAttributeName:[NSNumber numberWithInt:NSUnderlineStyleNone]};
}
label.attributedText = [[NSAttributedString alloc]initWithString:string attributes:attributes];
// [label setLinkAttributeDefault:attributes];
//Step 2: Define a selection handler block
void(^handler)(FRHyperLabel *label, NSString *substring) = ^(FRHyperLabel *label, NSString *substring){
NSLog(@"%@",substring);
};
//Step 3: Add link substrings
[label setLinksForSubstrings:@[@"Privacy Policy",@"Terms Of Service"] withLinkHandler:handler];
i have written this code, still not working
Metadata
Metadata
Assignees
Labels
No labels
