MBProgressHUD 和执行选择器问题 - iphone
我将以下代码写入 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 CallPrivateKwikis 末尾添加冒号。
Add the colon at the end of CallPrivateKwikis.
使用 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