简体   繁体   中英

How to disable UIView Layer resize bounds animation in iOS?

when I try to process an animation of UIView to make GLKView fit the screen,

the layer of GLKView was fine, but the OpenGL image of GLKView was being smaller then fit to size.

How can I make it no more smaller, just transform from origin size to new size ?

original size of opengl image

在此处输入图片说明

process an uiview animation to make opengl image fit the screen (I don't want the image being smaller when animation processing)

在此处输入图片说明

new size of opengl image

在此处输入图片说明

Try to use UIImageView

    UIImageView *imageView = [[UIImageView alloc] initWithImage:@"your image"];
    imageView.contentMode = UIViewContentModeScaleAspectFit;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM