ios - AVPlayerLayer animates frame changes -
whenever change frame of avplayerlayer, video not resized immediately, animated new size.
for example: change frame (0, 0, 100, 100) (0, 0, 400, 400), view's frame changed immediately, video's size animated new size.
has encountered issue? , if yes know way disable default animation?
thanks!
you can try disabling implicit actions , using 0 length animations:
calayer *videolayer = <# avplayerlayer #> [catransaction begin]; [catransaction setanimationduration:0]; [catransaction setdisableactions:yes]; cgrect rect = videolayer.bounds; rect.size.width /= 3; rect.size.height /= 3; videolayer.bounds = rect; [catransaction commit];
Comments
Post a Comment