2011-10-18 25 views

回答

6

這是UIView的animateWithDuration方法,可以在文檔here中找到。

一個非常簡單的例子,當按下按鈕,你應該叫:

[UIView animateWithDuration:0.5 animations:^{ 
    // set new position of label which it will animate to 
    myLabel.frame = CGRectMake(x,y,width,height); 
}]; 
+0

非常感謝你亞歷克斯。它的工作現在。 – Avi

+4

你能接受答案,所以我得到我的聲譽:) – Alex

+0

我給了你另一個upvote,因爲這個人從來沒有回來。當然,因爲你的回答對我有幫助。沒有正義。然後,他似乎完全放棄了編程,因爲他從來沒有回到現場。大聲笑,沒有人保持編程,離開SO。 – Aerovistae

相關問題