我有這樣的代碼在點擊一個按鈕[NSThread detachNewThreadSelector: @selector(spinBegininapp) toTarget:self withObject:nil];
以顯示該後臺線程運行用戶活動的指標,我把這個代碼,以使活動的指示燈如何實現UIProgressView在iPhone SDK的
- (void)spinBegininapp
{
_activityindictor.hidden = NO;
}
它的工作正常,當我點擊按鈕它顯示活動指標動畫,當線程去隱藏活動指標,但我的需要是顯示progressView而不是activity-indicator,它根據線程前進,如果線程完成,它需要完全達到進展並且自己隱藏起來,這是可能的。
是烏爾正確,我在這裏爲更新我的進度,因爲價值changes.i把這個代碼,但沒有運氣filepercentage =(float)1 /(float)10; \t progressview.progress = filepercentage; \t \t int p = 100 * filepercentage; NSString * percent = [NSString stringWithFormat:@「%d %%」,p]; – stackiphone 2012-03-08 08:32:05
「filepercentage =(float)1 /(float)10」你在這裏做什麼?以及你面對的是什麼錯誤......? – 2012-03-08 08:43:08
我沒有在我的progressview中獲得progrees更新。 – stackiphone 2012-03-08 08:47:48