-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug where the
UIWebView
goes out of scope when a method calli…
…ng `saveHtmlAsPdf:` or `saveUrlAsPdf:` finishes. UIWebView objects were locally scoped to the method calls, meaning that when those methods returned the web view was deallocated. Now the webView object is scoped to the entire class, ensuring that the delegate methods are triggered and that the PDFs are generated properly. webView is disposed of after the callbacks, since web pages for PDFs may be pretty hefty in size. Also updated the README with similar instructions for use: Your examples suggest that a local allocation of BNHtmlPdfKit will work as expected, however it goes out of scope before the delegate methods are called.
- Loading branch information
1 parent
55347aa
commit 6767874
Showing
2 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters