Open SirSai opened 1 year ago
[messageAttribute yy_setTextHighlightRange:[msg rangeOfString:redMsg] color:[UIColor colorConvertFromString:@"#999999"] backgroundColor:[UIColor clearColor] tapAction:^(UIView _Nonnull containerView, NSAttributedString _Nonnull text, NSRange range, CGRect rect) { [weakSelf sendOrderGuide]; }]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleAlert]; [alert setValue:messageAttribute forKey:@"attributedMessage"];
创建一个 UIAlertController 使用 attributedMessage 给 UIAlertController 设置msg 点击事件无响应
[messageAttribute yy_setTextHighlightRange:[msg rangeOfString:redMsg] color:[UIColor colorConvertFromString:@"#999999"] backgroundColor:[UIColor clearColor] tapAction:^(UIView _Nonnull containerView, NSAttributedString _Nonnull text, NSRange range, CGRect rect) { [weakSelf sendOrderGuide]; }]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleAlert]; [alert setValue:messageAttribute forKey:@"attributedMessage"];
创建一个 UIAlertController 使用 attributedMessage 给 UIAlertController 设置msg 点击事件无响应