andreamazz/AMTagListView

How can I increase the height of each tag view?

goelv opened this issue · 12 comments

goelv commented

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?

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

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

What about increasing textPadding?

goelv commented

@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?

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:
#41 (comment)

goelv commented

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:

#41 (comment)


Reply to this email directly or view it on GitHub
#41 (comment)
.

goelv commented

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!

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

Ok, pushed version 0.9.0

goelv commented

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

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

goelv commented

hey @andreamazz sorry about the delay!.

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

Closing this issue, thanks soo much.