andreamazz / AMTagListView

UIScrollView subclass that allows to add a list of highly customizable tags.
MIT License
758 stars 110 forks source link

Remove Tag and Hole from drawRect when tagLength == 0 #16

Closed rafaelmaroxa closed 10 years ago

rafaelmaroxa commented 10 years ago

I also fixed how the default UIAppearance values were being loaded. That fixes the problem in which I'd have tagLength = 0 but the following code would override it to the default:

float tagLength = [[AMTagView appearance] tagLength] ? [[AMTagView appearance] tagLength] : kDefaultTagLength;

Since I had set [[AMTagView appearance] tagLength] to 0 somewhere in my own code, the ternary if would load the value of kDefaultTagLength when adding a new tag.

andreamazz commented 10 years ago

Thanks for your contribution. I had to fix the alignment of the label when the tag is present, so you might want to checkout the latest version.
Cheers :beers: