English 中文(简体)
我为什么会走在我改变其中心的位置?
原标题:
  • 时间:2009-05-12 19:13:31
  •  标签:

我原意是,它只是为了决定观点的立场。 但是,当我改变中心财产时,情况就是如此。

myView.center = CGPointMake(myView.center.x - 20, myView.center.y);

我认为,将有20个部队离开。 我想改变中心点,就这一点进行一些轮换。

最佳回答

如果你想要改变轮换点,就将固定点。 固定点在层次上,但对该观点的轮换仍然使用固定点。

问题回答

http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#/apple_ref/occ/instp/UIView/center”rel=“nofollow noreferer”>。

The center is specified within the coordinate system of its superview. Setting this property changes the values of the frame properties accordingly.

Changing the frame rectangle automatically redisplay the receiver without invoking the drawRect: method. If you want the drawRect: method invoked when the frame rectangle changes, set the contentMode property to UIViewContentModeRedraw.

因此,从本质上来说,修改<代码>center,frame,或 已限<>s,将适当重新定位和改变观点,从而相应改变其他两种特性。





相关问题
热门标签