Closed beakr closed 12 years ago
I considered something like this, and BubbleWrap has this syntax, and it works well. sugarcube has a certain style to it, which is based on adding methods to built-in classes. It turns some operations on their head, so this might look like this:
'Task completed'.alert
which I'm not sure I'm a fan of...
This has been added as a class method on UIAlertView
.
UIAlertView.alert "I mean, is this cool?", buttons: %w[No! Sure! Hmmmm]
message: "No going back now",
cancel: { self.cancel },
success: { |pressed| self.proceed if pressed == "Sure!" }
A really nice helper would be an
alert()
method, so users wouldn't have to do a millionUIAlertView
s: