Some PopTip views do not resize properly
SamB2B opened this issue · comments
Good question. Can you post the code you use to create the views? Or share an example project that shows the problem?
if (element == 1) {
CMPopTipView *popTip = [[CMPopTipView alloc] initWithTitle:@"Start Here" message:@"Create a new calculation"];
popTip.delegate = self;
popTip.backgroundColor = [UIColor clearColor];
popTip.textColor = [UIColor whiteColor];
popTip.has3DStyle = NO;
[popTip presentPointingAtView:self.calculationButton inView:self.view animated:YES];
self.calculateTip = popTip;
}
else if (element == 2) {
CMPopTipView *popTip = [[CMPopTipView alloc] initWithTitle:@"Add your calculation to the log" message:@"Tap here"];
popTip.delegate = self;
popTip.backgroundColor = [UIColor clearColor];
popTip.textColor = [UIColor whiteColor];
popTip.has3DStyle = NO;
[popTip presentPointingAtView:self.addtoLogButton inView:self.view animated:YES];
self.addToLogTip = popTip;
}
else if (element == 3) {
CMPopTipView *popTip = [[CMPopTipView alloc] initWithTitle:@"View your calculations" message:@"Tap here"];
popTip.delegate = self;
popTip.backgroundColor = [UIColor clearColor];
popTip.textColor = [UIColor whiteColor];
popTip.has3DStyle = NO;
[popTip presentPointingAtView:self.viewLogButton inView:self.view animated:YES];
self.viewLogTip = popTip;
}
Can i fix it or should I look elsewhere?
Did you have a look at fixing it? Free & open source software is developed by volunteers.
Looks like the width wasn't taking the title into account. I have pushed a fix.
Yeah I had a look through the code, I do now see that the title wasn't taken into account and after I tested a bit more I discovered that if the title is longer than the message its doesn't resize properly.
Thank-you for the fix, its much appreciated.