mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-10 12:34:15 +08:00
feat: update demo
This commit is contained in:
15
samples/iosApp/iosApp/AppDelegate.swift
Normal file
15
samples/iosApp/iosApp/AppDelegate.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
import UIKit
|
||||
import shared
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window?.rootViewController = App_iosKt.createUIViewController()
|
||||
window?.makeKeyAndVisible()
|
||||
return true
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import shared
|
||||
|
||||
struct ComposeView: UIViewControllerRepresentable {
|
||||
func makeUIViewController(context: Context) -> UIViewController {
|
||||
let viewController = App_iosKt.createUIViewController()
|
||||
return viewController
|
||||
}
|
||||
|
||||
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
|
||||
}
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
ComposeView()
|
||||
.ignoresSafeArea(.all, edges: .bottom) // Compose has own keyboard handler
|
||||
}
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct iOSApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user