Skip to content

Present WEPopover from UITableViewCell subclass #66

@AnthoPakPak

Description

@AnthoPakPak

Hi,

First, thanks a lot for your great work.

Here is what I'm trying to achieve :
I have a UITableView with custom cells subclassed. Cells are composed of some buttons that should present WEPopover on touch. The touch action is implemented in the cell's subclass. I would like to allow Up and Down arrow directions as in the Demo project.

I succeeded in presenting the popover but arrow directions seemed to be ignored. Indeed, whatever the space available, it's always the same direction.

Here is the code used in cell's subclass :

[self.likeCommentPopoverController presentPopoverFromRect:self.commentNumberButton.frame inView:self permittedArrowDirections:(UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown) animated:YES];

I tried to present it from tableView but it doesn't work :

CGRect rect = [self.superview.superview convertRect:self.commentNumberButton.frame fromView:self]; [self.likeCommentPopoverController presentPopoverFromRect:rect inView:self.superview.superview permittedArrowDirections:(UIPopoverArrowDirectionUp | UIPopoverArrowDirectionDown) animated:YES];

Have you got an idea to achieve this ?

Thanks a lot.

Anthonin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions