iOS滑动/滑动菜单,如Facebook应用程序 [英] iOS Slide/Swipe menu like facebook app
问题描述
我知道有很多项目,我在 https://www.cocoacontrols.com/ 进行了搜索并发现一些非常有趣的,比如 MasterDetailController
,这是最聪明的一个,我的工作非常好。
但是现在我有一个问题,可能你可以帮助我使用另一个很酷的简单幻灯片控制,或者只是简单地调整当前控制或编码。
主要问题是必须在 self.window.rootViewControler = self.principal;
MasterDetailController
b $ b
/ *这是APPDELEGATE * /
//这是幻灯片菜单视图控制器
UIViewController * master = [[ UIViewController alloc] initWithNibName:@MasterViewbundle:nil];
//这是体视图控制器
ViewController * detail = [[ViewController alloc] initWithNibName:@ViewControllerbundle:nil];
//这是Master详细控制器'driver'
self.principal = [[[MasterDetailController alloc] initWithMasterViewController:master detailViewController:detail] autorelease];
//然后我们将'driver'设置为rootView
self.window.rootViewController = self.principal;
[self.window makeKeyAndVisible];
现在,我想要更多 ViewControllers
来拥有幻灯片菜单,而不仅仅是
rootViewController
。
<那么,我该怎么办?
谢谢。
PS:这是我的控制权目前正在使用 https://www.cocoacontrols.com/controls/masterdetailcontroller
如果您正在创建像facebook这样的幻灯片/滑动
应用程序然后按照链接这是好的此示例
https://github.com/edgecase / ECSlidingViewController
I know there are tons of projects, I searched in https://www.cocoacontrols.com/ and found some very interesting, like MasterDetailController
, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of simple tweak of current control or coding.
The main issue is that the MasterDetailController
must be set on self.window.rootViewControler = self.principal;
/* THIS IS THE APPDELEGATE */
// This is the slide menu view controller
UIViewController *master = [[UIViewController alloc] initWithNibName: @"MasterView" bundle: nil];
// This is the body view controller
ViewController *detail = [[ViewController alloc] initWithNibName: @"ViewController" bundle: nil];
// This is the Master detail controller 'driver'
self.principal = [[[MasterDetailController alloc] initWithMasterViewController: master detailViewController: detail] autorelease];
// Then we set the 'driver' as rootView
self.window.rootViewController = self.principal;
[self.window makeKeyAndVisible];
Now, I want more ViewControllers
to have the slide menu like facebook app
not just the rootViewController
.
So, how can I do it?
Thanks.
PS: This is the control I am currently using https://www.cocoacontrols.com/controls/masterdetailcontroller
if you are creating slide/swipe like facebook
application then follow link which is good example of this
https://github.com/edgecase/ECSlidingViewController
这篇关于iOS滑动/滑动菜单,如Facebook应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!