Closed kimi0421 closed 8 years ago
So I just add two AMTagListView? and using [[AMTagView appearance] setTextPadding:CGPointMake(14, 14)] like that to have different properties?
If you set a property on the appearance proxy, the next object of that class that you instantiate will have those properties. If you want to have different properties you can set the properties directly on the instantiated object, something like:
self.otherTagView.textPadding = CGPointMake(10, 10);
I see, thank you so much
:+1:
But the problem is I found there is no such properties
You can see it's not working.
Oh right, my bad, the text padding is a property of AMTagView
.
Ok, in that case you should probably set the text padding on the appearance proxy just before adding the tag in the appropriate list view
So you mean I can add two kinds of text padding on the appearance proxy?
You need to switch them when needed. Before adding a tag to the first view, set it to the padding you need, and the same for the second. I know it's not super intuitive.
I see, let me try, Thank you so much
By the way, setting the properties before adding the tag does not work, the appearance of all tags will always be the last appearance you did. So If i change the background color of a tag before adding and change it again to add a new one, all tag will have the background color of the last one set.
Sure, I see no problem in that.