mirror of
https://github.com/fankes/pagecurl-multiplatform.git
synced 2025-09-07 19:14:04 +08:00
feat: support compose multiplatform
This commit is contained in:
19
samples/iosApp/iosApp/ContentView.swift
Normal file
19
samples/iosApp/iosApp/ContentView.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import shared
|
||||
|
||||
struct ComposeView: UIViewControllerRepresentable {
|
||||
func makeUIViewController(context: Context) -> UIViewController {
|
||||
let viewController = Main_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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user