Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPad Orientation issue with Google Maps plugin MyPluginLayer #2908

Open
ksp143 opened this issue Jun 14, 2022 · 0 comments
Open

iPad Orientation issue with Google Maps plugin MyPluginLayer #2908

ksp143 opened this issue Jun 14, 2022 · 0 comments

Comments

@ksp143
Copy link

ksp143 commented Jun 14, 2022

I am facing Touch issue in my Angular Ionic Cordova iOS application, when app launches in landscape mode and changes to portrait after Splash screen is loaded and navigates to next screen.

After changing to Portrait mode, the addition portion at bottom of the screen is not touchable after integrating Google Maps plugin.

Adding few more additional steps:

  • I have set Auto orientation and launching the app in Landscape and then navigates to login screen.
  • In login screen, we have a side menu which contains option to display maps.
  • But when i was in login screen and changing the orientation from landscape to portrait, bottom portion is not clickable as mentioned in image with colour.

Below code is causing the issue for me when auto rotate is enabled.

Screenshot 2022-06-14 at 7 39 33 PM

- (id)initWithWebView:(UIView *)webView {
    self.executeQueue = [NSOperationQueue new];
    self._lockObject = [[NSObject alloc] init];
    self.CACHE_FIND_DOM = [NSMutableDictionary dictionary];

    self = [super initWithFrame:[webView frame]];
    self.webView = webView;
    self.isSuspended = false;
    self.opaque = NO;
    [self.webView removeFromSuperview];
    // prevent webView from bouncing
    if ([self.webView respondsToSelector:@selector(scrollView)]) {
        ((UIScrollView*)[self.webView scrollView]).bounces = NO;
    } else {
        for (id subview in [self.webView subviews]) {
            if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
                ((UIScrollView*)subview).bounces = NO;
            }
        }
    }

    self.pluginScrollView = [[MyPluginScrollView alloc] initWithFrame:[self.webView frame]];

    self.pluginScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    self.pluginScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    UIView *uiview = self.webView;
    uiview.scrollView.delegate = self;
    [self.pluginScrollView setContentSize:self.webView.scrollView.frame.size ];

    [self addSubview:self.pluginScrollView];

    [self addSubview:self.webView];


//    dispatch_queue_t q_background = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
//
//    dispatch_async(q_background, ^{
//      [self startRedrawTimer];
//    });

    return self;
}

@ksp143 ksp143 changed the title Orientation issue with Google Maps plugin MyPluginLayer iPad Orientation issue with Google Maps plugin MyPluginLayer Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant