Migrating from one UIPopoverController to another slower on iOS8

There are several buttons in my application, each of which calls a different UIPopoverController. We have "passthroughViews", so the buttons are still on until the popovers are up. Pressing one of the buttons while displaying popover rejects the current popover and calls up a new one. The problem is that on iOS8 this seems very slow. Poppors come and go on their own very well - it’s easy when we switch from one to the other, that there is a pause between when the first closes and then starts to show. I call these functions firingDouble and presentPopoverFromRect: accesses the back, so nothing happens between them. I tried setting the "animated" to NO for both of them, but the pause still remains. Any help is appreciated.

+4
source share
4 answers

Instead of closing the popover, re-assign the same popover when the second button is pressed. Move the location of the popup on the screen and upload new content to it. It seems like it would be faster and avoid any problems related to conflict or latency that you are moving from one modal view to another (I suspect this is a problem). You will lose the fade / reappear animation, but it should be almost instantaneous and provide a good user interface, because users do not (ultimately) have to wait for the animation to see their contents when they press a new button anyway.

0

popovers? -, , , , . , viewDidLoad viewWillAppear. .

, , , , . popover.

0

,

[UIView transitionWithView:pop1.contentViewController.view duration:0 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{

    [pop1 dismissPopoverAnimated:NO];

} completion:^(BOOL finished) {

   [pop2 presentPopoverFromRect:btn.bounds inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:NO];

}];

, .

0

, - : UIPopoverController , ( , , , 4 "...), iOs8 (iOs7 ), , .

, , popover

- (NSIndexPath *) tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath;

( , ).

presentPopoverFromRect: ( , ) willSelectRowAtIndexPath: ( popover "initialize" " , , , ).

UIPopoverController , :

dispatch_async(dispatch_get_main_queue(), ^() {
    // Do the popover stuff here
});

, iOs8 ( Apple!), , ...

, ,

0

All Articles