What is the best way to use the new Async/Await syntax with PresentViewController and DismissViewController?
I know you can pass a call completion handler, but I would rather use something like: await myViewController.PresentViewController(...)
This was my first pass and while it meets my goal of describing an asynchronous method in a single method body, it leaves a bit to be desired.
var waiter = new ManualResetEvent(false);
TopViewController.PresentViewController(viewController, animated, () => waiter.Set());
await Task.Factory.StartNew(() =>
{
//wait until presented view controller
waiter.WaitOne();
});
What have people got that's better?