Skip to content

Commit

Permalink
改命名
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLice committed Dec 4, 2017
1 parent 2e07871 commit 2ceff5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/QMUIModalPresentationViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ typedef NS_ENUM(NSUInteger, QMUIModalPresentationAnimationStyle) {
* @endcode
*
* 2. 使用系统接口来显示,支持界面切换,**注意** 使用这种方法必定只能以动画的形式来显示浮层,无法以无动画的形式来显示,并且 `animated` 参数必须为 `NO`。可通过 `supportedOrientationMask` 支持横竖屏。
* 可通过 shownInPresentMode 属性来判断是否在用这种方式显示。
* 可通过 shownInPresentedMode 属性来判断是否在用这种方式显示。
* @code
* [self presentViewController:modalPresentationViewController animated:NO completion:nil];
* @endcode
Expand Down Expand Up @@ -171,7 +171,7 @@ typedef NS_ENUM(NSUInteger, QMUIModalPresentationAnimationStyle) {
@property(nonatomic, assign, readonly, getter=isShownInWindowMode) BOOL shownInWindowMode;

/// 是否以系统 present 的方式显示,建议在显示之后才使用,否则可能不准确。
@property(nonatomic, assign, readonly, getter=isShownInPresentMode) BOOL shownInPresentMode;
@property(nonatomic, assign, readonly, getter=isShownInPresentedMode) BOOL shownInPresentedMode;

/// 是否以 addSubview 的方式显示,建议在显示之后才使用,否则可能不准确。
@property(nonatomic, assign, readonly, getter=isShownInSubviewMode) BOOL shownInSubviewMode;
Expand Down
6 changes: 3 additions & 3 deletions QMUIKit/QMUIComponents/QMUIModalPresentationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ - (void)handleDimmingViewTapGestureRecognizer:(UITapGestureRecognizer *)tapGestu
weakSelf.didHideByDimmingViewTappedBlock();
}
}];
} else if (self.shownInPresentMode) {
} else if (self.shownInPresentedMode) {
[self dismissViewControllerAnimated:YES completion:^{
if (self.didHideByDimmingViewTappedBlock) {
self.didHideByDimmingViewTappedBlock();
Expand Down Expand Up @@ -495,12 +495,12 @@ - (BOOL)isShownInWindowMode {
return !!self.containerWindow;
}

- (BOOL)isShownInPresentMode {
- (BOOL)isShownInPresentedMode {
return !self.shownInWindowMode && self.presentingViewController && self.presentingViewController.presentedViewController == self;
}

- (BOOL)isShownInSubviewMode {
return !self.shownInPresentMode && self.view.superview;
return !self.shownInPresentedMode && self.view.superview;
}

#pragma mark - Keyboard
Expand Down

0 comments on commit 2ceff5c

Please sign in to comment.