Anytime you combine two flags or more, you use |. Except Swift, which changed it to use array syntax. But now I am staring at some documentation on local notifications that does this:
requestAuthorizationWithOptions: (UNAuthorizationOptionAlert + UNAuthorizationOptionSound)
So, to codify the discussion in comments above: no,
+ is not a replacement for
a + b == a | b if and only if
b have bitpatterns which share no overlapping bits; in the cases of option
enums, this is often true (because it is useful to represent options in this way), but not guaranteed. This is the case that you see above, though good code will be a bit more explicit (and readable) by using bitwise or.