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

それを「rect」引数としてcell.accessoryView.frameに渡すだけです。

于 2012-04-15T15:40:32.533 に答える