Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用actionsheet来添加LeeAddCustomView出现问题 #172

Open
fengshh93 opened this issue Aug 30, 2022 · 1 comment
Open

使用actionsheet来添加LeeAddCustomView出现问题 #172

fengshh93 opened this issue Aug 30, 2022 · 1 comment

Comments

@fengshh93
Copy link

自定义一个table列表,当数据比较多时,按钮会跟着滚动,原因是刚好ATShareEditListView高度多出了50pt,导致按钮跟随滚动

ATShareEditListView *view = [[ATShareEditListView alloc] initWithFrame:CGRectMake(0, 0, kSCREEN_WIDTH, 0) style:UITableViewStylePlain];
[LEEAlert actionsheet].config
.LeeTitle(@"关闭后不显示在分享页面")
.LeeAddCustomView(^(LEECustomView *custom) {
custom.view = view;
})
.LeeHeaderInsets(UIEdgeInsetsMake(10, 0, 0, 0))
.LeeAddAction(^(LEEAction *action) {
action.height = 44;
action.type = LEEActionTypeDefault;
action.title = @"确认";
action.titleColor = [UIColor whiteColor];
action.insets = UIEdgeInsetsMake(6, 16, 6, 16);
action.backgroundColor = UIColor.atMainColor;
action.backgroundHighlightColor = UIColor.atMainColor;
action.cornerRadius = 5.0f;

        })
        .LeeCornerRadius(0.0f) // 设置圆角曲率为0
        .LeeConfigMaxWidth(^CGFloat(LEEScreenOrientationType type) {
            // 这是最大宽度为屏幕宽度 (横屏和竖屏)
            return CGRectGetWidth([[UIScreen mainScreen] bounds]);
        })
        .LeeConfigMaxHeight(^CGFloat(LEEScreenOrientationType type) {
            // 这是最大宽度为屏幕宽度 (横屏和竖屏)
            return CGRectGetHeight([[UIScreen mainScreen] bounds])*0.9;
        })
        .LeeActionSheetBottomMargin(0.0f) // 设置底部距离屏幕的边距为0
        .LeeActionSheetBackgroundColor([UIColor whiteColor])
        .LeeShow();
@lixiang1994
Copy link
Owner

你可以尝试限制customView的高度达到你想要的效果吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants