同样的情况,第二次因为使用了MBProgressHUD被拒绝:( [英] The same situation,Second time be rejected because of used MBProgressHUD :(

查看:25
本文介绍了同样的情况,第二次因为使用了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. 活动指示器无限旋转,用户无法访问内容

推荐答案

首先,被拒绝的原因可能是 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被拒绝:(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆