Giter Club home page Giter Club logo

popgesture-1's Introduction

FullscreenPopGesture

侧滑手势返回,解决自定义导航栏无手势返回的问题。

使用

  • Swift 4 中 initialze 方法被禁用,需在 application(_:didFinishLaunchingWithOptions:) 方法中调用 FullscreenPopGesture.configuration() 来启用 Method swizzling。
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        // 启用
        FullscreenPopGesture.configuration()
        
        return true
    }
  • 跳转至有 UIScrollView 的控制器时,需要在 UIScrollView 内部完成返回手势,只需如下设置:
scrollView.scrollViewPopGestureRecognizerEnable = true
  • 本库实现无代码全局设置侧滑返回,如需取消界面侧滑返回手势,则在该界面的视图控制器中添加如下代码:
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 添加以禁用侧滑返回 仅该界面有效
        interactivePopDisabled = true
    }

CocoaPods 安装

pod 'FullscreenPopGesture'

popgesture-1's People

Contributors

piaotairen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.