iphone - iOS setting Progress bar value while images are being processed -


I have some image processing using quartz, and I have to show a UI display that changes after every action . (Eg 0.0 0.2 0.4 0.6 0.8 1.0)

The problem is, when my image is being processed, the UI is completely locked, and the price changes only when all the processes (Which means it's just going without sub-stages of 1.0),

Has any of you ever met this?

Pseudo: For (uint i = 0; i <5; i ++) {// execute some quartz based operations, such as CGContextDrawTiledImage Etc ... my progress .progress = (i + 1) * 0.2; }

Therefore, instead of changing the progress bar after each action, it only changes once at the end of 1.0. Your feedback or experience or appreciate it.

Thanksgiving - Ink.

You must update your property or your progress bar in a separate thread so that both of them update in parallel Able to

Your progress is a member variable

  [NSThread detachNewThreadSelector: target for @selector (updateFilterProgress): Object with self: zero]; PrgLoader.progress = x; - (zero) Update filter progress {NSAutoreleasePool * pool = [NSAutoreleasePool new]; Keep this thread live while loading ([Praglodar Progress Flat Value] & lt; 1.0f) // Load You can include a way to avoid (a BOOL flag) {GTMLoggerInfo (@ "Updating progress% f", [progress float value]); PrgLoader.progress = [Float value of progress]; } [Bridge release]; }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -