Skip to content

Commit

Permalink
Merge pull request #49 from lhnoah/master
Browse files Browse the repository at this point in the history
Fix bug for iPhone X
  • Loading branch information
iTofu committed Oct 26, 2017
2 parents a258891 + fe3ab4c commit be11f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/LCActionSheet.m
Expand Up @@ -811,7 +811,7 @@ - (void)hideWithButtonIndex:(NSInteger)buttonIndex {
strongSelf.darkView.userInteractionEnabled = NO;

[strongSelf.bottomView mas_updateConstraints:^(MASConstraintMaker *make) {
CGFloat height = (strongSelf.title.length > 0 ? strongSelf.titleTextSize.height + 2.0f + (strongSelf.titleEdgeInsets.top + strongSelf.titleEdgeInsets.bottom) : 0) + (strongSelf.otherButtonTitles.count > 0 ? (strongSelf.canScrolling ? MIN(strongSelf.visibleButtonCount, strongSelf.otherButtonTitles.count) : strongSelf.otherButtonTitles.count) * strongSelf.buttonHeight : 0) + (strongSelf.cancelButtonTitle.length > 0 ? 5.0f + strongSelf.buttonHeight : 0);
CGFloat height = (strongSelf.title.length > 0 ? strongSelf.titleTextSize.height + 2.0f + (strongSelf.titleEdgeInsets.top + strongSelf.titleEdgeInsets.bottom) : 0) + (strongSelf.otherButtonTitles.count > 0 ? (strongSelf.canScrolling ? MIN(strongSelf.visibleButtonCount, strongSelf.otherButtonTitles.count) : strongSelf.otherButtonTitles.count) * strongSelf.buttonHeight : 0) + (strongSelf.cancelButtonTitle.length > 0 ? 5.0f + strongSelf.buttonHeight : 0) + ([[UIDevice currentDevice] lc_isX] ? 34.0 : 0);
make.bottom.equalTo(strongSelf).offset(height);
}];

Expand Down

0 comments on commit be11f6c

Please sign in to comment.