使弹出窗口视图大小正确时遇到问题
当用户单击文本字段时,我显示一个弹出窗口。弹出窗口视图有一个选择器视图,但我在删除视图弹出窗口中的一些空白时遇到了一些麻烦。 它看起来像这样:
我认为我的弹出窗口大小可能是固定的,因为我在以下情况下显示它用户开始编辑文本字段:
[popoverController presentPopoverFromRect:textField.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
关于如何使弹出窗口视图更小或使所有内容都能很好地适应有什么想法吗? 我也尝试过这行代码,但没有成功:
self.contentSizeForViewInPopover=CGSizeMake(360.0,220.0);
提前致谢。
I am displaying a popover when user clicks into text field. The popover view has a picker view but I am having some trouble getting rid of some white space in the view popover .
This is what it looks like:
I think my popover size might be fixed because I display it like this when user begins editing textfield:
[popoverController presentPopoverFromRect:textField.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Any ideas on how to make the popover view smaller or for everything to fit in nicely?
I also played around with this line of code but no success:
self.contentSizeForViewInPopover=CGSizeMake(360.0,220.0);
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定将选择器的原点设置为 {0, 0} 吗?
Are you sure you're setting the picker's origin to {0, 0}?