Re: Updating progress of UIProgressView. And Getting Better Saving Performance
Re: Updating progress of UIProgressView. And Getting Better Saving Performance
- Subject: Re: Updating progress of UIProgressView. And Getting Better Saving Performance
- From: David Reed <email@hidden>
- Date: Tue, 07 Dec 2010 07:59:33 -0500
On Dec 7, 2010, at 3:16 AM, Gustavo Pizano wrote:
> Hello Guys..
>
> I see, I have been using GCD and blocks but on somme OSX app I did before, not on iPhone, I tough tit wasn't there... :P.
Blocks/GCD are in iOS 4.0 and higher. Assuming you have a paid developer account, you may want to watch the relevant WWDC videos from last year.
>
> SO, I from within the method( block) that makes all the saving process, I do something like
>
>>> dispatch_async(dispatch_get_main_queue(), ^{
>>> // code executed on main thread goes here (i.e., updating the progress indicator in your case
>>>
>>> });
>
>
> and update the progress indicator bar, great im gonna try that..
Yes.
>
> also I have the option to call from within the same method a [<MyConotroller With the Progress indicator> performSelectorinMainThread: withObject:<NSNumber with the float value to add> waitUntilDone:NO];
>
> right?
Yes, ssuming the selector you pass (you left it out) takes the NSNumber and updates the progress bar.
>
>
> What about the saving operation improving its saving time?, I will check today what takes longer, if creating the thumbnial, or encoding the views, maybe I shouldn't encode the whole view, but s just the image reference and the transform matrix... ?/ I will try that one also.
I didn't look at your code closely and don't have the other code around it to profile which part is taking so long.
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden