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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -