Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.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
Iphone 如何将文本字段中的文本插入警报视图_Iphone_Objective C_Ios_Ipad_Uialertview - Fatal编程技术网

Iphone 如何将文本字段中的文本插入警报视图

Iphone 如何将文本字段中的文本插入警报视图,iphone,objective-c,ios,ipad,uialertview,Iphone,Objective C,Ios,Ipad,Uialertview,如果我想将文本字段中的文本插入到警报视图中,我会使用此代码吗?文本应该在哪里,它说:。谢谢你的帮助 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message: %@",textField.text delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; 使用

如果我想将文本字段中的文本插入到警报视图中,我会使用此代码吗?文本应该在哪里,它说:。谢谢你的帮助

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message: %@",textField.text delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

[alert show];
[alert release];
使用以下命令:

... message:[NSString stringWithFormat:@"Message: %@",textField.text] ...