Ios UIAlertView句柄文本字段
我想做一个简单的alertView并询问电话号码Ios UIAlertView句柄文本字段,ios,objective-c,alertview,Ios,Objective C,Alertview,我想做一个简单的alertView并询问电话号码 UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"What is your phone number?" message:nil delegate:self
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"What is your phone number?"
message:nil
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Continue", nil];
message.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField* answerField = [message textFieldAtIndex:0];
answerField.keyboardType = UIKeyboardTypeNumberPad;
answerField.placeholder = @"+43 ...";
[message show];
我需要在这里输入什么来检查有数字的东西(比如Mysql等等)
如果您不知道如何比较两个字符串是否相同,那么我建议您查找一些有关Objective-C的基本教程
if ([textField.text isEqualToString:@"090012345678"]) {
NSLog(@"WOW");
}
如果您不知道如何比较两个字符串是否相同,那么我建议您查找一些有关Objective-C的基本教程
if ([textField.text isEqualToString:@"090012345678"]) {
NSLog(@"WOW");
}