我正在尝试扩展容器视图。但我不明白为什么它包含的元素也没有调整大小......它们保持原来的基本尺寸。
这是我尝试过的(告诉我我是否做了坏事或者是否可以更轻松地完成)
[UIView animateWithDuration:1.5
delay:0.0 usingSpringWithDamping:1
initialSpringVelocity:0
options:UIViewAnimationCurveLinear | UIViewAnimationOptionCurveLinear
animations:^{
_heightConstraint.constant = [[UIScreen mainScreen] bounds].size.height;
_widthConstraint.constant = [[UIScreen mainScreen] bounds].size.width;
_posYConstraint.constant = -20;
_posXConstaint.constant = 0;
// I tried desperately the following mess :)
for (UIView* i in _container.subviews) {
[i layoutIfNeeded];
}
[_container layoutIfNeeded];
[self.view layoutIfNeeded];
} completion:nil];