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++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -