objective c - layer.presentationLayer frame not returning proper display frame during UIView animation -
objective c - layer.presentationLayer frame not returning proper display frame during UIView animation -
i've been trying hold of frame of object displayed during uiview animation. reason being, have couple of ui elements want update stuff depends on position on screen.
i know view's frame property returns destination frame 1 time animation triggered i've been trying frame of presentation layer. example, view contains subview called handle
. view animates handle
current position using:
[uiview animatewithduration: 1 animations:^{ self.handle.frame = cgrectmake(100, 100, 100, 100) }];
handle
has timer reports current frame using:
nslog(@"frame: %@", [nsvalue valuewithcgrect:[self.layer.presentationlayer frame]]);
i've tried variations on getting presentationlayer frame including:
((calayer *)self.layer.presentationlayer).frame
i've tried having timer in outer view reporting frame of handle
:
[self.handle.layer.presentationlayer frame]
i've tried animating different variations on [uiview animatewithduration...
. i've tried animating using setting cabasicanimation
, [uiview beginanimations ... commitanimations]
.
i've tried on ipad2, ipad mini, , simulator, same problem.
in cases reports steady stream of identical cgrects. animations happen without other issue. i've got quartz imported on both superview , handle
.
i sense i've exhausted many posts etc on topic can find. sense of should work, , other people seem of had success it, might in way of working?
any pointers appreciated.
thanks.
objective-c animation uiview
Comments
Post a Comment