Reputation: 623
I've just updated to Xcode 6 beta 6 and I have a following problem with my code which was working before
let reminderSubject = reminder["subject"]
println("reminderSubject: \(reminderSubject)")
let tempTuple = (reminderSubject as String)
reminderSubject is of type AnyObject?! when I try to downcast it to String it crashes with "Swift dynamic cast failure" message. The value printed by println is: Optional(Hey its Test!)
So the question is how to correctly cast AnyObject?! to String in Swift?
Upvotes: 1
Views: 703