UIPrintInteractionController FullScreen in iPad problem

Hello. I am trying to get the UIPrintInteractionController to show correctly on iPad but I keep getting somme odd problems.


this is the code used to pop the UIPrintInteractionController



-(void)sendPropertyToPinter:(UIPrintFormatter*)pFormatter
{
    [pFormatter retain];
    NSString *filePath = [NSString stringWithFormat:@"%@/tmp.pdf",NSTemporaryDirectory()];
    NSData *data = [NSData dataWithContentsOfFile:filePath];

    UIPrintInteractionController* pic = [UIPrintInteractionController sharedPrintController];
    if (pic && [UIPrintInteractionController canPrintData:data])
    {
        pic.delegate = self;
     
        UIPrintInfo *printInfo = [UIPrintInfo printInfo];
        printInfo.outputType = UIPrintInfoOutputGeneral;
        printInfo.jobName = @"Flyer";
        printInfo.duplex = UIPrintInfoDuplexLongEdge;
        pic.printInfo = printInfo;
        pic.showsPageRange = YES;
        pic.printingItem = data;
     
        UIPrintInteractionCompletionHandler completionHandler =
        ^(UIPrintInteractionController *printController, BOOL completed,
          NSError *error) {
            if(!completed && error){
                NSLog(@"Print failed - domain: %@ error code %u", error.domain,
                      error.code);
            }
            [pFormatter release];
        };
     
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        {
            [pic presentFromBarButtonItem:self.navigationController.navigationItem.rightBarButtonItem animated:YES
                        completionHandler:completionHandler];
        } else
        {
            [pic presentAnimated:YES completionHandler:completionHandler];
        }
    }
}


This is the screenShot in Question (iPad iOS9.3 simulator) getting the same on iPad mini iOS 8.4 real device Edit:(Scrrenshot may be missing. 😟 )

as I understand this this should comme up as a Popover view and not a full modal view.

Thes view stak this is part of are not modal so from the initial viewController is a navigationView and every view afther this are all pushed so no modal view below this.


more so I get strang Logs from the console as follows



[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x825d7060>, and it is attached to <UICollectionView: 0x7ca76c00; frame = (0 0; 768 715); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x825d76a0>; layer = <CALayer: 0x825e39b0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <UICollectionViewFlowLayout: 0x825d7060>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x825d7060>, and it is attached to <UICollectionView: 0x7ca76c00; frame = (0 0; 768 715); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x825d76a0>; layer = <CALayer: 0x825e39b0>; contentOffset: {0, 0}; contentSize: {1309.5452, 715}> collection view layout: <UICollectionViewFlowLayout: 0x825d7060>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x825d7060>, and it is attached to <UICollectionView: 0x7ca76c00; frame = (0 0; 768 715); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x825d76a0>; layer = <CALayer: 0x825e39b0>; contentOffset: {0, 0}; contentSize: {1309.5452, 715}> collection view layout: <UICollectionViewFlowLayout: 0x825d7060>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x82524c00>, and it is attached to <UICollectionView: 0x7ca40400; frame = (0 0; 768 671); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x8253a2a0>; layer = <CALayer: 0x8253c840>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <UICollectionViewFlowLayout: 0x82524c00>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x82524c00>, and it is attached to <UICollectionView: 0x7ca40400; frame = (0 0; 768 671); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x8253a2a0>; layer = <CALayer: 0x8253c840>; contentOffset: {0, 0}; contentSize: {1278.4348, 671}> collection view layout: <UICollectionViewFlowLayout: 0x82524c00>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] the behavior of the UICollectionViewFlowLayout is not defined because:
[23581:24928826] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
[23581:24928826] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x82524c00>, and it is attached to <UICollectionView: 0x7ca40400; frame = (0 0; 768 671); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x8253a2a0>; layer = <CALayer: 0x8253c840>; contentOffset: {0, 0}; contentSize: {1278.4348, 671}> collection view layout: <UICollectionViewFlowLayout: 0x82524c00>.
[23581:24928826] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
[23581:24928826] Simulated\0322-Sided\032InkJet\032@\032Pascale-iMac._ipps._tcp.local.: Release-Job successful with warning: successful-ok (successful-ok)
[23581:24928826] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UIAlertController: 0x7da85e00>)


I am using this code elsewhere and it does work as it is supposed to be.

This said the PrintController does output the print to the printer, its just shows up on the screen all wrong.

UIPrintInteractionController FullScreen in iPad problem
 
 
Q