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

布局重叠问题 #40

Open
YuMengShuaii opened this issue Dec 29, 2017 · 2 comments
Open

布局重叠问题 #40

YuMengShuaii opened this issue Dec 29, 2017 · 2 comments
Assignees
Labels

Comments

@YuMengShuaii
Copy link

Ios端吸顶布局会覆盖浮动布局 Android没问题望尽快解决
image
image

@HarrisonXi
Copy link
Contributor

收到,会尽快排查确认

@HarrisonXi HarrisonXi self-assigned this Jan 2, 2018
@HarrisonXi
Copy link
Contributor

目前两端对布局的优先级定义应该是稍有差别。这个后续我们确立统一优先级后会做统一处理。

目前来说,请尝试在 TangramView.m 内部:

for (UIView *layout in self.dragableLayoutArray) {
    [self bringSubviewToFront:layout];
}

for (UIView<TangramLayoutProtocol> *layout in self.stickyLayoutArray) {
    //目前仅处理吸顶类型的顶部额外offset
    if (((TangramStickyLayout *)layout).stickyBottom == NO) {
        if (self.fixExtraOffset > 0.f) {
            ((TangramStickyLayout *)layout).extraOffset = self.fixExtraOffset;
        }
        //topOffset(实际偏移顶部的距离) 已经比extraOffset大了,那么已经不需要再网上加额外的offset了
        //有两个以及以上的吸顶有可能出现这种情况
        if (topOffset >= ((TangramStickyLayout *)layout).extraOffset) {
            ((TangramStickyLayout *)layout).extraOffset = 0.f;
        }
        topOffset += (((TangramStickyLayout *)layout).extraOffset + layout.height);
    }
    [self bringSubviewToFront:layout];
}

for (UIView<TangramLayoutProtocol> *layout in self.fixLayoutArray) {
    [self bringSubviewToFront:layout];
}

尝试自行调整这三类固顶视图的固顶顺序。

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

No branches or pull requests

2 participants