Closed ghost closed 9 years ago
Hi @cmaynard - thanks for the PR - however I don't think this is appropriate for the core pod and something best left into your individual projects. I don't want to assume english localizations for developers or users - and this won't work well when strings are extracted into .strings files.
Sounds like your objection is to the use of the literal string "OK". I still think this category could use a convenience method like this. If you agree, I could add a button title parameter and submit another PR.
@cmaynard I just don't really see the utility of broadening the API for a single use case - that can be achieved with no fewer method calls (just empty arguments). If you have a lot of single-button alerts within an app, it makes sense to achieve this with your own utility class (or category) that extends this with your own language (OK/Done/Dismiss/localized string etc) on the cancel button title.
Add a class method to implement a basic 1-button alert that executes a completion block after the user taps the OK button.