Hello, so I have this code that makes the iOS 20px white bar go away:
window.parent.document.querySelector("meta[name=viewport]").setAttribute("content", "width=device-width, UIScrollViewContentInsetAdjustmentNever, minimumscale=0.25, maximumscale=5, height=1024, user-scalable=yes, initial-scale=1, viewport-fit=cover");
But, annoyingly, the status bar at the top still stays there, like so:
Is it possible to remove this?
I am not sure that’s possible on iOS, unless you are using a PWA. Then if your user installs your web-app (Playcanvas page) as a shortcut in his home screen, you can use a number of meta-tags to disable it:
I’ve never tried this though!
Everytime I try and change the original code (I just copy+pasted and changed the meta name to the correct one to do this), it just gives me an error. I’m not sure how I can make the
What I sent above works only in a PWA.
Ok, I’ll try some other stuff and see if I can get it to work!
say I made a HTML file inside of my project - how would I apply this to the game? HTML doesn’t count as scripts for some reason.
Yes, adding HTML/CSS to your game is slightly different than adding scripts. But pretty easy in my opinion.
You can take a look in this tutorial: https://developer.playcanvas.com/en/tutorials/htmlcss-ui/
Okay, thanks, I’ll definitely try this!
I have checked the HTML page that runs automatically with playcanvas, and it already has these meta-tags included: