为什么这段代码有效?
// in a constants file:
#define ADFadeOutSpeed 1.1
// then, later, in another file:
-(void)fadeOut:(UIView *)sender{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:ADFadeOutSpeed];
sender.alpha = 0.0;
[UIView commitAnimations];
}
我原以为编译器会抱怨 ADFadeOutSpeed 不是强类型的。