ios - Swift 2/Xcode 7 beta - multiple bitmasks produce error -
im creating uiview animation:
uiview.animatewithduration(0.1, delay: 0, options: (.allowuserinteraction | .repeat | .autoreverse), animations: { () -> void in // animate }, completion: nil)
but compiler says “could not find member “autoreverse””, or whichever bit mask on end, unless there 1 option. has syntax changed in swift 2? can’t see in swift docs nor remember in wwdc presentations.
or possibly bug?
thanks in advance
answer found here:
swift 2.0 - binary operator "|" cannot applied 2 uiusernotificationtype operands
“in swift 2 syntax has been updated..”
to cut short, instead of
.type | .another | .third
use
[.type, .another, .third]
Comments
Post a Comment