madebybowtie / FlagKit

Beautiful flag icons for usage in apps and on the web.
MIT License
3.03k stars 322 forks source link

:sparkles: Flag class can now instantiate flags regardless of character case #58

Closed cHaLkdusT closed 6 years ago

cHaLkdusT commented 6 years ago

:sparkles: Flag class can now instantiate flags regardless of character cases (uppercase or lowercase). Passed countryCode is also trimmed. :white_check_mark: Added tests :wrench: Updated demo app to use Swift 4 syntax

blommegard commented 6 years ago

Hi, Thanks for the PR!

Me and @edwardjewson discussed this a bit and we think it should be treated as a user error when calling with none proper casing / trimming. However, we agree that the error reporting should be a bit better and a throwable init would be the best option, however that is not supported in Objective-C.

Does that makes sens to you as well?

cHaLkdusT commented 6 years ago

Hi @blommegard,

Thanks for reviewing my PR. I read ISO 3166 and yeah, passing non-uppercase country must be treated as user error. Happy to close this PR.

Cheers!

blommegard commented 6 years ago

Great! And thanks for the poke on migrating the demo app. :)