简体   繁体   English

未触发UISplitViewController手势的SWRevealViewController

[英]SWRevealViewController with UISplitViewController gesture not triggered

In my application I use SWRevealViewController and UISplitViewController . 在我的应用程序中,我使用SWRevealViewControllerUISplitViewController So what is happening: (I have now 3 UIViewController : menu, mainList and detail view on the right side) The mainList moves to the right showing the menu and overlaying the detail view(a bit). 所以发生了什么:(我现在在右侧有3个UIViewController :菜单,mainList和detail视图)mainList向右移动,显示菜单并覆盖细节视图(有点)。 Now when I want to close the menu by touching (dragging) the mainList, half of the area of menuList is not touchable, the touches are redirected to detailView (which is under the mainList). 现在,当我想通过触摸(拖动)mainList来关闭菜单时,menuList的一半区域不可触摸,这些触摸将重定向到detailView(位于mainList下)。 Please help me, i'm a newbie in iOS 请帮助我,我是iOS的新手

I would show some sceenshots, but the system doesn't allow me...sorry 我会显示一些画面,但系统不允许我...抱歉

#import "SWRevealViewController.h" in your mainListViewController and add this in your viewDidLoad . 在mainListViewController中#import "SWRevealViewController.h"并将其添加到viewDidLoad

[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
[self.view addGestureRecognizer:self.revealViewController.tapGestureRecognizer];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM