开发者

add a subview to an image without a fix position

开发者 https://www.devze.com 2023-04-12 21:24 出处:网络
Hie every one, I have an image \'image\' which is r开发者_JAVA百科otating with the accelerometer and I would liketo add a subview to it \'subimage\' and that subimage rotate with image, So a sub view

Hie every one, I have an image 'image' which is r开发者_JAVA百科otating with the accelerometer and I would like to add a subview to it 'subimage' and that subimage rotate with image, So a sub view that is moving.I don't want to fix it's position like subimage.view.frame = CGRectMake(0, 100, image.view.frame.size.width, image.view.frame.size.height); How can I do this please ? sorry for my english I'm french :/


May be you mean :

 view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
 view.autoresizesSubviews = YES;

? It's will autoresize you image and it's subviews based on the device orientation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号