【发布时间】:2012-07-07 05:10:50
【问题描述】:
如何获取 NSBox 的 alpha 值并在 if 语句中使用它?
如果值等于 0,我想检查 NSBox 的 alpha,然后做一些事情。
if ([Preferences alphaValue ==0]) {
[[[[Preferences subviews] objectAtIndex:0] animator] setAlphaValue:0.0];
} else {
[[[[Preferences subviews] objectAtIndex:0] animator] setAlphaValue:1];
}
}
【问题讨论】:
标签: ios objective-c if-statement alpha nsbox