objective-c – 如何使用UIPopoverArrowDirectionRight或UIPopoverArrowDirectionLeft正确呈现来自UITableViewCell的popover

objective-c – 如何使用UIPopoverArrowDirectionRight或UIPopoverArrowDirectionLeft正确呈现来自UITableViewCell的popover,第1张

概述我总是试图提出一个popover从一个单元格在tableView这样的方式: [myPopover presentPopoverFromRect:cell.frame inView:self.tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; 但我不能使用UIPopoverArrowDirecti 我总是试图提出一个popover从一个单元格在tableVIEw这样的方式:

[myPopover presentPopoverFromrect:cell.frame inVIEw:self.tableVIEw permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

但我不能使用UIPopoverArrowDirectionRight或left,因为,根据位置
的ipad(纵向或横向),popover出现在其他地方。

我给popover正确的方式吗?

PS:表视图是在一个splitVIEw的detailVIEw。

解决方法 这里是简单的解决方案,对我很好

- (voID)tableVIEw:(UItableVIEw *)tableVIEw dIDSelectRowAtIndexPath:(NSIndexPath *)indexPath {    UItableVIEwCell *cell = [tableVIEw cellForRowAtIndexPath:indexPath];    CGRect rect=CGRectMake(cell.bounds.origin.x+600,cell.bounds.origin.y+10,50,30);    [popOverController presentPopoverFromrect:rect inVIEw:cell permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];}
总结

以上是内存溢出为你收集整理的objective-c – 如何使用UIPopoverArrowDirectionRight或UIPopoverArrowDirectionLeft正确呈现来自UITableViewCell的popover全部内容,希望文章能够帮你解决objective-c – 如何使用UIPopoverArrowDirectionRight或UIPopoverArrowDirectionLeft正确呈现来自UITableViewCell的popover所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1087436.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存