The same situation,Second time be rejected because of used MBProgressHUD :(

我怕爱的太早我们不能终老 提交于 2019-12-08 15:34:52

问题


Reasons for Rejection: The activity indicator spins indefinetely and the user can't access the content

The same situation,Second time be rejected because of used MBProgressHUD.

Who can tell me Uploaded to appstore app would be any different? I done various tests, such a problem did not appear in the local.

-----------------------------in my controller-----------------------------------

- (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;

}

-----------------------------in my 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];
}

-----------------------------Reasons for Rejection detail-------------------------------------

The most recent version of your app has been rejected........

Reasons for Rejection:

The steps to reproduce are:

  1. Launch the app
  2. Select the Menu button at the top left corner
  3. Select a menu item
  4. The activity indicator spins indefinetely and the user can't access the content

回答1:


First off, the reason for this rejection is likely improper usage of MBProgressHUD, not MBprogressHUD itself.

If this only occurs during app store testing, try running the app in Release configuration. There also might be networking conditions there, that you haven't anticipated. Perhaps this only occurs when there is a network error (airplane mode?). Are you setting isLoading = NO when a network error occurs?

FWIW, there is a much better way to show / hide the HUD for asynchronous requests. Pooling a flag in a while loop like this is extremely inefficient. Look at the NSURLConnection example in the MBProgressHUD demo app.



来源:https://stackoverflow.com/questions/12575477/the-same-situation-second-time-be-rejected-because-of-used-mbprogresshud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!