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

Masonry布局的View 显示的骨架屏不对 #205

Open
weqeo opened this issue Aug 22, 2022 · 1 comment
Open

Masonry布局的View 显示的骨架屏不对 #205

weqeo opened this issue Aug 22, 2022 · 1 comment
Labels

Comments

@weqeo
Copy link

weqeo commented Aug 22, 2022

Issue Info

Info Value
Platform Name iOS
Platform Version 15.6
TABAnimated Version 2.6.3
Xcode Version Xcode 13.4.1
Repro rate all the time (100%)

Issue Description and Steps

其他的没什么区别,只是布局的方式是用的masonry
视图结构很简单,就是一个View上添加了两个button

`- (void)setUpheader{
UIView * headerUnderView = [UIView new];
self.headerUnderView = headerUnderView;
[self.view addSubview:self.headerUnderView];
[self.headerUnderView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@30);
make.centerX.equalTo(@0);
make.height.equalTo(@48);
make.top.equalTo(@100);
}];

UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeSystem];
[leftBtn setBackgroundImage:[UIImage imageNamed:@"home_left_header"] forState:UIControlStateNormal];
[leftBtn addTarget:self action:@selector(leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
self.leftIv = leftBtn;
[self.headerUnderView addSubview:leftBtn];
[leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.equalTo(@0);
    make.top.bottom.equalTo(@0);
    make.width.equalTo(self.headerUnderView.mas_width).multipliedBy(0.5);
}];
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeSystem];
[rightBtn setBackgroundImage:[UIImage imageNamed:@"home_right_header"] forState:UIControlStateNormal];
[rightBtn setBackgroundImage:[UIImage imageNamed:@"home_right_header"] forState:UIControlStateSelected];
[rightBtn addTarget:self action:@selector(rigthBtnClick:) forControlEvents:UIControlEventTouchUpInside];
self.rightIv = rightBtn;
[self.headerUnderView addSubview:rightBtn];
[rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
    make.right.equalTo(@0);
    make.top.bottom.equalTo(@0);
    make.width.equalTo(self.headerUnderView.mas_width).multipliedBy(0.5);
}];

}
`

添加开始动画的代码,我尝试通过adjustBlock改变button的TABBaseComponent高度和宽度
- (void)setupTabAnimated{ [self.headerUnderView tab_startAnimationWithConfigBlock:^(TABViewAnimated * _Nonnull tabAnimated) { tabAnimated.superAnimationType = TABViewSuperAnimationTypeDefault; // tabAnimated.viewHeight = 48; } adjustBlock:^(TABComponentManager * _Nonnull manager) { // manager.animation(0).width(0); // manager.animation(0).height(0); manager.animation(1).width(100); manager.animation(1).height(10); // manager.animation(2).width(50); // manager.animation(2).height(5); } completion:nil]; }
最后的效果

image

我期望的效果:
image

@tigerAndBull
Copy link
Owner

属于feature,对于带有icon类型的button适配问题

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