wait_fences:未能收到回复:10004003 - 什么?
-
25-09-2019 - |
题
被收到这个奇数错误。
继承人处理 - 在下面的方法我有一个警报视图上来,需要U / N和PW,然后atempt启动另一个方法
方法
-postTweet
不得到激活
我刚刚得到这个错误控制台
wait_fences: failed to receive reply: 10004003
这是非常奇怪的 - 如Ive未曾
看到它之前- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (alertView == completeAlert ) {
if (buttonIndex ==1) {
passPromtAlert = [[UIAlertView alloc] initWithTitle:@"Enter Name" message:@"Please enter your Username and password - they will be saved\n" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Tweet", nil];
[passPromtAlert addTextFieldWithValue:@"" label:@"Enter username"];
[passPromtAlert addTextFieldWithValue:@"" label:@"Enter password"];
textField = [passPromtAlert textFieldAtIndex:0];
textField2 = [passPromtAlert textFieldAtIndex:1];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.keyboardType = UIKeyboardTypeAlphabet;
textField.keyboardAppearance = UIKeyboardAppearanceAlert;
textField.autocapitalizationType = UITextAutocapitalizationTypeWords;
textField.autocorrectionType = UITextAutocapitalizationTypeNone;
textField.textAlignment = UITextAlignmentCenter;
textField2.secureTextEntry = YES;
textField2.clearButtonMode = UITextFieldViewModeWhileEditing;
textField2.keyboardType = UIKeyboardTypeAlphabet;
textField2.keyboardAppearance = UIKeyboardAppearanceAlert;
textField2.autocapitalizationType = UITextAutocapitalizationTypeWords;
textField2.autocorrectionType = UITextAutocapitalizationTypeNone;
textField2.textAlignment = UITextAlignmentCenter;
[passPromtAlert show];
}
}
if (alertView == passPromtAlert ) {
if (buttonIndex == 1) {
NSLog(@"here");
[self postTweet];
}
}
}
任何帮助,将理解的
由于
萨姆
增加:
如果您需要看到更多的代码,然后让我知道
解决方案
在这里我也面临着同样的问题,在我的项目,我设法解决现在的问题。需要使用的NSTimer调用的方法。
所以,在这里,你在呼唤里面另一个警报装置,当一个警报,然后解雇你在呼唤有新的警报一个警报。这是没有问题的这一点。您可以轻松地做到这一点。 (UIAlertView中*)alertView clickedButtonAtIndex:(NSInteger的)buttonIndex {(无效)alertView - 而不是定义在该方法内” alertview的 如果(alertView == completeAlert)”,则可以创建一个方法例如‘Show_AlertMessage’,用计时器这样调用它。
[NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(Show_AlertMessage) userInfo:nil repeats:NO];
让我知道你是否能摆脱这个问题。因为我做了我的身边,我们会解决这个问题。
其他提示
我相信这个问题是由您关闭第一个,然后创建另一个警报视图造成的。由于只有一个警报视图被认为是存在于任何一个时的第二警报视图踩着第一个。
您需要创建和示出第二前以关闭该第一图。
解决方案就在这里!我有同样的错误,现在我得到了解决,这可能会帮助你。使用AlertView的此委托
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex{
您UITextField*
没有被驳回了警报前辞去其firstresponder状态。
此弄乱响应链。添加[textField resignFirstResponder]
或[textField2 resignFirstResponder]
作为适用于UIAlertViewDelegate实现(alertView:clickedButtonAtIndex:
)
此外,安排你的第二个UIAlertView中显示第一被罚下场后(您可以使用做到这一点(performSelector:withObject:afterDelay:
)