You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
This report might be a bit long in explanation.
I have a fix as well, but I am not positive of the ramifications of it.
We have an existing app that used a 3rd party lib called MGSplitViewController, which I have ported back to the iOS standard UISplitViewController, because Apple updated the Controller to work extremely well now.
The UISplitViewController shows 2 panels, a primary (on the left) and a secondary panel (on the right).
I display a TableView on the primary panel, which will call ActionSheetPicker when a user selects certain items in the TableView.
What I was seeing initially was that we would get extremely long delays when displaying the ActionSheetPicker.
Like, I would show the picker in my code, and it would take 5-20 seconds for the actual View/Picker to display on the iPad.
It would be random. Sometimes it would take 1-2 seconds, others it could take 15-20 seconds.
Extremely bizarre!
If changing the code in ActionSheetPicker to have the iPad path just take the iPhone path instead, the display worked fine, and was fast.
(And of course, on an iPhone, it works perfectly as well)
After googling and searching a bit, I have found that there a few other people/projects that have had the same problem for the iPad and iOS 8.
Every response out there, suggests to put the call into a dispatch_async() call.
So I took this line:
[popover presentPopoverFromRect:_containerView.bounds inView:_containerView
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
The Popover pops up instantly and without delay, and working as expected.
I don't know the ActionSheetPicker library well enough to know whether doing this wrap hurts anything else in the library, but it sure appears to work well.
The text was updated successfully, but these errors were encountered:
Hi! Thanks a lot for a great explanation! 👍
I remember, that some people also mention it!
I don't see anything bad to call present async from main queue.
Hi!
This report might be a bit long in explanation.
I have a fix as well, but I am not positive of the ramifications of it.
We have an existing app that used a 3rd party lib called MGSplitViewController, which I have ported back to the iOS standard UISplitViewController, because Apple updated the Controller to work extremely well now.
The UISplitViewController shows 2 panels, a primary (on the left) and a secondary panel (on the right).
I display a TableView on the primary panel, which will call ActionSheetPicker when a user selects certain items in the TableView.
What I was seeing initially was that we would get extremely long delays when displaying the ActionSheetPicker.
Like, I would show the picker in my code, and it would take 5-20 seconds for the actual View/Picker to display on the iPad.
It would be random. Sometimes it would take 1-2 seconds, others it could take 15-20 seconds.
Extremely bizarre!
If changing the code in ActionSheetPicker to have the iPad path just take the iPhone path instead, the display worked fine, and was fast.
(And of course, on an iPhone, it works perfectly as well)
After googling and searching a bit, I have found that there a few other people/projects that have had the same problem for the iPad and iOS 8.
Every response out there, suggests to put the call into a dispatch_async() call.
So I took this line:
[popover presentPopoverFromRect:_containerView.bounds inView:_containerView
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
And wrapped it into a dispatch_async() like so:
And indeed, this solved the problem!
The Popover pops up instantly and without delay, and working as expected.
I don't know the ActionSheetPicker library well enough to know whether doing this wrap hurts anything else in the library, but it sure appears to work well.
The text was updated successfully, but these errors were encountered: