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

The drop down sometimes stop working... #13

Open
pulkitsinghal opened this issue Dec 16, 2012 · 5 comments
Open

The drop down sometimes stop working... #13

pulkitsinghal opened this issue Dec 16, 2012 · 5 comments

Comments

@pulkitsinghal
Copy link

It took me a really long time but I finally figured out why sometimes QA and end users would say that the drop-down wasn't working for them in my app sporadically.

Short-story:
If a drop-down was not dismissed in one tab of the tab bar controller ... we just had enough time to see it scroll down before we quickly switch to the other tab of the tab bar controller. Now if you try to get a drop-down to show, it won't work.

I am not an expert in this YRDropdownView project's code but I think it has something to do with the fact that in the following method:

+ (YRDropdownView *)showDropdownInView:(UIView *)view 
                         title:(NSString *)title 
                        detail:(NSString *)detail 
                         image:(UIImage *)image
                      animated:(BOOL)animated
                     hideAfter:(float)hideAfter

the current dropdown still has a non-nil value and we add the rest of the dropdowns to the queue ... behind something that will never get cleared out.

if (currentDropdown) // add to queue - [email protected]
@pulkitsinghal
Copy link
Author

Here's the patch file that fixed the strange behavior.

diff --git a/YRDropdownView/YRDropdownView.m b/YRDropdownView/YRDropdownView.m
index 2851f77..88fae10 100644
--- a/YRDropdownView/YRDropdownView.m
+++ b/YRDropdownView/YRDropdownView.m
@@ -399,10 +399,10 @@ static BOOL isRtl = NO; // keep rtl property here - [email protected]
                                                      self.frame.size.height);
                          }
                          completion:^(BOOL finished) {
-                             if (finished)
-                             {
+                             //if (finished)
+                             //{
                                  [self done];
-                             }
+                             //}
                          }];        
     }
     else 

@pulkitsinghal
Copy link
Author

My origin wasn't onemightyroar / YRDropdownView ... instead it was https://github.com/gregwym/YRDropdownView.git but the same patch should be still valid as a fix.

@gregwym
Copy link

gregwym commented Jan 21, 2013

Hi @pulkitsinghal The patch looks good. I will look into this.

@pulkitsinghal
Copy link
Author

Thanks!

@gregwym
Copy link

gregwym commented Feb 19, 2013

Hi @pulkitsinghal , sorry for the delay. I had a look into the issue and I don't see any reason for having the finished check.
I have applied your patch on gregwym@2e1955f

Thank you very much.

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

2 participants