chrismiles/CMPopTipView

Tooltip displayed in wrong position if container has non-zero origin

Opened this issue · 0 comments

If your container view has non-zero origin, e.g.:

opt.view.bounds = CGRectMake(130, 130, 500, 490);

then the tooltip will sometimes be displayed at the wrong position. Fix is to replace this line:

CGFloat W = containerView.bounds.size.width;

with this:

CGFloat right = containerView.bounds.size.width+containerView.bounds.origin.x;

(and replace all occurrences of 'W' with 'right').