0

I am building a plugin in NativeScript. When I try to access "presentViewController" method on rootViewController, I get the error "property presentViewContrller does not exist".

const rvc = UIApplication.sharedApplication.keyWindow.rootViewContrller; rvc.presentViewContrller(myViewController, true, completion() {});

It suggests to use presentViewContrllerAnimatedCompletion which does not accept my view controller.

Could you please assist what part of my code (or maybe setup!) is wrong?

Hamed Afshar
  • 173
  • 2
  • 14

1 Answers1

0

The right method name is presentViewControllerAnimatedCompletion only.

You should combine the parameter names with method name while marshalling Objective C to JS/TS.

presentViewController:animated:completion

Manoj
  • 21,753
  • 3
  • 20
  • 41