I am trying to set up a popover to point to a UIButton in a view that is used as a "inputView" to a UITextView. I can get everything to work and the correct data is going into the UIPopoverController. But it is exhibiting a behavior that is not what I expected. So here is what I have. The following method is written in a UIView subclass that is the inputView of the UITextView and is also the view in which the button resides.
- (IBAction)buttonTouchDown:(id)sender {
UIButton *button = (UIButton *)sender;
MyPopoverContentController *controller = [[MyPopoverContentController alloc] initWithNibName:@"MyNib" bundle:nil];
[controller setContentSizeForViewInPopover:CGSize(320.0, 304.0)];
self.popupController = [[UIPopupController all] initWithContentViewController:controller];
[self.popupController presentPopoverFromRect:[button frame] inView:self permittedArrowDirectoions:UIPopoverArrowDirectionDown animated:YES];
}
Now, I would expect the popover to float over the inputView and the pointer would touch the button I've placed into the view. But it does not. In the 'X' origin the popover point is correct. But it appears the UIView when acting as a input view it won't allow the popover to move down over the inputView to the UIButton. Am I overlooking something?
Thanks for any help, Rob