在 uitableview 中使用 wepopover 的问题
圣诞快乐。
我有一个包含 uitableview 的视图。当选择其中一个表格单元格时,我使用 wepopover 显示附加信息。但是我的问题是,当选择某些单元格时,弹出窗口的一部分显示在视图之外并且不可见。内容大小设置正确,原点也正确。
为了添加弹出窗口,我这样做,其中框架是 uitableview 单元格的框架
detailedInfoView=[[ScheduleDetailedInformation alloc] initWithNibName:@"ScheduleDetailedInformation" bundle:nil];
detailedInfoView.contentSizeForViewInPopover = detailedInfoView.view.frame.size;
navPopover = [[WEPopoverController alloc] initWithContentViewController:detailedInfoView];
[navPopover presentPopoverFromRect:frame
inView:self.tableview
permittedArrowDirections:UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown|UIPopoverArrowDirectionLeft|UIPopoverArrowDirectionAny
animated:YES];
有人可以告诉我我忘记了什么或者可能有解决方法吗?
谢谢
Merry Christmas.
I have a view which contains a uitableview. Iam using wepopover to show aditional info when one of the tablecells are selected. However my issue is when selecting some cells, part of the popover is shown out of the view and is not visible. The content size is set correct and the point of origin is correct as well.
for adding the popover i do this where the frame is the frame of uitableview cell
detailedInfoView=[[ScheduleDetailedInformation alloc] initWithNibName:@"ScheduleDetailedInformation" bundle:nil];
detailedInfoView.contentSizeForViewInPopover = detailedInfoView.view.frame.size;
navPopover = [[WEPopoverController alloc] initWithContentViewController:detailedInfoView];
[navPopover presentPopoverFromRect:frame
inView:self.tableview
permittedArrowDirections:UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown|UIPopoverArrowDirectionLeft|UIPopoverArrowDirectionAny
animated:YES];
Can anyone might tell me what i have forgotten or maybe a workaround?
Thanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,没有人给我提供一个黄金答案。不过我自己已经解决了这个问题。在添加弹出视图之前,我将其添加到 uitableview 中,但这首先造成了问题。相反,我将其添加到父视图中,但这产生了一些定位错误,我用以下代码行解决了这个错误 - 它将 uitableviewcell 的位置转换为父视图中的位置。
希望这可以帮助别人:)
Unfortunately no one has provided me with a golden answer. However I have solved the issue myself. Before when adding the popover view I was adding it to the uitableview, however this created the issue in the first place. Instead I added it to the parent view, however this gave some positioning error which I solved with the following line of code - which converts the position of the uitableviewcell to the position in the parent view.
Hope this can help someone else :)