jjzjj

interactivePopGestureRecognizer

全部标签

ios - 如何在 iOS9 中禁用 interactivePopGestureRecognizer

我需要在我的应用程序中禁用interactivePopGestureRecognizer,我做到了-(void)viewDidAppear:(BOOL)animated{[superviewDidAppear:animated];//DisableiOS7backgestureif([self.navigationControllerrespondsToSelector:@selector(interactivePopGestureRecognizer)]){self.navigationController.interactivePopGestureRecognizer.enable

ios - interactivePopGestureRecognizer 弹出太多 View

我在同一个UINavigationController上有两个不同的UIViewControllers。两者都包含一个tableview。如果第一个ViewController上的一个单元格被点击,第二个Controller被按下。如果第二个单元格中的一个被推送,第二个Controller的另一个实例也会被推送。当使用后退按钮返回时,这一切都完美无缺。但是,当使用iOS7的interactivePopGestureRecognizer时,从第二个View的一个实例移动到另一个实例会导致崩溃。我有记录导航Controller事件和手势识别器启动的语句。这是启动然后取消弹出手势时的输出:P

ios - WKWebview allowsBackForwardNavigationGestures 和 UINavigationController interactivePopGestureRecognizer 都启用

嵌入在导航Controller中的我的ViewController包含一个WKWebview,我想在其上启用以下逻辑:如果webview中存在后退项目,做出左屏幕边缘手势应该在webview中返回一页(当allowsBackForwardNavigationGestures设置为yes时webview的正常行为)。当没有任何返回项时,它应该在导航Controller(interactivePopGestureRecognizer)中弹出一页。我同时启用了这两个功能并得到了随机结果,有时我在webView中返回一页,有时我在导航堆栈中返回我的主页。我尝试了以下逻辑:-(void)webV

ios - 将带有可见导航栏的 View Controller 弹出到带有隐藏导航栏的 View Controller 时,带有 interactivePopGestureRecognizer 的黑色区域

我有这个ViewController#1,它是导航Controller的RootViewController,并且有self.navigationController.navigationBarHidden=YES;ViewController#1告诉它的导航Controller去推送ViewController#2,它有self.navigationController.navigationBarHidden=NO;当我想通过从屏幕左侧滑动来从ViewController#2返回到ViewController#1时,我看到我的View就像我在此处附加的屏幕截图一样。这是在我向右移动手

ios - self.navigationController.interactivePopGestureRecognizer.enabled = NO;不适用于 iOS 8

我想在滑动ViewController时禁用弹出手势,但以下几行在iOS8中不起作用:self.navigationController.interactivePopGestureRecognizer.enabled=NO;提前致谢 最佳答案 在您希望禁用它的ViewController中,添加以下行:-(void)viewDidAppear:(BOOL)animated{[superviewDidAppear:animated];if([self.navigationControllerrespondsToSelector:@se

ios - 隐藏导航栏时,使用带有水平滚动的 CollectionView 的 interactivepopgesturerecognizer

我正在尝试使用interactivepopgesturerecognizer返回一个View,其中我还有一个水平滚动的UICollectionView,问题是在CollectionView的框架中,滑动返回不起作用,但是当触摸开始超出CollectionView的框架时有效,这是我的View的一个例子:|--->hereworks|-----------||--->Thisisthecollectionviewanddoesn'tswipetogoback||-----------|--->hereworks我该如何解决这个问题?编辑:我意识到只有在推送View中导航栏被隐藏时才会出现

ios - 推送或弹出时应用程序在 ios 8 上卡住

我的应用有一个大问题。主要在iOS8上,因为我们还没有在其他iOS版本上发现这一点。当推送到新的ViewController或弹出到以前的ViewController时,它有时会卡住。但奇怪的是,如果您按下主页按钮并从后台启动应用程序。它会运行一点。这里我的意思是新的推送或弹出ViewController出现了,但你仍然无法推送或弹出新的ViewController。更新:卡顿时内存、CPU、磁盘使用率均正常。 最佳答案 我们终于解决了这个问题。原因是当ViewController堆栈只有1个ViewController时,我们没有

ios - 将默认的 interactivePopGestureRecognizer 扩展到屏幕边缘之外?

我有一个被推送到导航堆栈的UIViewController。我想扩展标准的iOS7交互式平移手势以将此ViewController弹出到默认UIRectEdgeLeft边界之外,以便用户可以通过从View上的任何位置平移来启动交互式后退操作。我已经尝试滚动我自己的交互式ViewController转换,但是要完全复制默认interactivePopGestureRecognizer的良好视差处理非常麻烦。例如,fromViewController隐藏导航栏,而toViewController显示导航栏——这在自定义交互转换中不容易处理,但在默认操作中是无缝的.因此,我想将默认Actio

iOS 7 : How to set UIBarButtonItem backButtonBackgroundImage for UIControlStateHighlighted?

我正在尝试为正常和突出显示状态下的后退按钮设置背景图像。-(void)configureBackButtonInNavigationItem:(UINavigationItem*)item{UIBarButtonItem*backBarButtonItem=[[UIBarButtonItemalloc]initWithTitle:@"back"style:UIBarButtonItemStyleBorderedtarget:nilaction:NULL];[backBarButtonItemsetTitleTextAttributes:@{NSForegroundColorAttrib

iOS 7 : How to set UIBarButtonItem backButtonBackgroundImage for UIControlStateHighlighted?

我正在尝试为正常和突出显示状态下的后退按钮设置背景图像。-(void)configureBackButtonInNavigationItem:(UINavigationItem*)item{UIBarButtonItem*backBarButtonItem=[[UIBarButtonItemalloc]initWithTitle:@"back"style:UIBarButtonItemStyleBorderedtarget:nilaction:NULL];[backBarButtonItemsetTitleTextAttributes:@{NSForegroundColorAttrib