// We need to keep reference to controller as Objective-C will only keep weak reference here.
// We need to keep reference to controller as Objective-C will only keep weak reference here.
lateinitprivatevarcontroller:NSObject
lateinitprivatevarcontroller:NSObject
actualfunattachTo(container:Any){
actualfunattachTo(container:Any){
...
@@ -54,7 +55,8 @@ actual open class SkiaLayer(
...
@@ -54,7 +55,8 @@ actual open class SkiaLayer(
}
}
funattachTo(view:UIView){
funattachTo(view:UIView){
this.view=view
this.view=view
contextHandler=MetalContextHandler(this)
pictureRecorder=PictureRecorder()
// See https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/using_responders_and_the_responder_chain_to_handle_events?language=objc
// See https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/using_responders_and_the_responder_chain_to_handle_events?language=objc
controller=object: NSObject(){
controller=object: NSObject(){
@ObjCAction
@ObjCAction
...
@@ -76,33 +78,48 @@ actual open class SkiaLayer(
...
@@ -76,33 +78,48 @@ actual open class SkiaLayer(
}
}
// We have ':' in selector to take care of function argument.
// We have ':' in selector to take care of function argument.