I can convert from NSMutableSet to Set no problem, but I'm running into problems when doing the reverse.
E.g. this works:
let nsSet = NSMutableSet(array: ["a", "b"])
let swiftSet = nsSet as! Set<String>
But when I try:
let nsSet2 = swiftSet as? NSMutableSet
nsSet2
ends up being nil
.
NSMutable...
collection types in Swift at all.Set
withvar
is mutable for free (and type safe). – FunchesNS(Mutable)Set
is not a property list compliant type – Funches