Categories
ios swift swift2

Using If-Let and checking the output in a single line

This is just an example to illustrate what I am trying to achieve.

I want to check if an optional contains a value and if it is greater than 0. I currently have it this way:

if let value = Double(textFieldText) {
if value > 0 {
return true
}
}

Is there any way to achieve this in a single line? Something like:

if let value = Double(textFieldText) && value > 0{
return true
}