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

Center actionsheet on iPad #49

Closed
bash88 opened this issue Nov 2, 2016 · 9 comments
Closed

Center actionsheet on iPad #49

bash88 opened this issue Nov 2, 2016 · 9 comments
Assignees
Milestone

Comments

@bash88
Copy link

bash88 commented Nov 2, 2016

Hi Eddy,

Great plugin.

Since updating to the latest version after the iOS10 bug mentioned in #41 the actionsheet opens in the top left corner on iPad, because I didn't set position values. Now I'd like the sheet to open in the middle of the screen, like before. How would I go about doing this, other than inputting pixel values for both orientations?

Regards,
Bas

@kahuna76
Copy link

kahuna76 commented Nov 3, 2016

Yeah this is bugging me too - takes a lot of fiddling around with dynamically setting position when opening actionsheet and rotating etc. Is there a quick/easy workaround that opens it in middle as it did before ?

@kahuna76
Copy link

kahuna76 commented Nov 3, 2016

OK got it - The below centers the popup and hides the arrow

[popPresenter setPermittedArrowDirections:0];          
popPresenter.sourceView = self.webView.superview;
popPresenter.sourceRect = CGRectMake(CGRectGetMidX(self.webView.bounds), CGRectGetMidY(self.webView.bounds),0,0);

@geshub
Copy link

geshub commented Dec 23, 2016

Is there a way to center actionsheet on iPad without changing the source code of the plugin ?

@geshub
Copy link

geshub commented Dec 31, 2016

@kahuna76 Your solution worked perfectly for me, could someone integrate it in the plugin ?

@EddyVerbruggen EddyVerbruggen self-assigned this Jan 1, 2017
EddyVerbruggen added a commit that referenced this issue Jan 1, 2017
@EddyVerbruggen EddyVerbruggen added this to the 2.3.2 milestone Jan 1, 2017
@EddyVerbruggen
Copy link
Owner

Great, published in 2.3.2

@geshub
Copy link

geshub commented Jan 2, 2017

@EddyVerbruggen Hi, just tested 2.3.2, can't find the actual centering code in the changes ?

@EddyVerbruggen
Copy link
Owner

OMG, too much 🍾 .. hang on

@EddyVerbruggen
Copy link
Owner

Version 2.3.3 is a more sober version of 2.3.2. @geshub thanks for letting me know!

@geshub
Copy link

geshub commented Jan 2, 2017

@EddyVerbruggen Tested and worked perfectly. Thanks again !

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

No branches or pull requests

4 participants