CooperRS / RMActionController

This is an iOS control for presenting any UIView in an UIAlertController like manner
MIT License
539 stars 59 forks source link

ActionController dismiss on background added #14

Closed farri closed 8 years ago

farri commented 8 years ago

Dear,

I've added 2 features to this project:

  1. UITextFields on ActionSheet and moving action sheet to top on textField click
  2. Dismissing ActionController on Background click.
CooperRS commented 8 years ago

Hey!

Thank your for your pull request. In particular, the keyboard supports sounds interesting :). I'll review your pull request asap.

However, background taps should already be supported. You only need to add a cancel action who's handler will be called when a tap on the blurred background is recognized. Have you checked that?

Best regards, Roland

yasirmturk commented 8 years ago

It is good if you dont have cancel action in the design and only way to dismiss is to tap the background

CooperRS commented 8 years ago

But in this case, you then have no delegate being called when the action controller is dismissed (may be a problem bust does not have to).

However, you might be right, that in cases with no cancel button this functionality might be useful. But these cases should be handled by the same gesture recognizer that recognizes all other taps on the background view. It's handler is implemented in - (void)backgroundViewTapped:(UIGestureRecognizer *)sender. In addition, an option to disable this behaviour might be nice, as well :)

yasirmturk commented 8 years ago

You are right @CooperRS , it should be handled by same gesture recognizer and should call the same delegate and it should be possible to disable the behaviour @farri