MBProgressHUD 和执行选择器问题 - iphone

发布于 2024-11-27 00:00:46 字数 637 浏览 3 评论 0原文

我将以下代码写入 MBProgressHUD:

HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[self.view addSubview:HUD];
HUD.delegate = self;
HUD.labelText = NSLocalizedString(@"Loading Workbench", nil);
HUD.detailsLabelText = NSLocalizedString(@"please wait", nil);
[HUD showWhileExecuting:@selector(loadWorkbench) onTarget:self withObject:nil animated:YES];

并在 loadWorkbench 方法中编写了如下代码:

[self PerformSelector:@selector(CallPrivateKwikis) withObject:nil afterDelay:0.1];

但从这里 CallPrivateKwikis 永远不会被调用。我找不到问题。

你们中的任何人都可以帮忙解决这个问题吗?

提前致谢。

i wrote below code to MBProgressHUD:

HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[self.view addSubview:HUD];
HUD.delegate = self;
HUD.labelText = NSLocalizedString(@"Loading Workbench", nil);
HUD.detailsLabelText = NSLocalizedString(@"please wait", nil);
[HUD showWhileExecuting:@selector(loadWorkbench) onTarget:self withObject:nil animated:YES];

and in loadWorkbench method i wrote the code like:

[self performSelector:@selector(CallPrivateKwikis) withObject:nil afterDelay:0.1];

but from here CallPrivateKwikis is never called. i am unable to find the problem.

can any one of you please help on this.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

春夜浅 2024-12-04 00:00:46
[self performSelector:@selector(CallPrivateKwikis:) withObject:nil afterDelay:0.1];

在 CallPrivateKwikis 末尾添加冒号。

[self performSelector:@selector(CallPrivateKwikis:) withObject:nil afterDelay:0.1];

Add the colon at the end of CallPrivateKwikis.

伴我老 2024-12-04 00:00:46

使用 HUD = [[MBProgressHUD alloc]initWithview:self.view]];
插入
HUD = [MBProgressHUD showHUDAddedTo:self.view 动画:YES];那么你的问题就解决了

Use HUD = [[MBProgressHUD alloc]initWithview:self.view]];
insted of
HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; then ur problem will be solved

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文