addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. required void animatePresentationOfViewController_fromViewController_(
    1. NSViewController,
    2. NSViewController
    ),
  3. required void animateDismissalOfViewController_fromViewController_(
    1. NSViewController,
    2. NSViewController
    ),
  4. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSViewControllerPresentationAnimator protocol to an existing objc.ObjCProtocolBuilder.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilder(
  objc.ObjCProtocolBuilder builder, {
  required void Function(NSViewController, NSViewController)
  animatePresentationOfViewController_fromViewController_,
  required void Function(NSViewController, NSViewController)
  animateDismissalOfViewController_fromViewController_,
  bool $keepIsolateAlive = true,
}) {
  NSViewControllerPresentationAnimator
      .animatePresentationOfViewController_fromViewController_
      .implement(
        builder,
        animatePresentationOfViewController_fromViewController_,
      );
  NSViewControllerPresentationAnimator
      .animateDismissalOfViewController_fromViewController_
      .implement(
        builder,
        animateDismissalOfViewController_fromViewController_,
      );
  builder.addProtocol($protocol);
}