因为使用了MBProgressHUD

因为使用了MBProgressHUD

本文介绍了同样的情况,第二次被拒绝,因为使用了MBProgressHUD :(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拒绝理由:活动指示器无限制地旋转,用户无法访问内容

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

同样的情况,第二次因使用了MBProgressHUD而被拒绝。

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

谁可以告诉我上传到appstore应用程序会有什么不同?我做了各种测试,这样的问题没有出现在当地。

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;

}

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

-----------------------------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........

拒绝的原因:

重现的步骤是:


  1. 启动应用程序

  2. 选择左上角的菜单按钮

  3. 选择菜单项

  4. 活动指标无法旋转且用户无法访问内容

  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


推荐答案

首先,原因是什么对于这种拒绝可能是MBProgressHUD的使用不当,而不是MBprogressHUD本身。

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

如果仅在应用商店测试期间发生这种情况,请尝试在发布配置中运行应用。那里也可能存在网络条件,你没有预料到。也许只有在出现网络错误(飞行模式?)时才会出现这种情况。发生网络错误时是否设置isLoading = NO?

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,有一种更好的方法来显示/隐藏异步请求的HUD。像这样在while循环中汇集标志是非常低效的。查看MBProgressHUD演示应用程序中的NSURLConnection示例。

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.

这篇关于同样的情况,第二次被拒绝,因为使用了MBProgressHUD :(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 13:45