android activity - Objective C UIActivityView stops animating only after a delay -


i not sure why, reason uiactivityindicator spinner stays visible awhile after ask stop spinning. in app, check updates block method callback when check complete after point activity indicator hidden. nslog processed when block called, takes maybe 5-10 seconds indicator disappear. nothing going on in main far can tell, app sitting there. confused...

    [self showactivityindicator];     [[self schedulepack] checkforupdates:^(void)      {          nslog(@"done updating.");          [self hideactivityindicator];      }]; 

the problem access ui element separate thread. try replacing
[self hideactivityindicator];
with
[self performselectoronmainthread:@selector(hideactivityindicator) withobject:nil waituntildone:no];


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -