我正在努力让这个PaperFoldMenuController 运行,虽然它工作正常,但在设置foldMenuViewController.delegate = self
I am时出现错误Assigning to 'id<PaperFoldMenuControllerDelegate>' from incompatible type 'DOAppDelgate *const__strong'
。我将它分配在与似乎运行良好的演示完全相同的位置。有任何想法吗?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
DOMasterViewController *controller = (DOMasterViewController *)navigationController.topViewController;
controller.managedObjectContext = [self managedObjectContext];
foldMenuViewController = [[DOMenuViewController alloc] initWithMenuWidth:200 numberOfFolds:5];
foldMenuViewController.delegate = self;
[self.window setRootViewController:foldMenuViewController];
NSMutableArray* viewControllers = [NSMutableArray array];
[viewControllers addObject:navigationController];
[viewControllers addObject:controller];
[foldMenuViewController setViewControllers:viewControllers];
return YES;
}