iosobjective-cuikituipresentationcontroller

No visible @interface for UIPresentationController declares the selector initWithPresentingViewController:presentedViewController


I was watching WWDC 2014 video A Look Inside Presentation Controllers
I downloaded the source code (written in Objective-C) for the session, try to build it and I got this error:

No visible @interface for UIPresentationController declares the selector initWithPresentingViewController:presentedViewController.

Is the method suppose to be in the UIPresentationController?


Solution

  • I found the answer from the documentation of UIPresentationController the method is supposed to be - (instancetype)initWithPresentedViewController (UIViewController *)presentedViewController presentingViewController:(UIViewController*)presentingViewController; not -(instancetype)initWithPresentingViewController:(UIViewController *)presentingViewController presentedViewController:(UIViewController *)presentedViewController. As soon as I changed that it fixed the problem