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

-(void)presentPopoverFromPoint:(CGPoint)fromPoint doesn't work #11

Closed
ghost opened this issue Jul 28, 2012 · 4 comments
Closed

-(void)presentPopoverFromPoint:(CGPoint)fromPoint doesn't work #11

ghost opened this issue Jul 28, 2012 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2012

As far as i can tell, if i call it directly, _fromView is not getting set and [self bestArrowDirectionAndFrameFromView:_fromView]; in setup view will return 0,0

-(CGRect)bestViewFrameForFromPoint:(CGPoint)point is never getting called

@ghost
Copy link
Author

ghost commented Aug 12, 2012

I've fixed it in my fork. So its not an issue for me personally any longer, but its still issue for everyone else. Not gonna do pull requests cause i've changed some assumption how contentSize is defined and direction of arrows calculation to fit my needs.

@mitevdev
Copy link

mitevdev commented Nov 9, 2012

@avolovoy : Can you share with me your solution so I do not need to do the same again? Thank you.

@ghost
Copy link
Author

ghost commented Nov 9, 2012

@bobozee Just clone my fork from github - i've left it public.

@ghost
Copy link
Author

ghost commented Dec 10, 2012

BTW - this is still not fixed in master - in setupViews there is a call for
[self bestArrowDirectionAndFrameFromView:_fromView]; and in case if you want this from the point - it will crash.
I've added work around in same method
// If we presentFromPoint with _fromView nil will calculate based on self.orgin with 2x2 size.
float width = 2.0f;
float height = 2.0f;
CGPoint p = CGPointMake(self.origin.x, self.origin.y);
if (v != nil) {
p = [v.superview convertPoint:v.frame.origin toView:self.view];
width = v.frame.size.width;
height = v.frame.size.height;
}

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

2 participants