Skip to content
Permalink
Browse files

feat: release 0.2.9

  • Loading branch information...
HeathWang committed Jun 19, 2019
1 parent e575827 commit ca566f0dc86551d6166f0169d8ed71fff3f924fa
@@ -32,14 +32,22 @@
* Now you can blur background.
* overwrite `- (CGFloat)backgroundBlurRadius;`, return a value > 0.
* Add a new delegate callback.
```Objective-C

```Objective-C
/**
* When you pan present controller to dismiss, and the view's y <= shortFormYPos,
* this delegate method will be called.
* @param percent 0 ~ 1, 1 means has dismissed
*/
- (void)panModalGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer dismissPercent:(CGFloat)percent;
```
```

* 0.2.8.1
* Fix blur effect not working on iOS8.0.
* 0.2.9
* UI issue fix.
* Add auto handle keyboard show/hide.




@@ -34,6 +34,8 @@
7E7A62B72280503A00F12F8C /* HWUserGroupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E7A62B62280503A00F12F8C /* HWUserGroupViewController.m */; };
7E7A62BA2280505B00F12F8C /* HWNavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E7A62B92280505B00F12F8C /* HWNavViewController.m */; };
7E8E844222B123A5009DA8BD /* HWMyCustomAnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E8E844122B123A5009DA8BD /* HWMyCustomAnimationViewController.m */; };
7EA965CF22B9F45A00BA5ED9 /* HWTextInputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EA965CE22B9F45A00BA5ED9 /* HWTextInputViewController.m */; };
7EA965D222B9F52000BA5ED9 /* HWInputTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EA965D122B9F52000BA5ED9 /* HWInputTableViewCell.m */; };
7EDE0B5922894244001E7580 /* HWFullScreenNavController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EDE0B5822894243001E7580 /* HWFullScreenNavController.m */; };
7EDE0B69228D2F9D001E7580 /* HWPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EDE0B68228D2F9C001E7580 /* HWPickerViewController.m */; };
7EDE0B75228E5428001E7580 /* HWDynamicHeightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EDE0B74228E5428001E7580 /* HWDynamicHeightViewController.m */; };
@@ -106,6 +108,10 @@
7E7A62B92280505B00F12F8C /* HWNavViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWNavViewController.m; sourceTree = "<group>"; };
7E8E844022B123A5009DA8BD /* HWMyCustomAnimationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWMyCustomAnimationViewController.h; sourceTree = "<group>"; };
7E8E844122B123A5009DA8BD /* HWMyCustomAnimationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWMyCustomAnimationViewController.m; sourceTree = "<group>"; };
7EA965CD22B9F45A00BA5ED9 /* HWTextInputViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWTextInputViewController.h; sourceTree = "<group>"; };
7EA965CE22B9F45A00BA5ED9 /* HWTextInputViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWTextInputViewController.m; sourceTree = "<group>"; };
7EA965D022B9F52000BA5ED9 /* HWInputTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWInputTableViewCell.h; sourceTree = "<group>"; };
7EA965D122B9F52000BA5ED9 /* HWInputTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWInputTableViewCell.m; sourceTree = "<group>"; };
7EDE0B5722894243001E7580 /* HWFullScreenNavController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWFullScreenNavController.h; sourceTree = "<group>"; };
7EDE0B5822894243001E7580 /* HWFullScreenNavController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HWFullScreenNavController.m; sourceTree = "<group>"; };
7EDE0B67228D2F9C001E7580 /* HWPickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWPickerViewController.h; sourceTree = "<group>"; };
@@ -330,6 +336,17 @@
path = CustomPresentingVC;
sourceTree = "<group>";
};
7EA965CC22B9F43900BA5ED9 /* TextInput */ = {
isa = PBXGroup;
children = (
7EA965CD22B9F45A00BA5ED9 /* HWTextInputViewController.h */,
7EA965CE22B9F45A00BA5ED9 /* HWTextInputViewController.m */,
7EA965D022B9F52000BA5ED9 /* HWInputTableViewCell.h */,
7EA965D122B9F52000BA5ED9 /* HWInputTableViewCell.m */,
);
path = TextInput;
sourceTree = "<group>";
};
7EDE0B5622894211001E7580 /* FullScreen */ = {
isa = PBXGroup;
children = (
@@ -371,6 +388,7 @@
7EF8D545227ECAA70093F1B3 /* PanController */ = {
isa = PBXGroup;
children = (
7EA965CC22B9F43900BA5ED9 /* TextInput */,
7EF9E37E22B3477100B94AAD /* Blur */,
7E8E843F22B12367009DA8BD /* CustomPresentingVC */,
7E689F8E229D3687000D7011 /* ShoppingCart */,
@@ -547,17 +565,13 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HWPanModal_Example/Pods-HWPanModal_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/HWPanModal/HWPanModal.framework",
"${BUILT_PRODUCTS_DIR}/KVOController/KVOController.framework",
"${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HWPanModal.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework",
@@ -602,6 +616,7 @@
7E7A62B72280503A00F12F8C /* HWUserGroupViewController.m in Sources */,
7E689F8D229D33B9000D7011 /* HWAppListViewController.m in Sources */,
7E8E844222B123A5009DA8BD /* HWMyCustomAnimationViewController.m in Sources */,
7EA965CF22B9F45A00BA5ED9 /* HWTextInputViewController.m in Sources */,
7E7A62BA2280505B00F12F8C /* HWNavViewController.m in Sources */,
7EF9E38422B34A2900B94AAD /* HWColorCollectionViewCell.m in Sources */,
7E689F91229D36D1000D7011 /* HWShoppingCartViewController.m in Sources */,
@@ -617,6 +632,7 @@
7EF8D54E227ECAA70093F1B3 /* HWColorCell.m in Sources */,
7E7A62A92280080800F12F8C /* HWTransientAlertViewController.m in Sources */,
7EF9E38122B347AC00B94AAD /* HWColorBlocksViewController.m in Sources */,
7EA965D222B9F52000BA5ED9 /* HWInputTableViewCell.m in Sources */,
7E7A62B022803DBB00F12F8C /* HWStackedGroupViewController.m in Sources */,
7EF8D54D227ECAA70093F1B3 /* HWBaseViewController.m in Sources */,
6003F59A195388D20070C39A /* main.m in Sources */,
@@ -21,6 +21,7 @@
#import "HWShoppingCartViewController.h"
#import "HWMyCustomAnimationViewController.h"
#import "HWColorBlocksViewController.h"
#import "HWTextInputViewController.h"

@implementation HWDemoTypeModel

@@ -49,13 +50,14 @@ + (instancetype)modelWithTitle:(NSString *)title targetClass:(Class)targetClass
HWDemoTypeModel *fullScreenDemo = [HWDemoTypeModel modelWithTitle:@"Full Screen - Nav" targetClass:HWFullScreenNavController.class];
HWDemoTypeModel *dynamicDemo = [HWDemoTypeModel modelWithTitle:@"Dynamic Height" targetClass:HWDynamicHeightViewController.class];
HWDemoTypeModel *customAnimationDemo = [HWDemoTypeModel modelWithTitle:@"Custom Presenting Controller" targetClass:HWMyCustomAnimationViewController.class];
HWDemoTypeModel *textInputDemo = [HWDemoTypeModel modelWithTitle:@"Handle Keyboard" targetClass:HWTextInputViewController.class];

HWDemoTypeModel *appDemo = [HWDemoTypeModel modelWithTitle:@"App Demo" targetClass:HWAppListViewController.class];
appDemo.action = HWActionTypePush;
HWDemoTypeModel *blurDemo = [HWDemoTypeModel modelWithTitle:@"Blur Background" targetClass:HWColorBlocksViewController.class];
blurDemo.action = HWActionTypePush;

[array addObjectsFromArray:@[appDemo, blurDemo, baseDemo, alertDemo, autoAlertDemo, dynamicDemo, groupDemo, stackGroupDemo, fullScreenDemo, customAnimationDemo]];
[array addObjectsFromArray:@[appDemo, blurDemo, textInputDemo, baseDemo, alertDemo, autoAlertDemo, dynamicDemo, groupDemo, stackGroupDemo, fullScreenDemo, customAnimationDemo]];

return [array copy];
}
@@ -21,10 +21,7 @@ - (void)viewDidLoad {
self.view.backgroundColor = [UIColor colorWithRed:0.000 green:0.989 blue:0.935 alpha:1.00];
}

//- (void)viewWillAppear:(BOOL)animated {
// [super viewWillAppear:animated];
// NSLog(@"%s", __PRETTY_FUNCTION__);
//}
#pragma mark - HWPanModalPresentable

- (PanModalHeight)shortFormHeight {
if ([self isLandScape]) {
@@ -0,0 +1,19 @@
//
// HWInputTableViewCell.h
// HWPanModal_Example
//
// Created by heath wang on 2019/6/19.
// Copyright © 2019 wangcongling. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HWInputTableViewCell : UITableViewCell

@property (nonatomic, readonly) UITextField *textField;

@end

NS_ASSUME_NONNULL_END
@@ -0,0 +1,44 @@
//
// HWInputTableViewCell.m
// HWPanModal_Example
//
// Created by heath wang on 2019/6/19.
// Copyright © 2019 wangcongling. All rights reserved.
//

#import <Masonry/View+MASAdditions.h>
#import "HWInputTableViewCell.h"

@interface HWInputTableViewCell () <UITextFieldDelegate>

@property (nonatomic, strong) UITextField *textField;

@end

@implementation HWInputTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(nullable NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
_textField = [UITextField new];
_textField.borderStyle = UITextBorderStyleBezel;
_textField.delegate = self;

[self.contentView addSubview:_textField];
[_textField mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@15);
make.width.equalTo(@300);
make.centerY.equalTo(@0);
}];
}

return self;
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField endEditing:YES];
return YES;
}


@end
@@ -0,0 +1,17 @@
//
// HWTextInputViewController.h
// HWPanModal_Example
//
// Created by heath wang on 2019/6/19.
// Copyright © 2019 wangcongling. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HWTextInputViewController : UIViewController

@end

NS_ASSUME_NONNULL_END
@@ -0,0 +1,78 @@
//
// HWTextInputViewController.m
// HWPanModal_Example
//
// Created by heath wang on 2019/6/19.
// Copyright © 2019 wangcongling. All rights reserved.
//

#import "HWTextInputViewController.h"
#import <HWPanModal/HWPanModal.h>
#import <Masonry/View+MASAdditions.h>
#import "HWInputTableViewCell.h"

@interface HWTextInputViewController () <HWPanModalPresentable, UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) UITableView *tableView;

@end

@implementation HWTextInputViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsZero);
}];
}

#pragma mark - HWPanModalPresentable

- (PanModalHeight)shortFormHeight {
return PanModalHeightMake(PanModalHeightTypeContent, 400);
}

- (PanModalHeight)longFormHeight {
return PanModalHeightMake(PanModalHeightTypeMax, 0);
}

- (UIScrollView *)panScrollable {
return self.tableView;
}

#pragma mark - UITableViewDataSource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
HWInputTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(HWInputTableViewCell.class) forIndexPath:indexPath];
cell.textField.keyboardType = (UIKeyboardType) indexPath.row;
cell.textField.placeholder = [NSString stringWithFormat:@"please input something @%ld", (long)indexPath.row];
return cell;
}

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}

#pragma mark - Getter

- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.rowHeight = 50;
_tableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
[_tableView registerClass:HWInputTableViewCell.class forCellReuseIdentifier:NSStringFromClass(HWInputTableViewCell.class)];

_tableView.delegate = self;
_tableView.dataSource = self;
}
return _tableView;
}


@end
@@ -1,5 +1,5 @@
PODS:
- HWPanModal (0.2.8.1):
- HWPanModal (0.2.8.2):
- KVOController
- KVOController (1.2.0)
- Masonry (1.1.0)
@@ -18,10 +18,10 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
HWPanModal: 4c707144470a0ac0a8ae02bf5ee2a37eb80796df
HWPanModal: 4f39251bb3e500e464ce7bfbd687ea4d8a431fe2
KVOController: d72ace34afea42468329623b3379ab3cd1d286b6
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201

PODFILE CHECKSUM: 8529ab6b72724aab087befdc04d830b0eea470b9

COCOAPODS: 1.6.1
COCOAPODS: 1.7.2

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

0 comments on commit ca566f0

Please sign in to comment.
You can’t perform that action at this time.