implement static method
Builds an object that implements the CALayerDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static CALayerDelegate implement({
void Function(CALayer)? displayLayer_,
void Function(CALayer, CGContextRef)? drawLayer_inContext_,
void Function(CALayer)? layerWillDraw_,
void Function(CALayer)? layoutSublayersOfLayer_,
CAAction? Function(CALayer, objc.NSString)? actionForLayer_forKey_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'CALayerDelegate');
CALayerDelegate.displayLayer_.implement(builder, displayLayer_);
CALayerDelegate.drawLayer_inContext_.implement(
builder,
drawLayer_inContext_,
);
CALayerDelegate.layerWillDraw_.implement(builder, layerWillDraw_);
CALayerDelegate.layoutSublayersOfLayer_.implement(
builder,
layoutSublayersOfLayer_,
);
CALayerDelegate.actionForLayer_forKey_.implement(
builder,
actionForLayer_forKey_,
);
builder.addProtocol($protocol);
return CALayerDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}