iOS Question Loading animation or message

Yvon Steinthal

Active Member
Licensed User
Longtime User
Hi,

I have tried on several occasions to use an animation to show loading during a long loop of operations.

However it seems as if the main thread is busy doing the actual operations and it never shows me the actual animation, or shows it at the end of the operations.

Any clues as to how i could , either start a new thread to handle the animation on a separate level, or something else i havent thought of...

Thanks.

Y.
 

Yvon Steinthal

Active Member
Licensed User
Longtime User
Sometimes its just an actual transition i want to do, but it can also be something like initializing an entire new page with over 100 elements... It varies, i just want to know if there's a way to make sure the "loading animation" isn't bothered by the main thread running...

To be honest i have no idea if im being clear.

Y.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Sometimes its just an actual transition i want to do
A transition shouldn't hold the main thread. You can use Sleep to implement it.

You are clear. However the layout will not be updated while the main thread is busy. The solution is:
1. Try to optimize the process.
2. Split it into smaller tasks and add Sleep in between to allow the UI to refresh.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…