ios - iPad View 布局类似于 facebook

标签 ios layout uiviewcontroller uigesturerecognizer

如何创建一个与 facebook 应用程序具有相似 View 布局的 ipad 应用程序?也就是说,当您将主视图向右滑动时,中心的一个大 View 和左侧的较小的类似菜单的 Controller 变得可见?
他们是在使用修改后的 Split View布局,还是这是自定义的多层布局?

我知道我可能必须使用一些手势识别器,但是谁能指出我如何重新制作 facebook 应用程序布局的正确方向?例如,两个主要 Controller 是什么(左侧的表格 View ,中间的全屏自定义 View ,位于表格 View 上方?),以及如何滑入/滑出菜单?

提前致谢

作为说明:我只需要横向,应该使变薄更容易。

[编辑] 这是我当前使用 viewdeckcontroller 的实现:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

RootViewController* menu = [[RootViewController alloc] init];
UINavigationController* navController= [[UINavigationController alloc] initWithRootViewController:menu];

DetailViewController* center = [[DetailViewController alloc] init];

IIViewDeckController* rootController = [[IIViewDeckController alloc] initWithCenterViewController:center leftViewController:navController];
_menuController = rootController;

rootController.leftLedge = [[UIScreen mainScreen] bounds].size.width - 50.0;

self.window.rootViewController = rootController;

[self.window makeKeyAndVisible];

这是 rootviewcontroller 类(左侧菜单 Controller ):
-(void)loadView 
{
//   [super loadView];
   //   self.tableView = [[[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped] autorelease];

   self.view= [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320, 704)];

   UITableView* tableView= [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];

   [self.view addSubview:tableView];

   self.tableView= tableView;
}

最佳答案

这是一个完全符合您需要的插入式 Xcode 项目。 :)
https://github.com/devindoty/DDMenuController

关于ios - iPad View 布局类似于 facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8856066/

相关文章:

ios - Xcode 7 用户界面测试 : Dismiss Push and Location alerts

java - 仅在 Android 中调整 ScrollView 的大小

java - 更改 Eclipse 中括号布局的设置

iphone - View Controller 和方向 iOS 中的 View Controller

ios - 触摸 searchBar 时未调用 updateSearchResults 函数

ios - 如何在页面 View Controller 上显示 float 视频播放器

ios - 如果 Google map 尚未运行,则 Google map 无法正确显示路线

css - 格式化 Wordpress 电子商务网站产品页面

ios - dismissViewControllerAnimated : not animating

ios - 在不添加联系人的情况下使用 CNContactViewController (swift)