Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/114.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS滑出菜单_Ios_Viewcontroller - Fatal编程技术网

iOS滑出菜单

iOS滑出菜单,ios,viewcontroller,Ios,Viewcontroller,我目前有一个视图控制器,可以处理facebook登录以及名为“homeViewController”的身份验证后的登录页。我想要的是在“homeViewController”上显示一个漂亮的滑出式菜单和布局。我找到了一个我非常喜欢的,但是作为一个初学者,我发现如何实现的说明很难理解。我已经下载了源代码,在xcode中运行源代码时,一切都很好,所以我知道它可以工作。我发现这些说明令人困惑,因为它告诉我要包含“REFrostedViewController.h”,然后它告诉我执行以下操作,但我没有“

我目前有一个视图控制器,可以处理facebook登录以及名为“homeViewController”的身份验证后的登录页。我想要的是在“homeViewController”上显示一个漂亮的滑出式菜单和布局。我找到了一个我非常喜欢的,但是作为一个初学者,我发现如何实现的说明很难理解。我已经下载了源代码,在xcode中运行源代码时,一切都很好,所以我知道它可以工作。我发现这些说明令人困惑,因为它告诉我要包含“REFrostedViewController.h”,然后它告诉我执行以下操作,但我没有“DEMONavigationController”:

DEMONavigationController *navigationController = [[DEMONavigationController alloc] initWithRootViewController:[[DEMOHomeViewController alloc] init]];
DEMOMenuViewController *menuController = [[DEMOMenuViewController alloc] initWithStyle:UITableViewStylePlain];

// Create frosted view controller
//
REFrostedViewController *frostedViewController = [[REFrostedViewController alloc] initWithContentViewController:navigationController menuViewController:menuController];
frostedViewController.direction = REFrostedViewControllerDirectionLeft;

// Make it a root controller
//
self.window.rootViewController = frostedViewController;
有没有更简单的方法让我的“homeViewController.m”可以使用此菜单?如果有任何帮助,我们将不胜感激

滑出菜单说明:

您所指的“
DEMO
”文件可在该GitHub Repo中找到

对于您自己的使用,您需要获取这些演示文件并修改它们以供您使用,然后将它们放入您自己的项目中

至于您的“
homeViewController.m
”文件,我可以想象您会将该代码的第一行替换为如下内容:

DEMONavigationController *navigationController = [[DEMONavigationController alloc] initWithRootViewController:[[homeViewController alloc] init]];

(顺便说一句,您应该用大写字母命名Objective-C类和文件。方法、属性和变量名应该以小写字母开头)。

别管Xcode。Xcode只是一个IDE。