2012-09-25 37 views
-4

理由:該活動的指標indefinetely旋轉,並且用戶無法訪問內容同樣的情況,第二次是因爲使用MBProgressHUD的被拒絕:(拒絕

同樣的情況,二時,因爲拒絕使用MBProgressHUD。

誰能告訴我上傳到應用商店應用會有什麼不同呢?我做了各種測試,這樣的問題並沒有出現在當地。

------------ -----------------在我的控制器中------------------------------ -----

- (void)downloadList 
{ 

    if (isLoading) { 
     return; 
    } 

    isLoading = YES; 

    //do something...... 

    //show the progressbar based on MBProgressHUD 
    [[MyDelegate getAppDelegate] showProgressBarForTarget:self whileExecuting:@selector(showProgressBarForLoading)]; 
    } 
} 

- (void)showProgressBarForLoading 
{ 
    while (isLoading) { 
     //i++; 
     continue; 
    } 
} 

- (void)downloadListDidReceive:(XGooConnection*)sender obj:(NSObject*)obj 
{ 
    //do something...... 

    isLoading = NO; 

} 

-----------------------------在我的AppDelegate中------------- ------------------

- (void)showProgressBarForTarget:(id)target whileExecuting:(SEL)theSelector 
{ 
    UIViewController *controller = [splitViewController.viewControllers objectAtIndex:0]; 

    HUD = [[MBProgressHUD alloc] initWithView:controller.view]; 
    [controller.view addSubview:HUD]; 

    HUD.delegate = self; 

    // Show the HUD while the provided method executes in a new thread 
    [HUD showWhileExecuting:theSelector onTarget:target withObject:nil animated:YES]; 
} 

------------------------- ----拒收原因詳情-------------------------------------

最新的應用版本已被拒絕........

拒絕的理由:

複製的步驟是:

  1. 啓動應用程序
  2. 在左上角
  3. 選擇菜單按鈕,選擇菜單項
  4. 活動指示燈indefinetely旋轉,並且用戶無法訪問內容

回答

3

首先,這種拒絕的原因可能是MBProgressHUD使用不當,而不是MBprogressHUD本身。

如果這隻發生在應用商店測試期間,請嘗試在發佈配置中運行應用程序。那裏也可能有網絡條件,你沒有預料到。也許這隻有在出現網絡錯誤(飛行模式?)時纔會發生。當網絡錯誤發生時,您是否設置isLoading = NO?

FWIW,有更好的方法來顯示/隱藏異步請求的HUD。像這樣在一個while循環中彙集一個標誌是非常低效的。查看MBProgressHUD演示應用程序中的NSURLConnection示例。