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
make.text([NSString stringWithFormat:@"《隐私协议》",dic1[@"agreementTitle"]]).link(self,@selector(linkHandler:)).color(UIColorBlue).font(pageFontSize).attach();
在点击方法里只有获取到文字没有url,url要怎么赋值
- (void)linkHandler:(NUDAction *)action { if ([action isKindOfClass:[NUDLinkAction class]]) { NUDLinkAction *linkAction = (NUDLinkAction *)action; NSLog(@"%@,%@",linkAction.string,linkAction.url);//打印结果:《隐私条款》,(null) } }
The text was updated successfully, but these errors were encountered:
NUDLinkAction 的 url 字段目前并没有使用,是当初预留的。 如果你要对固定的文字做点击跳转,建议使用更灵活的 tap 方法,具体参照demo 就比如隐私协议 你可以在 linkHandler 里判断如果 string 是 《隐私协议》,就跳转到特定的h5页面中去,链接在方法里写死
- (void)linkHandler:(NUDAction *)action { if ([action isKindOfClass:[NUDLinkAction class]]) { NUDLinkAction *linkAction = (NUDLinkAction *)action; if ([action,string isEqualToString:@"《隐私条款》"]) { // 跳转到 url 如 www.baidu.com } } }
Sorry, something went wrong.
好吧,我目前就是这样做的
No branches or pull requests
在点击方法里只有获取到文字没有url,url要怎么赋值
The text was updated successfully, but these errors were encountered: