Answer by Papershine for Is it safe to force unwrap an optional after...
The difference between if and guard is just simple, but in your case, you should use if, not guard. guard should be used when some values are expected to be present for the function to execute as...
View ArticleIs it safe to force unwrap an optional after checking it is not nil
I have a network method that return me a completion closure with an Error as the parameter.I usually avoid force unwrapping, but in that case, I use a guard statement to check if error is not nil:guard...
View Article