ios - Resize subviews on animated frame change (autoresizing mask)? -
i know works if change view's frame via changing of layer's transform (in case takes view subviews , works if single image). not enough me use because:
- it hard calculate appropriate position;
- i use
hmlauncherview
has logic based on frames not transforms.
i tried lot of ways described here seems autolayout because none of them works. depending on type of autoresizing mask elements jump destination position , of them not affected @ or affected via strange ways.
how solve such issue? there ways solve via autoresizing mask?
edited
animation code (the same result setting of center/bounds):
[uiview animatewithduration:0.3 animations:^{ lastlaunchericon.layer.transform = catransform3didentity; cgrect r = self.bounds; r.origin.y = max(0, min(self.scrollview.contentoffset.y, self.scrollview.contentsize.height - self.bounds.size.height)); launchericon.frame = r; } completion:^(bool finished) { ... }];
the code of layoutsubviews
seems because have tried subclass uilabel
jumps animation destination position. investigation showed frame of label set when set view's frame/bounds only. in other cases label's setcenter
, setframe
, setbounds
called when call them directly.
this question similar suggested solution doesn't work case. found out had broken view transformation doesn't appear on ios 7.1 (maybe 7.x) works on 8.3.
Comments
Post a Comment