IONIC 3: How to set the background to transparent in IOS using a QR scanner?

I am using the Ionic Native QR SCANNER plugin, but the application on iOS does not show a preview. A lot of research, but the solution does not work. I installed background-color: transparent! Important to Everything Everything, including:

html, body, ion-app, ion-content, ion-page, .nav-decor, content-md, content-ios,ion-app.ios,.fixed-content,.scroll-content{
    background-color: transparent !important;
}

But still, the iOS app displays a white screen instead of a preview, and the QR scanner works in the background, just not showing a preview. everything works fine on android.

+4
source share
1 answer

Finally, I found the answer for ionic 3. You can change the display property of the ion-app element to none each time the function is called for scanning, as follows:

let ionApp = document.getElementsByTagName('ion-app')[0];
ionApp.style.display = 'none';

, :

ionApp.style.display = 'block';

, Zbar Native plugin QR-. , -.

+1

Source: https://habr.com/ru/post/1687264/


All Articles