Browse Source
- fixes also top bar appearance - removed constant offset workaround as a resultpull/2824/head
Nikita Lipsky
2 years ago
committed by
GitHub
4 changed files with 32 additions and 19 deletions
@ -0,0 +1,21 @@
|
||||
import UIKit |
||||
import SwiftUI |
||||
import shared |
||||
|
||||
struct ComposeView: UIViewControllerRepresentable { |
||||
func makeUIViewController(context: Context) -> UIViewController { |
||||
Main_iosKt.MainViewController() |
||||
} |
||||
|
||||
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} |
||||
} |
||||
|
||||
struct ContentView: View { |
||||
var body: some View { |
||||
ComposeView() |
||||
.ignoresSafeArea(.keyboard) // Compose has own keyboard handler |
||||
} |
||||
} |
||||
|
||||
|
||||
|
@ -1,15 +1,10 @@
|
||||
import UIKit |
||||
import shared |
||||
import SwiftUI |
||||
|
||||
@main |
||||
class AppDelegate: UIResponder, UIApplicationDelegate { |
||||
var window: UIWindow? |
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
||||
window = UIWindow(frame: UIScreen.main.bounds) |
||||
let mainViewController = Main_iosKt.MainViewController() |
||||
window?.rootViewController = mainViewController |
||||
window?.makeKeyAndVisible() |
||||
return true |
||||
struct iOSApp: App { |
||||
var body: some Scene { |
||||
WindowGroup { |
||||
ContentView() |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue