我想动画一个UIToolbar的tintColor属性,将其从一个tintColor更改为另一个。我可以淡入/动画UIToolbar的tintColor吗?
这是我正在尝试的代码。不幸的是,这种变化会立即发生,并不会从绿色变为蓝色。这很奇怪,因为我知道在共享或打电话时Apple会淡化并“脉冲”工具栏的色调。那么为什么这不起作用呢?
// set initial tint color
myBottomToolBar.tintColor = [UIColor colorWithRed:0.15 green:0.95 blue:0.15 alpha:0.6];
//animation stuff
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.95];
[UIView setAnimationDelegate:self];
//thing to animate
myBottomToolBar.tintColor = [UIColor colorWithRed:0.15 green:0.35 blue:0.45 alpha:0.6];
//animation stuff
[UIView commitAnimations];
尝试通过WSYIWYG编辑器中的二进制按钮粘贴您的代码。这样它保持格式。 – TALLBOY 2010-12-20 23:51:51