Latest | 0.2.6 |
---|---|
Homepage | https://github.com/HeathWang/HWPanModal |
License | MIT |
Platforms | ios 8.0 |
Dependencies | KVOController |
Authors |
HWPanModal 👍
HWPanModal is used to present controller and drag to dismiss.
Inspired by PanModal, thanks.
Snapshoot
![]() |
![]() |
Features
- Supports any type of
UIViewController
- Seamless transition between modal and content
- Support two kinds of GestureRecognizer
- UIPanGestureRecognizer, direction is UP & Down.
- UIScreenEdgePanGestureRecognizer, you can swipe on screen edge to dismiss controller.
Compatibility
iOS 8.0+, support Objective-C & Swift.
Dependency
Because Objective-C KVO is hard to use, so I use KVOController = =
Installation
pod 'HWPanModal', '~> 0.2.6.1'
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
- Clone this git.
- open the terminal, go to the
Example
Folder. pod install --verbose
- 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.
- Add
License
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": "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.6" }, "platforms": { "ios": "8.0" }, "source_files": "HWPanModal/Classes/**/*", "public_header_files": "HWPanModal/Classes/**/*.h", "dependencies": { "KVOController": [] } }
Wed, 05 Jun 2019 10:54:14 +0000