2014-09-04 31 views
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 ]; 

在同一视图中为myUIViewImageUIButton

当我点击UIButton时,动作会做它应该做的事情,只是为按钮设置不同的背景图像......但是self.basebar.center会返回到原始位置?

这是为什么而引起的任何想法 - 是谁查看正在重绘和原self.basebar.center

回答

0

自动布局...布局是恢复到原来的布局被点击按钮时被..

相关问题