Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Freezing UI on search in large pdf 7 years 8 months ago #11018

  • JulienP88
  • JulienP88's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
If I start a seach request in a multi-layered very large pdf with a huge amout of pages, the UI of my App freezes and the user can't use the app 'til the search is ready. How can I avoid this behaviour?

Please Log in or Create an account to join the conversation.

Freezing UI on search in large pdf 7 years 8 months ago #11021

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

to avoid this behavior, you could perform the action in background, for example using performBlockInBackground method of the NSObject category included into demo project.

Please Log in or Create an account to join the conversation.

Freezing UI on search in large pdf 7 years 8 months ago #11024

  • JulienP88
  • JulienP88's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
This is not working. The search is still blocking the UI!
Do do you habe another solution?

This is my code:
[self.m_view vGoto:0];        
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
        dispatch_async(queue, ^{
            [self.m_view vFindStart:searchTerm :NO :NO];
            dispatch_async(dispatch_get_main_queue(), ^{
                [self.m_view vFind:1];                
            });
});

Please Log in or Create an account to join the conversation.

Last edit: by JulienP88.

Freezing UI on search in large pdf 7 years 7 months ago #11038

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

can you reproduce this issue in demo project? In this case, can you share the pdf used for testing?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum