【发布时间】:2015-07-28 07:17:12
【问题描述】:
所以我有以下功能
- (void)setMoreMenuHidden:(BOOL)hidden animated:(BOOL)animated completion:(void(^)(BOOL))completion
{
if (!hidden)
{
[self.view layoutIfNeeded];
[self.view setNeedsUpdateConstraints];
[UIView animateWithDuration:0.5f animations:^
{
[self.view layoutIfNeeded];
[_profileInfoVC viewWillLayoutSubviews];
}];
}
}
在_profileInfoVC 内我已经做到了
-(void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];
[self.view layoutIfNeeded];
self.pictureImageView.layer.cornerRadius = self.pictureImageView.frame.size.width/2;
self.pictureImageView.clipsToBounds = YES;
}
所以我知道图层在动画块中被忽略,但我认为这也意味着更新,因为它在动画期间和之后保持相当方正。有没有不需要我也为图层创建核心动画的解决方案?
【问题讨论】:
标签: ios autolayout calayer uiviewanimation