0
在我的iOS
窗口的默认视图中,我有两个元素。一个是UIImageView
,另一个是UIButton
。在iOs中调用按钮setBackgroundImage后,UIImageView位置发生变化
当应用程序启动时,我通过动画self.basebar.center属性来移动UIImageView
到[UIView animateWithDuration...]
。它是这样做的,并保持在基本上是y - 60pt的设定位置。
[UIView animateWithDuration:0.3
delay:0.1
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.basebar.center = CGPointMake(self.basebar.center.x, self.basebar.center.y + 60.f);
}
completion:nil ];
在同一视图中为myUIViewImage
的UIButton
。
当我点击UIButton
时,动作会做它应该做的事情,只是为按钮设置不同的背景图像......但是self.basebar.center会返回到原始位置?
这是为什么而引起的任何想法 - 是谁查看正在重绘和原self.basebar.center