1

我有一个我之前编写的函数,用于从条形按钮项中显示一个弹出框,现在我试图重用它来在表格处于编辑模式时显示来自单元格附件的弹出框。

我试过了

[self showPopover:[[theTableView cellForRowAtIndexPath:indexPath] editingAccessoryView]]

但这是 NULL。

最初它设置为[cell setEditingAccessoryType: UITableViewCellAccessoryDetailDisclosureButton];如果这有什么不同。

弹出功能是

-(void) showPopover:(id)sender {
    ...
     [self.popOver presentPopoverFromBarButtonItem:sender 
                             permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}

请有任何想法。

4

1 回答 1

0

如何尝试显示:

- (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated

只需将您的 cell.accessoryView.frame 作为“rect”参数传递给它。

于 2012-04-15T15:40:32.533 回答