iPad UIPopoverController不会在UITextView中遍历inputView [英] iPad UIPopoverController does not go over inputView in UITextView

查看:57
本文介绍了iPad UIPopoverController不会在UITextView中遍历inputView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置一个弹出窗口以指向视图中的UIButton,该视图用作UITextView的 inputView。我可以使一切正常工作,并且正确的数据正在输入UIPopoverController。但是它表现出的行为不是我所期望的。这就是我所拥有的。下面的方法写在UIView子类中,该子类既是UITextView的inputView,也是按钮所在的视图。

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];
}

现在,我希望弹出框浮动在inputView上,并且指针会触摸我已放入视图的按钮。但事实并非如此。在 X原点中,弹出点是正确的。但是当充当输入视图时,它会显示UIView,不允许弹出窗口向下移到inputView到UIButton上。我在忽略什么吗?

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?

感谢您的帮助,
Rob

Thanks for any help, Rob

推荐答案

我访问此问题已有一段时间了。我把这个交给了苹果,这是一个错误。他们正在努力。

It's been a while since I visited this question. I turned this in to Apple and it is a bug. They are working on it.

这篇关于iPad UIPopoverController不会在UITextView中遍历inputView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆