I want to animate all views (based on tag) with an alpha change, but I am getting a "cannot assign alpha to view" error. What would be a good way to do this?
All the views have an alpha of 0 upon being added as a subview of myCustomView
func transitionEffects() {
UIView.animateWithDuration(0.5, animations: {
for view in self.myCustomView.subviews {
if(view.tag != 999) {
view.alpha = 1
}
}
})
}