I am using below code but getting the warning,
bool versionSupports = (@available(iOS 10, *));
@available does not guard availability here; use if (@available) instead
There is a solution where I can use
if (@available(iOS 10, *)){
//compile
}else{
//fallback
}
I was curious, why an output is placeable inside if() condition but not placeable into a boolean variable?