From b06049a5bb2907a48d63076f9a05eebe583b7993 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh Date: Tue, 14 Jun 2022 15:18:08 +0700 Subject: [PATCH] Potential fix for the editor size issue on iPadOS --- Natives/CustomControlsViewController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Natives/CustomControlsViewController.m b/Natives/CustomControlsViewController.m index 8f06e760..6a5d7f6d 100644 --- a/Natives/CustomControlsViewController.m +++ b/Natives/CustomControlsViewController.m @@ -250,7 +250,7 @@ NSMutableArray *keyCodeMap, *keyValueMap; vc.whenItemSelected = handler; vc.modalPresentationStyle = UIModalPresentationPopover; vc.preferredContentSize = CGSizeMake(350, 250); - + UIPopoverPresentationController *popoverController = [vc popoverPresentationController]; popoverController.sourceView = self.view; popoverController.sourceRect = self.selectedPoint; @@ -372,6 +372,7 @@ NSMutableArray *keyCodeMap, *keyValueMap; CCMenuViewController *vc = [[CCMenuViewController alloc] init]; vc.modalPresentationStyle = UIModalPresentationFormSheet; vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + vc.preferredContentSize = self.view.frame.size; if (![self.currentGesture isKindOfClass:[UILongPressGestureRecognizer class]]) { vc.targetButton = (ControlButton *)self.currentGesture.view; }