我的应用程序包含一个用于共享的选项菜单,该菜单在长按UITableViewCell
时显示。如果屏幕上的UITableViewCell
过高,则选项菜单中的箭头会低于UITableViewCell
。有没有办法手动设置箭头方向?
我用来显示选项菜单的代码是:
self.documentInteractionController = UIDocumentInteractionController(URL: fileShareURL)
self.documentInteractionController.delegate = self
self.documentInteractionController.UTI = "public.xml"
self.documentInteractionController.presentOptionsMenuFromRect(self.view.frame, inView: self.view, animated: true)
其中documentInteractionController
被定义为var documentInteractionController: UIDocumentInteractionController!
的类变量,fileShareURL
是指向我想要分享的文件的NSURL
。
答案 0 :(得分:0)
我发现问题不在于UITableViewCell
的位置,而在于我在哪里展示选项菜单。我的代码从屏幕顶部显示选项菜单,而不是从单元格的位置。