Hi Steve. The problem is that I have no indications about the crash even setting an “All Exceptions” breakpoint. So I’m unable to identify the real case of this crash. The “computation flow” ends in "class AppDelegate: UIResponder, UIApplicationDelegate” without leave any information. I’ve noticed also that tis anomaly is present only on iPad device and iPad simulator. On iPhone device/simulator all works fine. The anomaly is present with any non empty string contained in self.testo.text
Luca. > On 25 Apr 2016, at 23:56, Steve Christensen > <[email protected]> wrote: > > 1. Could you please post the stack trace and the reason for the crash? > > 2. If this is an unhandled exception then the exception details would be > helpful to include as well. > > 3. What is the value of self.testo.text that causes the crash? > > >> On Apr 25, 2016, at 2:59 AM, Luca Ciciriello <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi All. >> In my app I’ve a method used to print some text on a printer. >> >> My code is >> >> let printController = >> UIPrintInteractionController.sharedPrintController() >> >> let printInfo = UIPrintInfo(dictionary:nil) >> printInfo.outputType = UIPrintInfoOutputType.General >> printInfo.jobName = "note" >> printController.printInfo = printInfo >> >> func textFormatter(text: String) -> String >> { >> return text.stringByReplacingOccurrencesOfString("\n", >> withString: "<BR>") >> } >> >> let formatter = UIMarkupTextPrintFormatter(markupText: >> textFormatter(self.testo.text)) >> formatter.contentInsets = UIEdgeInsets(top: 10, left: 10, bottom: >> 10, right: 10) >> printController.printFormatter = formatter >> >> if UIDevice.currentDevice().userInterfaceIdiom == .Pad >> { >> printController.presentFromRect(self.printBtn.frame, >> inView:self.view, animated:true, completionHandler: nil) >> } >> else >> { >> printController.presentAnimated(true, completionHandler: nil) >> } >> >> This code works properly in iOS 8.3 but my app crash in iOS 9.3 when in the >> code above I call >> >> printController.presentFromRect(self.printBtn.frame, inView:self.view, >> animated:true, completionHandler: nil) >> >> I’ve noticed that the app doesn’t crash if the self.testo.text is an empty >> string. This behaviour is the same on the simulator and on a real device. >> >> Where is my mistake? Any Idea? >> >> Regards >> >> Luca. >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to [email protected]
