Latest 0.2.5.3
Homepage https://github.com/HeathWang/HWPanModal
License MIT
Platforms ios 8.0
Dependencies KVOController
Authors

HWPanModal 👍


HWPanModal


HWPanModal


HWPanModal


HWPanModal


HWPanModal


HWPanModal

HWPanModal is used to present controller and drag to dismiss.

Inspired by PanModal, thanks.

Snapshoot

example

Features

  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.

Compatibility

iOS 8.0+, support Objective-C & Swift.

Dependency

KVOController – facebook

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

Installation

CocoaPods

pod 'HWPanModal', '~> 0.2.5'

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>

@end

@implementation HWBaseViewController

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

@end

Where you need to present this Controller.

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

yeah! Easy.

Example

  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.

License

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

Latest podspec

{
    "name": "HWPanModal",
    "version": "0.2.5.3",
    "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": "https://github.com/HeathWang/HWPanModal",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "heathwang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HeathWang/HWPanModal.git",
        "tag": "0.2.5.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HWPanModal/Classes/**/*",
    "public_header_files": "HWPanModal/Classes/**/*.h",
    "dependencies": {
        "KVOController": []
    }
}

Pin It on Pinterest

Share This