Skip to content
New issue

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

请问大神,我可以给YYTextBinding绑定的文字上面再帮一个属性吗?比如像userId这种 #163

Closed
Huanhoo opened this issue Feb 18, 2016 · 3 comments

Comments

@Huanhoo
Copy link

Huanhoo commented Feb 18, 2016

就是希望@的人的列表,可以给每个人再绑个userId,最后是个数组,一起给服务器传过去,请大神指点。

@ibireme
Copy link
Owner

ibireme commented Feb 18, 2016

这个,随便加一个自定义的的属性就行啊,比如:

NSMutableAttributedString *text = ...
NSString *MyCustomPropertyName = @"MyCustomPropertyName";
[text yy_setAttribute:MyCustomPropertyName value:@"123321" range:NSMakeRange(10, 5)];

@Huanhoo
Copy link
Author

Huanhoo commented Feb 22, 2016

已经找到替代解决方案了 谢谢啊!

@pingguoilove
Copy link

绑定自定义属性太赞了 @ibireme

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

No branches or pull requests

3 participants