BaseKorgeIosUIViewProvider

Create in src/iosMain/kotlin/KorgeIosUIViewProvider.kt this file:

@Suppress("unused")
@ExportObjCClass(name = "KorgeIosUIViewProvider")
class KorgeIosUIViewProvider : BaseKorgeIosUIViewProvider()

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) {
}
}

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun createViewInfo(scene: Scene, width: Int = 512, height: Int = 512): KorgeIosUIViewInfo