2
我想通过在animationWithDuration块中使用自动布局来更改tableview框架。像那样;使用自动布局更改带有动画的tableview框架
[UIView animateWithDuration:0.3f animations:^{
weekdayOffersVerticalConstraint.constant = 80;
[headerView layoutIfNeeded];
[weekdayTableView layoutIfNeeded];
self.isTableViewSmall = YES;
} completion:^(BOOL finished) {
}];
我的tableview的帧与此代码块改变,但是当我滚动下来,细胞左侧来到右边,我认为这是有关与[weekdayTableView layoutIfNeeded];
layoutIfNeeded影响到所有的子视图。我如何阻止影响到我的tableview的单元格?
对不起,我的英语不好,非常感谢您的回答和建议。
它的工作,非常感谢你:)。 –