我想使两个方向的UIPopoverController
大小等于IPad屏幕的大小。怎么做?
答案 0 :(得分:0)
CGRect popoverRect = [self.view convertRect:[btn frame]
fromView:[btn superview]];
popoverRect.size.width = self.view.frame.size.width;
popoverRect.origin.x = popoverRect.origin.x+150;
popoverRect.size.height = self.view.frame.size.width;
[self.popoverController
presentPopoverFromRect:popoverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionLeft
animated:YES];
答案 1 :(得分:0)
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.contentSizeForViewInPopover = CGSizeMake(width,height);}
这是在视图中设置的,您必须在弹出控制器中设置