Freezing UI on search in large pdf - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Freezing UI on search in large pdf

Freezing UI on search in large pdf 2 years 3 months ago #11018

  • JulienP88
  • JulienP88's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 2 years 3 months ago #11021

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 523
  • Karma: 20
  • Thank you received: 60
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 2 years 3 months ago #11024

  • JulienP88
  • JulienP88's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 2 years 3 months ago #11038

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 523
  • Karma: 20
  • Thank you received: 60
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