I caught this in a code review of someones code. They set a view to be the avoiding view of an outlet in viewDidLoad and the code crashed. There was a ton of force unwrapping when the app crashed. Just passing along. Very easy fix would be to nil coalesce the count to 0 if the avoiding view is nil.
I caught this in a code review of someones code. They set a view to be the avoiding view of an outlet in viewDidLoad and the code crashed. There was a ton of force unwrapping when the app crashed. Just passing along. Very easy fix would be to nil coalesce the count to 0 if the avoiding view is nil.