Radius takes over Padding
Joshua4550 opened this issue · comments
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.
I got exactly the same problem ;(
Can someone fix it please ?
Thanks guys :)
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
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.
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:
While
popTipView.cornerRadius = 10;
popTipView.sidePadding = 0;
popTipView.topMargin = 0;
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
I think we talk here about different paddings.
- padding from the screen where the balloon should appear. (this is what sidepadding is doing)
- 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).
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];