We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have create a spread sheet view and want to print this using UIActivityController but i don't know how to do that?
The text was updated successfully, but these errors were encountered:
Try this in your view controller. It will allow you're user to print the spreadsheet (as a PDF), send it through email and stuff like that.
let pdfData = NSMutableData()
UIGraphicsBeginPDFContextToData(pdfData, view.frame, nil)
UIGraphicsBeginPDFPage()
guard let pdfContext = UIGraphicsGetCurrentContext() else { return }
view.layer.renderInContext(pdfContext)
UIGraphicsEndPDFContext()
let controller = UIActivityViewController(activityItems: [pdfData], applicationActivities: nil)
controller.popoverPresentationController?.sourceView = self.view
presentViewController(controller, animated: true, completion: nil)
Apologies for it being in Swift. I'm no good at Obj-C
Sorry, something went wrong.
Thanks for your code. I will appreciate your effort that you have made for me. I'll translate it into Obj-C. Once Again Thank you.
No branches or pull requests
I have create a spread sheet view and want to print this using UIActivityController but i don't know how to do that?
The text was updated successfully, but these errors were encountered: