Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cancelButton' not working under iOS 11 #50

Open
tarekskr opened this issue Sep 25, 2017 · 8 comments
Open

'cancelButton' not working under iOS 11 #50

tarekskr opened this issue Sep 25, 2017 · 8 comments

Comments

@tarekskr
Copy link

RMStepsBar.cancelButton does not seem to be receiving touch events under iOS 11. Has anyone else faced this issue?

iOS 9 and 10 are working perfectly.

@CooperRS
Copy link
Owner

Just checked an I can confirm the issue. I'll have a look asap and let you know 🙂

@tarekskr
Copy link
Author

tarekskr commented Sep 25, 2017

Thank you so much! 🙂 I tried looking at the code but had no clue as to why this happens.

@CooperRS
Copy link
Owner

Well the problem is that the UIToolbar of iOS 11 adds some new subviews to itself. Since RMStepsBar (the bar containing the steps) inherits from UIToolbar these new subviews have been added above the view from RMStepsBar and thus receive all touch events.

I created a little branch called ios-11 which contains a fix for the problem. Mainly RMStepsBar does not inherit from UIToolbar anymore (that inheritance was a bad idea anyways 😄). Could you take a look if this branch suits your needs?

@tarekskr
Copy link
Author

This fixes the cancel button issue, but tapping the other steps on the bar doesn't work anymore 🙂

@iMark21
Copy link

iMark21 commented Oct 2, 2017

Can you update the POD?

@tarekskr
Copy link
Author

Hi Cooper, any luck? I can also try to fix it if you give me a hint where to look. Thanks!

@CooperRS
Copy link
Owner

Hey!

Sry I did not find the time to take care of it. I will as soon as possible. Hopefully next weekend 😄.

In the meantime: If you want you can take a look at RMStepsBar. The bug should be somewhere there. Probably the tap gesture recognizer has a wrong target 🙂

@tarekskr
Copy link
Author

Thank you so much for the tip. I checked it out, and it seems to be caused by this 'if' statement inside the 'recognizeTap:' method:

if(index < self.indexOfSelectedStep && self.allowBackward) { [self.delegate stepsBar:self shouldSelectStepAtIndex:index]; }

This will always be false if you're tapping a forward tab. Hope this helps 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants