Skip to content

ToolBar problem #136

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

Closed
MP185496 opened this issue Apr 4, 2024 · 2 comments · Fixed by #137
Closed

ToolBar problem #136

MP185496 opened this issue Apr 4, 2024 · 2 comments · Fixed by #137

Comments

@MP185496
Copy link

MP185496 commented Apr 4, 2024

Description

Is there a way to add toolbars to our window?
I tried to add it in swift code, but i couldn't because i need view for that, and in our RTC screen we get back a window and window don't have toolbar option on it.

Is there a plan to add this from RN side or to make it work from swift side?
Thanks

Steps to reproduce

/

React Native Version

0.73.5

Affected Platforms

Runtime - Android, Runtime - iOS

Output of npx react-native info

/

Stacktrace or Logs

/

Reproducer

/

Screenshots and Videos

No response

@okwasniewski
Copy link
Member

Hey, thanks for opening the issue. Once #137 will be merged and released you will be able to use toolbar modifier and ornaments on the Swift side, like so:

@main
struct RC07401VISIONOSApp: App {
  @UIApplicationDelegateAdaptor var delegate: AppDelegate
  
  var body: some Scene {
    WindowGroup {
      RCTRootViewRepresentable(moduleName: "RC07401VISIONOS", initialProps: nil)
        .modifier(WindowHandlingModifier())
        // Add ornaments 
    }
  }
}

@MP185496
Copy link
Author

MP185496 commented Apr 5, 2024

Hey, thanks for opening the issue. Once #137 will be merged and released you will be able to use toolbar modifier and ornaments on the Swift side, like so:

@main
struct RC07401VISIONOSApp: App {
  @UIApplicationDelegateAdaptor var delegate: AppDelegate
  
  var body: some Scene {
    WindowGroup {
      RCTRootViewRepresentable(moduleName: "RC07401VISIONOS", initialProps: nil)
        .modifier(WindowHandlingModifier())
        // Add ornaments 
    }
  }
}

Awsome, thank you very much :)

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

Successfully merging a pull request may close this issue.

2 participants