ios - UIPrintInteractionController not displaying in iPad -


i'm trying print app runs on both iphone , ipad. there's no problem iphone part of printing. however, whenever hit print button, not pop-up allow me select printer , send job.

the view called regular uiview in navigation controller if has bearing.

the button calls via ibaction part of segmented control, since seemed best way me 3 buttons besides button in nav bar. don't think it's button because said, works in iphone version.

i have verified @ least thinks it's presenting. generates , height, width , origin pic, can't see it. terrific last piece of puzzle app.

thanks!

- (void)printstory {     uiprintinteractioncontroller *pic = [uiprintinteractioncontroller sharedprintcontroller];     pic.delegate = self;      uiprintinfo *printinfo = [uiprintinfo printinfo];     printinfo.outputtype = uiprintinfooutputgeneral;     printinfo.jobname = @"my great prompt";     pic.printinfo = printinfo;      nsstring *msgbody = [nsstring stringwithformat:@"%@%@%@", self.summarylabel.text, @"\n\n", self.storyeditortextview.text];       uisimpletextprintformatter *textformatter = [[uisimpletextprintformatter alloc]                                                  initwithtext:msgbody];     textformatter.startpage = 0;     textformatter.contentinsets = uiedgeinsetsmake(72.0, 72.0, 72.0, 72.0); // 1 inch margins     textformatter.maximumcontentwidth = 6 * 72.0;     pic.printformatter = textformatter;     pic.showspagerange = yes;      void (^completionhandler)(uiprintinteractioncontroller *, bool, nserror *) =     ^(uiprintinteractioncontroller *printcontroller, bool completed, nserror *error) {         if (!completed && error) {             nslog(@"printing not complete because of error: %@", error);         }     };      if([uidevice currentdevice].userinterfaceidiom == uiuserinterfaceidiompad) {         [pic presentfromrect:self.view.frame                       inview:self.view                     animated:yes            completionhandler:completionhandler];         }     else {         [pic presentanimated:yes completionhandler:completionhandler];     } } 

you need pass in smaller rect. can't pass in rect of view controller's view. popover displayed around perimeter of passed in rect. if rect fills screen, popover displayed off of screen. rect should relatively small rect of button or other small view such popover's pointer can touch edge of rect , rest of popover can fit on screen.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -