- Posts: 5
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
Freezing UI on search in large pdf
9 years 7 months ago #11018
by JulienP88
Freezing UI on search in large pdf was created by JulienP88
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?
9 years 7 months ago #11021
by emanuele
Replied by emanuele on topic Freezing UI on search in large pdf
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.
to avoid this behavior, you could perform the action in background, for example using performBlockInBackground method of the NSObject category included into demo project.
9 years 7 months ago - 9 years 7 months ago #11024
by JulienP88
Replied by JulienP88 on topic Freezing UI on search in large pdf
This is not working. The search is still blocking the UI!
Do do you habe another solution?
This is my code:
Do do you habe another solution?
This is my code:
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];
});
});
Last edit: 9 years 7 months ago by JulienP88.
Time to create page: 0.405 seconds