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

ActionSheetStringPicker not showing on iphone #30

Closed
primoz990 opened this issue Sep 2, 2014 · 4 comments
Closed

ActionSheetStringPicker not showing on iphone #30

primoz990 opened this issue Sep 2, 2014 · 4 comments
Labels

Comments

@primoz990
Copy link

First i was using a year or so the orginal project from Tim Cinel. Now because of iOS 8 i updated to your 3.0 project.

But, the simple sample didn't show up in my app. I discovered that the problem is with the parent View. The picker was added as a view to my rootViewController, which was not actually visible at that time, so the picker was bellow my current UIViewController and so the user was unable to see him.

I decided to implement a quick workaround in SWActionSheet.m changing the line 39 from:
_origin = (keyWindow.rootViewController ? keyWindow.rootViewController.view : keyWindow);

to:
_origin = keyWindow;

Now the picker shows up on all my devices and simulator. Tested on iOS 6, 7, 8 with iPad and iPhone.

I don't know if this workaround is good or bad but it works for me. Maybe should you fix this. Tim Cinel's code was working in my app, he added the picker to the containerView like that:
origin = (_containerView.superview ? _containerView.superview : _containerView);

P.S. Thank you for the code, its perfect backward compatible to iOS 6(thats what i need) and saved me a lot of time.

Regards,
Primoz

@skywinder
Copy link
Owner

Hi! Thanks for mention that. It cause by merging #29
I try to find better way to solve it.

@vinzenzweber
Copy link

I just experienced the same issues testing on iOS 8.0 using cocoapods with your 1.1.8 release but got them resolved using the master branch as a submodule instead. Thanks!

@skywinder
Copy link
Owner

@vinzenzweber I'm glad that my work is useful for many people. you're welcome.

About this issue: the _origin = keyWindow;
is not a good solution, because it broke landscape mode on iPhone. We need to figure out something else.

@skywinder
Copy link
Owner

Fixed in #32 (v. 1.1.10)
Thanks to @serebryakov-av!

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

No branches or pull requests

3 participants