tauri
tauri copied to clipboard
[feat] V2 to support iOS fullscreen viewcontroller
Describe the problem
Some app want to remove the top/bottom bar in iOS it will be awesome If Tauri could support that
Describe the solution you'd like
set viewcontroller fullscreen
Alternatives considered
No response
Additional context
No response
+1, especially helpful for a horizontally tilted game. I'd really appreciate an orientation option.
I guess the fullscreen option doesn't work yes?
You can do it by implementing it manually via your own plugin. Here is my example swift code.
class FluyerMain: Plugin {
@objc open override func load(webview: WKWebView) {
guard let rootVC = UIApplication.shared.keyWindow?.rootViewController else { return }
rootVC.edgesForExtendedLayout = .all
rootVC.extendedLayoutIncludesOpaqueBars = true
webview.backgroundColor = .clear
webview.scrollView.backgroundColor = .clear
webview.scrollView.contentInsetAdjustmentBehavior = .never
webview.autoresizingMask = [.flexibleWidth, .flexibleHeight]
webview.frame = rootVC.view.bounds
UIApplication.shared.keyWindow?.backgroundColor = .white
}
}