V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
lvlingsheng
V2EX  ›  iDev

如何改变 interactivePopGestureRecognizer 的 action

  •  
  •   lvlingsheng · Oct 20, 2016 · 3848 views
    This topic created in 3480 days ago, the information mentioned may be changed or developed.
    有个很奇怪的需求, navigationcontroller 的返回按钮不是系统默认的,定制成了不同情况下会返回到不同的界面。
    现在问题是如果是用 interactivePopGestureRecognizer 来做滑动返回的话,只会返回到上一个 view ,而我自定义的返回键是有自定义的 action ,并不一定是要返回到上一个界面。

    求问这样的情况怎么改 interactivePopGestureRecognizer 才能让这样的效果也有滑动返回?

    谢谢
    3 replies    2016-10-24 11:16:24 +08:00
    programdog
        1
    programdog  
       Oct 20, 2016
    lvlingsheng
        2
    lvlingsheng  
    OP
       Oct 20, 2016
    @programdog 并不是这样的需求,我并不是不能实现滑动返回,是因为返回的功能不仅仅是 popviewcontroller 而是根据情况有不同的处理,这样的话如果只是 popviewcontroller 就会出错
    black
        3
    black  
       Oct 24, 2016
    用 - (void)setViewControllers:(NSArray<UIViewController *> *)viewControllers animated:(BOOL)animated 改变整个栈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2448 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 02:37 · PVG 10:37 · LAX 19:37 · JFK 22:37
    ♥ Do have faith in what you're doing.