White horizontal line in middle of the tag
wimbledon opened this issue · 20 comments
Hi @wimbledon
Can you provide more info? The demo project seems to run fine, are you using any custom value in the tag appearance? Can you reproduce the issue in the demo project?
The way I'm using the AMTagListView is putting it into a UITableViewCell's contentView. I tried to do this in the demo project to repro the issue, but the problem did not repro.
Here is my code for the tag cell:
https://gist.github.com/wimbledon/8878e53bde892f9c6d3d
Can you checkout the latest commit? I have a feeling that your problem might be fixed by this pull request #9
I have checked with latest commit, but the issue still persist.... :(
Ok, got it. It happens when the height is not an integer.
I'll fix it right away.
Checkout commit b6924e2 for the fix
@andreamazz I tried b6924e2 for the fix, but it did not resolve the issue for me...
What height needed to be integer?
Uhm, weird. I'm referring to the tag's height (that gets computed by the library itself).
I was able to reproduce your issue by forcing a non integer height (something like 20.5f
), and now i round it up in the library.
You mean the self.tagsList.contentSize.height?
Hmm. This is driving me crazy!
could the problem be in AMTagView's drawRect function where /2 should be replaced by /2.0 to make sure there is no rounding issue?
I made another attempt in commit 22bdb7b.
Let me know
Thanks. The new commit did not change anything.
However, I noticed that the commit b6924e2 did have some improvement. In the sense that for some AMTagViewLists, there was no white line. However, for the other cases, there was thinner white line.
David
Can you nslog the tag's height received by addTag:
?
I nslogged the tag's height, it's always 32.000000 even for the cases with no white line, thin white line and thick white line.
I see. I have to try and draw the tag with just one bezier path to avoid this. I'll keep you posted.
Ok, I'm feeling confident, checkout commit 4db36ed.
I trashed the code that was creating the hole in the tag as a mask. That should do the trick
Yes! It worked!!! Thank you!
👍