Question

I have some strange UI glitches using an UIActivityViewController when on iPad.

Complicated to tell, so here are two videos. One showing the iOS6 behavior and one the faulty iOS7 one: iOS6: http://quick.as/govpsry7
iOS7: http://quick.as/qr7jtd8b

1st Issue: The arrow is a little bit off it's position on iOS7 (by design?). Common UINavigationBar with UIBarButtonItems.

Code to present the popover (on iPad):

 ActivityPopover = [[UIPopoverController alloc] initWithContentViewController:activityViewController];

 [activityPopover presentPopoverFromBarButtonItem:sender
                         permittedArrowDirections:UIPopoverArrowDirectionAny
                                         animated:YES];

Nothing fancy here. Sender is the UIBarButtonItem.

2nd Issue: Selecting Print from UIActivityViewController PopOver has some UI transition issues on iOS7. The new Print Options PopOver moves into the view from the left, moving the desaturated background of the whole screen too. Best seen in the 2nd video.

3rd Issue: As seen, when the Print Options dialog is opened the content of the UIWebView adjusts somehow. I don't see a reason for this.

The 1st and 2nd issue even occur when browsing to "about:blank".

Does anybody know something about these glitches? Common bugs?

Edit: The 1st and 2nd look like iOS7 Bugs. I tried SVWebViewController from Sam Vermette and inserted my test code.

In SVWebViewController.m of the Demo insert:

@interface SVWebViewController () <UIWebViewDelegate>

@property (nonatomic, strong) UIBarButtonItem *backBarButtonItem;
@property (nonatomic, strong) UIBarButtonItem *forwardBarButtonItem;
@property (nonatomic, strong) UIBarButtonItem *refreshBarButtonItem;
@property (nonatomic, strong) UIBarButtonItem *stopBarButtonItem;
@property (nonatomic, strong) UIBarButtonItem *actionBarButtonItem;

@property (nonatomic, strong) UIPopoverController *popover; // added

Later in file, at the very bottom, adjust:

- (void)actionButtonClicked:(id)sender {
    NSArray *activities = @[[SVWebViewControllerActivitySafari new], [SVWebViewControllerActivityChrome new]];

    UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:@[self.self.webView.request.URL, self.self.webView.viewPrintFormatter] applicationActivities:activities];
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
        self.popover = [[UIPopoverController alloc] initWithContentViewController:activityController];
        [self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];  
    }
    else {
        [self presentViewController:activityController animated:YES completion:nil];
    }
}

This produces the same UI glitches when touching the Activity PopOver and Print Icon.

So it is reproducible with a simple demo, too.

Environment: SDK 7.0, current public Xcode (as of 02/25/2014). Targets: iOS6 and iOS7.

Edit 2/3:

Regarding the 3rd Issue I found this, so it's already reported: http://openradar.appspot.com/8668247

Regards, Frederik

Was it helpful?

Solution

Verified all three Issues to be Apple iOS Bugs.

The 1st and 2nd are visible by Demo mentioned above. The 3rd is even with the Google Browser App visible (on iPad). Source of the 3rd issue is the scaling reset of UIWebView viewPrintFormatter during dialog popup (in fact an internal UIActivity prepareAction).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top