Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8369403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:38:07+00:00 2026-06-09T13:38:07+00:00

I want to implement freeform drawing in my PDF reader app. I saw a

  • 0

I want to implement freeform drawing in my PDF reader app. I saw a tutorial which uses UIImageView as the view where the drawings are rendered. I tried this and it works well, except when I try to save the drawing. Sometimes it prevents me from going from one page to another unless I tap the edges twice, other times the transition is smooth.

So what is the best way to implement this functionality?

–ADDITIONAL INFO–

To save the drawing, what I do is save it as an image using UIImagePNGRepresentation to save it in the directory. The saved image’s file name is based on the bookId and page number of the document (e.g. 121-5.png)

Now to load the drawing, a function is called which checks if an image is present based on the book’s id and page number. So if the book has and ID of 121 and I am on page 5, the function will then load the image “121-5.png”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:38:09+00:00Added an answer on June 9, 2026 at 1:38 pm

    This is just a guess (and its too late where I am to expand much on it), but if you’re trying to do the saving part in the most obvious way, probably you’re stalling the main (UI) thread. Its possible you’re not, so sorry if its presumptuous. If so, this will cause the whole interface to stall out until the image has been rendered, compressed, and saved.

    Two easy-ish methods to fix that:

    • Launch a background thread to do this, which would free up your main thread to respond to the user. (searching for NSOperation is a start. Here’s a random tutorial)
    • Pass the UILayer you want to save along to the “next page” and do the save once you transition. It’ll still stall things up a bit, but at least the user would be thinking about what to do next and you’d have a few 100ms to do something.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement a Highlight function in my pdf reader app. Unfortunately, my
I want to implement an application which will work as a parser. User will
I want implement forward geocoding in my app. But I am not able to
I want to implement email application which has all options like inbox,compose,drafts and etc.
I want to implement basic shopping cart functionality in my Rails app....are there any
I need add paging to panel, which populated with dynamically-created controls. I want implement
I want to implement a Next feature in my app. The button appears on
I want to implement a simple button in PyQt which prints Hello world when
I am new to Graph concept in android. In my app i want implement
I want to implement this on my app. I want to search for tutorials

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.