Simple: A view, i present a UIPopoverController in a CGRect using presentPopoverFromRect... and neither the arrow or the popover frame appear even near to the coordinates i asked for in the rect i passed into. Any clues? I've been trying to figure out this by myself but am giving up. Here is the code:
if(!myContentController){
myContentController = [[MyContentController alloc] initWithNibName:myNibName bundle:[NSBundle mainBundle]];
// This works pretty well. actually when i show the popover
// i see everything inside as it's supposed to.
}
if(!popover){
popover = [[UIPopoverController alloc] initWithContentViewController:myContentController];
}
else{
[popover setContentController:myContentController];
}
popover.delegate = self;
CGPoint touchPointInView = [self touchPoint];//This is working fine too.I've been checking with NSLog.
popover.ContentSize = myPopoverSize;//In this case {320,480}
[popover presentPopoverFromRect:CGRectMake(touchPoint.x,touchPoint.y,myPopoverSize.width,myPopverSize.height)
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
What happens next? the popover doesn't shows where it should be. If i pass {0,0} it shows in the middle of the screen as if the view size were (768,512). I checked all the view dimensions and they are all ok, frame,bounds, etc... . Does anyone knows what am i doing wrong?