We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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上添加了两个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]; } 最后的效果
- (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]; }
我期望的效果:
The text was updated successfully, but these errors were encountered:
属于feature,对于带有icon类型的button适配问题
Sorry, something went wrong.
No branches or pull requests
Issue Info
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);
}];
}
`
添加开始动画的代码,我尝试通过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]; }
最后的效果
我期望的效果:
The text was updated successfully, but these errors were encountered: