for button in buttonGroup {
UIView.animateWithDuration(1, animations: {
button.alpha = 0
})
}
VS
UIView.animateWithDuration(1, animations: {
for button in buttonGroup {
button.alpha = 0
}
})
我在buttonGroup
中有超过40个按钮,可能还会更多,我想知道哪种方式更好?标准是资源消耗。