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

Already on GitHub? Sign in to your account

The drop down sometimes stop working... #13

pulkitsinghal opened this Issue Dec 16, 2012 · 5 comments


None yet
2 participants

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.

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

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 - danielgindi@gmail.com

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 - danielgindi@gmail.com
                          completion:^(BOOL finished) {
-                             if (finished)
-                             {
+                             //if (finished)
+                             //{
                                  [self done];
-                             }
+                             //}

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 commented Jan 21, 2013

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


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/YRDropdownView@2e1955f

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment