Open yuzhongxingke opened 8 years ago
-(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]; }
}
-(IBAction)popover:(id)sender { //NSLog(@"popover retain count: %d",[popover retainCount]);
// SAFE_ARC_RELEASE(popover); popover=nil;
// popover.keyboardHeight = _keyboardHeight;
}