How can you quickly view the type of a variable in Xcode and Swift?
For example, if I am inside a closure and I say,
... { response, data, error in
...
}
Is there a way to quickly see the response, data and error types?
Right now, the only way to do it without doing println and building your code is saying
var test = response as! Int
or a ridiculous downgrade that will obviously show up as an error. I look and see that it says "NSURLResponse is not convertible to int" and so I know. But this is really ineffective. Is there a way to do this at all in Xcode, even if it is not a closure and you just want to see the type of the variable.
+3
source to share
1 answer