From a4fca52430a54102de6822d1f08c4f31df37bd73 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Sun, 22 Aug 2021 07:28:17 +0700 Subject: [PATCH] Check surfaceRect --- Natives/SurfaceViewController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Natives/SurfaceViewController.m b/Natives/SurfaceViewController.m index 66e5f190..4105e232 100644 --- a/Natives/SurfaceViewController.m +++ b/Natives/SurfaceViewController.m @@ -83,7 +83,10 @@ float resolutionScale; savedWidth = roundf(width * screenScale); savedHeight = roundf(height * screenScale); - self.surfaceView = [[MGLKView alloc] initWithFrame:CGRectMake((width - width * resolutionScale) / 2, (height - height * resolutionScale) / 2, width * resolutionScale, height * resolutionScale)]; + CGRect surfaceRect = CGRectMake((width - width * resolutionScale) / 2, (height - height * resolutionScale) / 2, width * resolutionScale, height * resolutionScale); + NSLog(@"Debug: surfaceRect=%@", surfaceRect); + self.surfaceView = [[MGLKView alloc] initWithFrame:surfaceRect]; + NSLog(@"Debug: surfaceView=%@", self.surfaceView); [self.view addSubview:self.surfaceView]; self.surfaceView.enableSetNeedsDisplay = NO; self.surfaceView.transform = CGAffineTransformMakeScale(1.0 / resolutionScale, 1.0 / resolutionScale);