Latest 0.2.6
License MIT
Platforms ios 8.0
Dependencies KVOController

HWPanModal 👍

HWPanModal is used to present controller and drag to dismiss.

Inspired by PanModal, thanks.




  1. Supports any type of UIViewController
  2. Seamless transition between modal and content
  3. Support two kinds of GestureRecognizer
    1. UIPanGestureRecognizer, direction is UP & Down.
    2. UIScreenEdgePanGestureRecognizer, you can swipe on screen edge to dismiss controller.


iOS 8.0+, support Objective-C & Swift.


KVOController – facebook

Because Objective-C KVO is hard to use, so I use KVOController = =



pod 'HWPanModal', '~>'

How to use

Your UIViewController need to conform HWPanModalPresentable. If you use default, nothing more will be written.

#import <HWPanModal/HWPanModal.h>
@interface HWBaseViewController () <HWPanModalPresentable>


@implementation HWBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.


Where you need to present this Controller.

#import <HWPanModal/HWPanModal.h>
[self presentPanModal:[HWBaseViewController new]];

yeah! Easy.


  1. Clone this git.
  2. open the terminal, go to the Example Folder.
  3. pod install --verbose
  4. Double click HWPanModal.xcworkspace, and run.

Change Log

  • 0.2.0
    Add screen edge interactive gesture. Default this function is closed, implement - (BOOL)allowScreenEdgeInteractive; to config it.

    - (BOOL)allowScreenEdgeInteractive {
        return YES;
  • 0.2.1
    • Fix when rotate presented controller, the UI is not correct.
  • 0.2.2
    • Screen edge pan interactive bug fix.
  • 0.2.3
    • iOS8+ rotate bug fix.
  • 0.2.4
    • UI bug fix.
    • Improve drag indicator animate.
    • Add - (BOOL)allowsTapBackgroundToDismiss; to control whether can tap background to dismiss.
  • 0.2.5
    • file name update.
  • 0.2.6
    • Add - (BOOL)shouldAnimatePresentingVC; to config transition for PresentingVC.


HWPanModal is released under a MIT License. See LICENSE file for details.

Latest podspec

    "name": "HWPanModal",
    "version": "0.2.6",
    "summary": "HWPanModal is used to present controller and drag to dismiss.",
    "description": "HWPanModal is used to present controller and drag to dismiss. Inspire to PanModal.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "heathwang": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.6"
    "platforms": {
        "ios": "8.0"
    "source_files": "HWPanModal/Classes/**/*",
    "public_header_files": "HWPanModal/Classes/**/*.h",
    "dependencies": {
        "KVOController": []

Pin It on Pinterest

Share This