I have an application that has 6 buttons in the navigation bar. Selecting one of the buttons cause a UIPopoverController to display. The problem is that our QE are saying that when selecting one button after the other it takes too much time for the popover to appear at the next button. Our sequence was to dismiss the current popover and create a new popover. We decided it would be faster just re-use the current UIPopoverController and call setContentViewController followed by presentPopoverFromRect with new rect and view. This seems to work fine for iOS 7. But in iOS 8 it never changes it position and after to two buttons crashes with [UIPopoverController setContentViewController:animated:] can only be called after the popover has been presented. Apparently, iOS 8 doesn't think the popover is visible anymore. Does anyone have a workaround to this issue for iOS 8 other than doing what we were initially doing? Thanks for any help.
0
votes
1 Answers
0
votes
We decided it would be faster just re-use the current UIPopoverController and call setContentViewController followed by presentPopoverFromRect with new rect and view.
You can change content of already presented popover, but you are trying to change then present. So you should first present it, then call setContentViewController (animated or not) when you are sure that popover is visible/presented/loaded.