Closed juanjovn closed 4 years ago
Hey @juanjovn
To be honest I rather have the code crash in this instance (that's why I used the IUO), the user is required to have a background color, or the effect can be jarring, so I rather have an early crash that is easier to debug. An alternative that I might consider is add a nil check with a fatalError
with a more detailed explanation, but it might be overkill for such a simple use case.
If there is not background color set e.g in default created buttons, a nil stops execution when the optional is unwrapped.