0
我試圖提供一個UIViewController
,其中包含一個UIPopOverController
內的UIWebView
。 問題是,popOverController中的ViewController「行爲」,好像它具有整個屏幕大小,所以我得到滾動指標和滾動而不是它只是「投降」到容器大小。UIPopoverController內容顯示過大
有什麼建議嗎?
NSMutableArray *filesArr = AppDelegate.appContentManager.filesArray;
BIDContent *cellContent = ((BIDContent *)[filesArr objectAtIndex:indexPath.row]);
BIDPreviewPopupViewController *popUpContent = [self.storyboard instantiateViewControllerWithIdentifier:@"previewPopup"];
popUpContent.pageContent = cellContent;
_popOverDisplay = [[UIPopoverController alloc] initWithContentViewController:popUpContent];
[_popOverDisplay setPopoverContentSize:CGSizeMake(self.view.frame.size.width/2.0, self.view.frame.size.height/2.0)];
popUpContent.view.frame = CGRectMake(0, 0, _popOverDisplay.popoverContentSize.width, _popOverDisplay.popoverContentSize.height);
[_popOverDisplay presentPopoverFromRect:[tableView cellForRowAtIndexPath:indexPath].frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:TRUE];