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

How to disable back-arrow-icon at the top-left of the screen when setting vrModeEnabled = false (ViroSceneNavigator) #120

Open
vjtc0n opened this issue Dec 23, 2017 · 4 comments

Comments

@vjtc0n
Copy link

vjtc0n commented Dec 23, 2017

Hello Viro team,

I'm really excited about the latest release.
But is there any ways to dynamically disable back-arrow-icon at the top-left of the screen when setting vrModeEnabled = false? such as: backArrowIconVisible={false} ?
Because to handle this, it is super easy to do, and basically, in general, we don't like this icon in fullscreen.

And another issue is, in my application, we use vrModeEnabled (true and false) in 1 route, the value true/false is given in the params passed to this route from the previous one (you know what I mean, right?)
The flow could be described like this: Route 1 --> navigate--> Route 2 (which has VR components).
Firstly, Route 1 passed vrModeEnabled=false --> We watch VR mode like facebook did.
Next, Route 2 --> goBack--> Route 1.
Finally, Route 1 --> choose option vrModeEnabled=true, navigating and passing it to Route 2
And the app crashed.

So I have to degrade Viro back to 2.1.0 :(

@achuvm
Copy link
Collaborator

achuvm commented Dec 24, 2017

Hi @vjtc0n,

Unfortunately it’s not possible to remove that back button right now. We can see if we can turn that into an option in our next release.

As for the crash you’re running into. That does sound like a bug on our platform, we’ll see if we can reproduce it and fix it in our next release.

Thanks for reporting the issue!

Andy

@sanderwapstra
Copy link

@achuvm Any updates on this? On iPhone X it renders under the time and is not clickable. Thanks!

@Hless
Copy link
Contributor

Hless commented Oct 16, 2019

Still no updates? It looks very silly on iPhone X.

I'm going to look if I can cook up a workaround by disabling the view under the hood using a viewmanager of some sort...

@Hless
Copy link
Contributor

Hless commented Oct 16, 2019

Okay after some digging I found out that this is apparently baked into the underlying GoogleVR implementation. With no way to disable it unless VRMode is active. (See: https://developers.google.com/vr/ios/reference/interface_g_v_r_cardboard_view.html)

It is however possible to see the button being rendered as a view inside the XCode view inspector:
Screenshot 2019-10-16 at 15 59 00

A possible solution could be using wrapping the whole VR scene in a Native Module that forcibly removes the view, just like the solution below:
googlevr/gvr-ios-sdk#9 (comment)

Will probably give it a go for our project and report back when I have created a solution.

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

4 participants