【发布时间】:2011-02-05 03:58:03
【问题描述】:
遇到这个奇怪的错误。
这就是交易 - 在下面的方法中,我有一个警报视图出现,获取一个 U/N 和 PW,然后尝试启动另一个方法。
方法
-postTweet
没有被激活
我只是在控制台中收到此错误
wait_fences: failed to receive reply: 10004003
这真的很奇怪 - 因为我以前从未见过它
- (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];
}
}
}
任何帮助将不胜感激
谢谢
山姆
添加:
如果您需要查看更多代码,请告诉我
【问题讨论】:
-
也许看到这个问题? stackoverflow.com/questions/1371346/…
-
我在我的项目中解决了同样的问题。希望您也可以使用我在下面发布的答案来解决同样的问题。
-
所以,你可以解决这个问题。这非常好。如果您需要更多帮助,请随时告诉我。
标签: iphone-sdk-3.0 uitextfield uialertview