Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radius takes over Padding #52

Open
Joshua4550 opened this issue Sep 19, 2013 · 7 comments
Open

Radius takes over Padding #52

Joshua4550 opened this issue Sep 19, 2013 · 7 comments

Comments

@Joshua4550
Copy link

Upon adding these two parameters (just like the demo suggested):
popTipView.cornerRadius = 2.0;
popTipView.sidePadding = 30.0f;

The Radius works fine, however because the radius is so low, the desired padding is ignored (or not taken into consideration properly) as there is still next to no padding. The code given should produce a padded (almost) square bubble, but it gives a non-padded square bubble instead.

Sorry if this was intentional and I've got the wrong end of the stick!

Other than this, this subclass is great - thank you very much for providing it.

@veptune
Copy link

veptune commented Oct 10, 2013

I got exactly the same problem ;(

Can someone fix it please ?

Thanks guys :)

@chrismiles
Copy link
Owner

This looks to be working for me. The attached image is a capture with

popTipView.cornerRadius = 2.0;
popTipView.sidePadding = 30.0f;

The corners are almost square, and the bubbles are positioned away from the edge of the container view (the padding).

Is this not what you are seeing?

2013-10-14 12 16 25 pm

@veptune
Copy link

veptune commented Oct 15, 2013

Hmm ... if i put 30.f as sidePadding i got something but when i want to increase the value let's say 50.f or 80.0f, the padding look the same

@chrismiles
Copy link
Owner

If there is not enough room to apply the padding then it is reduced. The above examples worked for me. They are more visible when the demo is rotated to landscape. In portrait there's not enough room for large side padding values.

@Odelya
Copy link

Odelya commented Oct 29, 2013

Hi Chrismiles and thanks for the component.

I have the same problem with a custom view:

popTipView.cornerRadius = 0;
popTipView.sidePadding = 0;
popTipView.topMargin = 0;
would result like this:
screen shot 2013-10-29 at 5 38 58 pm

While

popTipView.cornerRadius = 10;
popTipView.sidePadding = 0;
popTipView.topMargin = 0;

Would result like this:
screen shot 2013-10-29 at 5 38 39 pm

I would like to have round corners but not padding. This way, the poptip will have round corners and the customview will be "clipped" to have as well

@SjoerdPerfors
Copy link

I think we talk here about different paddings.

  1. padding from the screen where the balloon should appear. (this is what sidepadding is doing)
  2. padding in the balloon where the text should appear. (can we change this?)

After adjusting the cornerRadius my padding in the balloon is adjusted to a lower margin/padding value (point2).

@fawazapp
Copy link

fawazapp commented Jul 4, 2016

this work for me
CMPopTipView *popTipView = [[CMPopTipView alloc] initWithMessage:@"A Message Text"];
popTipView.cornerRadius = 2.0;
popTipView.bubblePaddingY = 5;
popTipView.bubblePaddingX = 5;
popTipView.shouldEnforceCustomViewPadding = YES;
[popTipView presentPointingAtView:ContainerView inView:self.view animated:YES];

Repository owner deleted a comment from devarya Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants