我试图在它通过改变α水平来回一次的观点负载跳动缓慢,以至于有一个图像的UIButton ...使uibutton脉动。
目前我在做这一点,但什么都不做....
-(void)loopdyloop
{
while (myCount < 1000)
{
[UIView animateWithDuration:3.0
delay:0.0f
options:UIViewAnimationCurveEaseOut
animations:^{
iconButton.alpha = 0.0;
} completion:^(BOOL finished) {
if (finished) {
NSLog(@"animated");
}
}];
[UIView animateWithDuration:3.0
delay:0.0f
options:UIViewAnimationCurveEaseOut
animations:^{
iconButton.alpha = 1.0;
} completion:^(BOOL finished) {
if (finished) {
NSLog(@"animated");
}
}];
myCount++;
}
}
这种方法是从viewDidLoad方法调用,
相当粗糙,但我知道它我最好的尝试,如果你对我怎么能做到这一点,将不胜感激的任何想法。
我实际上看到了类似这个代码的东西..但我无法弄清楚如何将它应用到一个uibutton。我认为会有更多的东西不仅仅是mybutton.layer:P:P感谢你的高举!动画真棒! :P – HurkNburkS 2012-07-12 20:30:05
哈哈哈,我也是。我想你只需要在你的按钮层应用它。所以goodluck :) – Bazinga 2012-07-13 00:29:27
这看起来不错! – pob21 2012-09-24 18:56:59