Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIAlertView句柄文本字段_Ios_Objective C_Alertview - Fatal编程技术网

Ios UIAlertView句柄文本字段

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

我想做一个简单的alertView并询问电话号码

   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");
}