Closed anuchandra closed 8 years ago
The reason you're getting 2 tooltips is because you are creating/showing it in cel cellForRowAtIndexPath - this can be called more than once.
That's extremely well spotted and easily fixed. Thanks.
No problem - glad I could help. I'll close this Issue.
I'm getting two tooltips when I should be getting one. I have a tableview which contains a imageview and a contentview. The contentview has a button. I'd like to show the tooltip pointing to the button. The code below tries to do that. Could you point me where I'm going wrong?
(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath )indexPath object:(PFObject )object {
static NSString CellIdentifier = @"Cell";
JKEPFTableViewCell cell = (JKEPFTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[JKEPFTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; }
// Configure the cell ... UIView contentView = (UIView) [cell viewWithTag:105]; JDFTooltipView *tooltip = [[JDFTooltipView alloc] initWithTargetView:cell.shortlistButton hostView:contentView tooltipText:@"Tap to find similar shoes" arrowDirection:JDFTooltipViewArrowDirectionUp width:200.0f]; [tooltip show]; ...
return cell; }