We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 .
The text was updated successfully, but these errors were encountered:
I also encountered the same problem, seeking solution!
Sorry, something went wrong.
I Have same problem:iOS 9.x can not respond to a click event
In -(NSDictionary*)textAttributesAtPoint:(CGPoint)pt Replace CGPathAddRect(framePath, NULL, xxx) with: CGPathAddRect(framePath, NULL, CGRectInset(CGRectMake(0, 0, self.frame.size.width, self.frame.size.height), -5, -5));
-(NSDictionary*)textAttributesAtPoint:(CGPoint)pt
CGPathAddRect(framePath, NULL, xxx)
CGPathAddRect(framePath, NULL, CGRectInset(CGRectMake(0, 0, self.frame.size.width, self.frame.size.height), -5, -5));
The path is too small. It is only hotfix, seek better solution.
No branches or pull requests
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 .
The text was updated successfully, but these errors were encountered: