<tfoot id='TfSoN'></tfoot>
      • <bdo id='TfSoN'></bdo><ul id='TfSoN'></ul>

      <i id='TfSoN'><tr id='TfSoN'><dt id='TfSoN'><q id='TfSoN'><span id='TfSoN'><b id='TfSoN'><form id='TfSoN'><ins id='TfSoN'></ins><ul id='TfSoN'></ul><sub id='TfSoN'></sub></form><legend id='TfSoN'></legend><bdo id='TfSoN'><pre id='TfSoN'><center id='TfSoN'></center></pre></bdo></b><th id='TfSoN'></th></span></q></dt></tr></i><div id='TfSoN'><tfoot id='TfSoN'></tfoot><dl id='TfSoN'><fieldset id='TfSoN'></fieldset></dl></div>
      <legend id='TfSoN'><style id='TfSoN'><dir id='TfSoN'><q id='TfSoN'></q></dir></style></legend>

    1. <small id='TfSoN'></small><noframes id='TfSoN'>

      iOS 6 UIGestures (Tap) 停止使用 QLPreviewController

      时间:2023-05-31
        <tbody id='7K2j0'></tbody>
            <bdo id='7K2j0'></bdo><ul id='7K2j0'></ul>
            <legend id='7K2j0'><style id='7K2j0'><dir id='7K2j0'><q id='7K2j0'></q></dir></style></legend>

              • <small id='7K2j0'></small><noframes id='7K2j0'>

                <i id='7K2j0'><tr id='7K2j0'><dt id='7K2j0'><q id='7K2j0'><span id='7K2j0'><b id='7K2j0'><form id='7K2j0'><ins id='7K2j0'></ins><ul id='7K2j0'></ul><sub id='7K2j0'></sub></form><legend id='7K2j0'></legend><bdo id='7K2j0'><pre id='7K2j0'><center id='7K2j0'></center></pre></bdo></b><th id='7K2j0'></th></span></q></dt></tr></i><div id='7K2j0'><tfoot id='7K2j0'></tfoot><dl id='7K2j0'><fieldset id='7K2j0'></fieldset></dl></div>
                <tfoot id='7K2j0'></tfoot>
              • 本文介绍了iOS 6 UIGestures (Tap) 停止使用 QLPreviewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                目前我在导航控制器中使用 QLPreviewController.(pushViewController)

                为了隐藏导航栏,我使用了 UITapGestureRecognizer.用户可以通过单击(点击)显示/隐藏导航栏.这在 iOS5 中运行良好

                - (void)viewWillAppear:(BOOL)animated {[超级viewWillAppear:动画];UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)];[tapRecognizer setNumberOfTapsRequired:1];[tapRecognizer setDelegate:self];[[自拍] addGestureRecognizer:tapRecognizer];[tapRecognizer 发布];}- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {返回是;}- (void)tapped:(UIGestureRecognizer*)gestureRecognizer{//隐藏 -/- 显示导航栏[[self navigationController] setNavigationBarHidden:![[[self navigationController] navigationBar] isHidden] animated:YES];}

                但是在 iOS 6 的发布版本中,现在完全忽略了点击,所以我不能再隐藏我的导航栏了.

                为什么要隐藏导航栏?

                如果您打开 .numbers 文档,导航栏会隐藏导航栏下方的工作表按钮".

                泰.

                解决方案

                从 ios 6 开始,QLPreviewController 实际上是一个完全独立的应用程序(独立的进程和一切)

                Apple 为此使用 XPC:

                • http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/
                • <块引用><块引用>

                  https://twitter.com/eldudi/statuses/253438028163457024

                => 所以当你推送它时,你的整个应用都会移动到背景,包括它的窗口和手势识别器

                Currently I'm using a QLPreviewController in a navigation controller. (pushViewController)

                To hide the navigationbar I use a UITapGestureRecognizer. The user can show/hide the navigation bar by a single touch (tap). This worked well in iOS5

                - (void)viewWillAppear:(BOOL)animated {
                   [super viewWillAppear:animated];
                
                   UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)];
                   [tapRecognizer setNumberOfTapsRequired:1];
                   [tapRecognizer setDelegate:self];
                   [[self view] addGestureRecognizer:tapRecognizer];
                   [tapRecognizer release];
                }
                
                - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
                    return YES;
                }
                
                - (void)tapped:(UIGestureRecognizer*)gestureRecognizer
                {
                    //hide -/- show navigation bar
                    [[self navigationController] setNavigationBarHidden:![[[self navigationController] navigationBar] isHidden] animated:YES];
                }
                

                But in the released version of iOS 6 the taps are now completely ignored, so I can't hide my navigation bar anymore.

                Reason why I want to hide the navigation bar?

                If you open a .numbers document, the navigationbar hides the 'sheet-buttons' under the navigation bar.

                Ty.

                解决方案

                since ios 6 the QLPreviewController is actually a completely seperate app (seperate process and everything)

                Apple uses XPC for that:

                • http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/
                • https://twitter.com/eldudi/statuses/253438028163457024

                => so when you push that, your whole app moves to the bg, including its window and gesture recognizers

                这篇关于iOS 6 UIGestures (Tap) 停止使用 QLPreviewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何将数据从一个视图传回IOS中的另一个视图? 下一篇:iOS - 使用 StoryBoard 创建弹出视图

                相关文章

                最新文章

                <i id='mG1pq'><tr id='mG1pq'><dt id='mG1pq'><q id='mG1pq'><span id='mG1pq'><b id='mG1pq'><form id='mG1pq'><ins id='mG1pq'></ins><ul id='mG1pq'></ul><sub id='mG1pq'></sub></form><legend id='mG1pq'></legend><bdo id='mG1pq'><pre id='mG1pq'><center id='mG1pq'></center></pre></bdo></b><th id='mG1pq'></th></span></q></dt></tr></i><div id='mG1pq'><tfoot id='mG1pq'></tfoot><dl id='mG1pq'><fieldset id='mG1pq'></fieldset></dl></div>
              • <legend id='mG1pq'><style id='mG1pq'><dir id='mG1pq'><q id='mG1pq'></q></dir></style></legend>
                    <bdo id='mG1pq'></bdo><ul id='mG1pq'></ul>
                1. <tfoot id='mG1pq'></tfoot>

                2. <small id='mG1pq'></small><noframes id='mG1pq'>