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

Why does not display when clicking on? #126

Open
yuzhongxingke opened this issue Sep 21, 2016 · 0 comments
Open

Why does not display when clicking on? #126

yuzhongxingke opened this issue Sep 21, 2016 · 0 comments

Comments

@yuzhongxingke
Copy link

-(IBAction)popover:(id)sender
{
//NSLog(@"popover retain count: %d",[popover retainCount]);

// SAFE_ARC_RELEASE(popover); popover=nil;

//the controller we want to present as a popover
DemoTableController *controller = [[DemoTableController alloc] initWithStyle:UITableViewStylePlain];
controller.delegate = self;
popover = [[FPPopoverKeyboardResponsiveController alloc] initWithViewController:controller];
popover.tint = FPPopoverDefaultTint;

// popover.keyboardHeight = _keyboardHeight;

if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
    popover.contentSize = CGSizeMake(300, 500);
}
else {
    popover.contentSize = CGSizeMake(200, 300);
}
if(sender == transparentPopover)
{
    popover.alpha = 0.5;
}

if(sender == _noArrow) {
    //no arrow
    popover.arrowDirection = FPPopoverNoArrow;
    [popover presentPopoverFromPoint: CGPointMake(self.view.center.x, self.view.center.y - popover.contentSize.height/2)];
}
else {
    //sender is the UIButton view
    popover.arrowDirection = FPPopoverArrowDirectionAny;
    [popover presentPopoverFromView:sender];
}

}

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