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

Status Bar #277

Open
2 of 3 tasks
lukas-729 opened this issue Nov 4, 2024 · 0 comments
Open
2 of 3 tasks

Status Bar #277

lukas-729 opened this issue Nov 4, 2024 · 0 comments

Comments

@lukas-729
Copy link

Bug Report

Problem

I am working on an iPad-only application with fixed orientation (landscape) except for when a PDF is viewed (can be viewed in Landscape and Portrait).

Status Bar issue is present when these steps are performed:

  1. PDF is opened in the app (using a system PDF viewer)
  2. The device rotated to Portrait
  3. PDF is closed and the app automatically rotates back to Landscape

What is expected to happen?

Refresh the Status Bar color and text in full status bar width.

What does actually happen?

The plugin uses the Portrait-orientation width; therefore, a black stripe is on the right side.
See the status bar:
issueStatusBar

Information

Status Bar issue is present when these steps are performed:

  1. PDF is opened in the app (using a system PDF viewer)
  2. The device rotated to Portrait
  3. PDF is closed and the app automatically rotates back to Landscape

NOTE: PDF file is created using the PDF Generator plugin v2.0.8

Command or Code

When I was debugging the usage of the plugin I found out that the method resizeStatusBarBackgroundView in:

-(void)statusBarDidChangeFrame:(NSNotification*)notification
{
    //add a small delay ( 0.1 seconds ) or statusbar size will be wrong
    __weak CDVStatusBar* weakSelf = self;
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        [weakSelf resizeStatusBarBackgroundView];
        [weakSelf resizeWebView];
    });
}

uses still the Portrait orientation display width, not the landscape one. Removing the line helped to resolve the issue, but I cannot use the modified version of the plugin.

Environment, Platform, Device

iPadOS 16 and above, more precisely:

  • iPadOS 16.6.1 - Model: iPad (9th generation)
  • iPadOS 17.3.0 - Model: iPad (10th generation)
  • iPadOS 18.0.0 - Model: iPad Air (13-inch) (M2)

Version information

Cordova iOS v6.2.0
Xcode v 15.4
Codova Status Bar plugin v4.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
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