[:en]Swift: optional value[:]

[:en]Error:

fatal error: unexpectedly found nil while unwrapping an Optional value

Solution:
Check to ensure the optional value is not nil before unwrapping i.e. absolutely NO “!” symbol in code:

Print Friendly, PDF & Email
Scroll to Top