andreamazz / AMTagListView

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

How can I increase the height of each tag view? #41

Closed goelv closed 9 years ago

goelv commented 9 years ago

I would like to increase the height of each tag in the taglistview..

one way would be to increase the font size, but I would like to keep the font size at 12points but have the height be 30points.. any idea?

andreamazz commented 9 years ago

HI @goelv You can increase the padding of the text of the tag view: https://github.com/andreamazz/AMTagListView/blob/master/Source/AMTagView.h#L32-L48

goelv commented 9 years ago

hi @andreamazz

This is what I have currently: [[AMTagView appearance] setTagLength:0]; [[AMTagView appearance] setTextPadding:10]; [[AMTagView appearance] setTextFont:[UIFont fontWithName:@"Roboto-Regular" size:12]]; [[AMTagView appearance] setHoleRadius:0.0]; [[AMTagView appearance] setInnerTagColor:[UIColor colorWithRed:87.0f/255.0f green:72.0f/255.f blue:98.0f/255.f alpha:1.0]]; [[AMTagView appearance] setTagColor:[UIColor colorWithRed:38.0f/255.0f green:30.0f/255.f blue:44.0f/255.f alpha:1.0f]]; [[AMTagView appearance] setInnerTagPadding:1.0f]; [[AMTagView appearance] setRadius:4.0f];

If I increase the 'setInnerTagPadding' from 1.0f to say 5.0f, the border simply gets thicker. I don't want to border to be thicker..

screen shot 2015-09-28 at 2 00 47 pm

With inner tag padding to be 5.0f: screen shot 2015-09-28 at 2 03 26 pm

andreamazz commented 9 years ago

What about increasing textPadding?

goelv commented 9 years ago

@andreamazz That helps.. but it increases the padding vertically and horizontally by the same amount. Is it possible to have distinct padding values for the vertical spacing & horizontal spacing?

andreamazz commented 9 years ago

Sure, I'll see if I can add it tomorrow

On Mon, Sep 28, 2015 at 11:07 PM, Varun Goel notifications@github.com wrote:

That helps.. but it increases the padding vertically and horizontally by the same amount. Is it possible to have distinct padding values for the vertical spacing & horizontal spacing?

Reply to this email directly or view it on GitHub: https://github.com/andreamazz/AMTagListView/issues/41#issuecomment-143874586

goelv commented 9 years ago

Great, thanks a lot!

On Mon, Sep 28, 2015 at 2:15 PM, Andrea Mazzini notifications@github.com wrote:

Sure, I'll see if I can add it tomorrow

On Mon, Sep 28, 2015 at 11:07 PM, Varun Goel notifications@github.com wrote:

That helps.. but it increases the padding vertically and horizontally by the same amount. Is it possible to have distinct padding values for the

vertical spacing & horizontal spacing?

Reply to this email directly or view it on GitHub:

https://github.com/andreamazz/AMTagListView/issues/41#issuecomment-143874586

— Reply to this email directly or view it on GitHub https://github.com/andreamazz/AMTagListView/issues/41#issuecomment-143876564 .

goelv commented 9 years ago

hey @andreamazz just wondering if you are still going to be able to make the change which would allow the padding to have distinct values for vertical padding and horizontal padding.

Thanks!

andreamazz commented 9 years ago

Hi @goelv Checkout the latest commit, I changed textPadding from a float to a CGPoint. Set the y value to increase the vertical padding. I need to fix the test suite before pushing a new pod, in the meantime you can use:

pod 'AMTagListView', :head
andreamazz commented 9 years ago

Ok, pushed version 0.9.0

goelv commented 9 years ago

Great! thanks a lot @andreamazz I will check this out this afternoon.

andreamazz commented 9 years ago

Hi @goelv Did it work ok? Can I close the issue?

goelv commented 9 years ago

hey @andreamazz sorry about the delay!.

I updated the pod today, and it worked like a charm!

Closing this issue, thanks soo much.