Skip to content

iOS 9.x can not respond to a click event #4

Description

@hh1myfei

Hello there
I use your code like this :
NSDictionary* style = @{@"body":[UIFont fontWithName:@"HelveticaNeue" size:14],
@"help":[WPAttributedStyleAction styledActionWithAction:^{
UIWebView * callWebview = [[UIWebView alloc] initWithFrame:CGRectZero];
NSString * telNumber = [NSString stringWithFormat:@"tel:%@",_phoneStr];
NSURL * telURL = [NSURL URLWithString:telNumber];
[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
[self.view addSubview:callWebview];
}],
@"settings":[WPAttributedStyleAction styledActionWithAction:^{
NSLog(@"Settings action");
}],
@"link": @[[UIColor colorWithHexString:@"#3193da"],
@{NSUnderlineStyleAttributeName : @(kCTUnderlineStyleSingle|kCTUnderlinePatternSolid)}
]};
NSString * strIntStye = [NSString stringWithFormat:@"%@",_phoneStr];
NSString * finalString = [str stringByReplacingCharactersInRange:strRange withString:strIntStye];
return [finalString attributedStringWithStyleBook:style];

But iOS 9.x which I can only change the label style, but can not respond to a click event.
so would you please fix it .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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