UIpopovercontroller 使用 Arrowdirectionup 显示在错误的位置
我处于一个奇怪的情况,问题是我显示了一个 UIpopovercontroller,其中包含一个日期选择器和一个完成按钮。但是当我用 arrowdirectionup 显示这个时,它默认从我用 x=0 和 y=0 测试它的地方得到 Y 方向,然后 x 正在工作,但 Y 仍然得到值,我不知道为什么它不工作。
如果将箭头方向更改为向下、向右或向左,则它会显示在右侧给定位置,例如 0,0。
datePopOver = [[UIPopoverController alloc] initWithContentViewController:datePopoverView];
[datePopOver setPopoverContentSize:CGSizeMake(307, 247)];
[datePopOver presentPopoverFromRect:CGRectMake(0, 0, 307, 247) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
I am in a strange situation the problem is that i am showing a UIpopovercontroller which contains a datepicker and a done button. But when i show this with arrowdirectionup then it get by default Y direction from some where i tested it with x=0 and y=0 then x is working but the Y is still get value i dont know why it not working.
And if change the arrowdirection to down, right or left then it displayed at the right given position like 0,0.
datePopOver = [[UIPopoverController alloc] initWithContentViewController:datePopoverView];
[datePopOver setPopoverContentSize:CGSizeMake(307, 247)];
[datePopOver presentPopoverFromRect:CGRectMake(0, 0, 307, 247) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论