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