Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present WEPopover from UITableViewCell subclass #66

Open
AnthoPakPak opened this issue May 2, 2016 · 0 comments
Open

Present WEPopover from UITableViewCell subclass #66

AnthoPakPak opened this issue May 2, 2016 · 0 comments

Comments

@AnthoPakPak
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant