BaseKorgeIosUIViewProvider
Create in src/iosMain/kotlin/KorgeIosUIViewProvider.kt
this file:
@Suppress("unused")
@ExportObjCClass(name = "KorgeIosUIViewProvider")
class KorgeIosUIViewProvider : BaseKorgeIosUIViewProvider()
Content copied to clipboard
Then in SwiftUI:
struct MyKorgeGameView: UIViewRepresentable {
func makeUIView(context: Context) -> UIView {
return KorgeIosUIViewProvider().createViewController(scene: MyScene(), width: 100, height: 100)
}
func sizeThatFits(_ proposal: ProposedViewSize, uiView: UIView, context: Context) -> CGSize? {
return CGSize(width: 100, height: 100)
}
func updateUIView(_ uiView: UIView, context: Context) {
}
}
Content copied to clipboard