Can you extend an enum Swift?

We can extend the enum in two orthogonal directions : we can add new methods (or computed properties), or we can add new cases. Adding new methods won’t break existing code. Adding a new case, however, will break any switch statement that doesn’t have a default case.

Sizin İçin Seçtik  Vodafone müşteri hizmeti numarası kaç?

Leave a Reply

Your email address will not be published. Required fields are marked *