In Objective-C accessibility traits are a bitmask. Some devs find tricky to work with them using bitwise operations. In Swift they conform to the OptionSet protocol that conforms to SetAlgebra. That means you can simply insert/remove traits.

Code shows how with Objective-C you need to use bitwise operations to operate with accessibility traits. Bitwise AND (|) for adding traits and bitwise NOT (& ~) to remove them. Accessibility trait none is useful to remove all traits. In Swift, the traits conform to the OptionSet protocol that conforms to SetAlgebra, so you can do things like: insert, remove, formUnion, intersection, isSubset, etc.