开发者

add a subview to an image without a fix position

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜