LEEAlert icon indicating copy to clipboard operation
LEEAlert copied to clipboard

使用actionsheet来添加LeeAddCustomView出现问题

Open fengshh93 opened this issue 2 years ago • 1 comments

自定义一个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();

fengshh93 avatar Aug 30 '22 08:08 fengshh93

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

lixiang1994 avatar Sep 02 '22 11:09 lixiang1994