2012-03-27 81 views

回答

2

的UIView.backGroundColor是動畫所以這可能工作

button.backGroundColor = [UIColor blueColor]; 
[UIView beginAnimations:nil context:NULL]; 
[UIView setAnimationDuration:0.5]; 
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; 
button.backGroundColor = [UIColor whiteColor]; 
[UIView commitAnimations]; 
+0

感謝@amleszk,我打了這個解決方案一點爲好,它似乎是確定。我只是想知道應該有一些方法來覆蓋子類,這應該是一個更乾淨的方法來做到這一點。 Atm,我可能會用上面的解決方案。 :) – Koolala 2012-03-28 00:09:55