gpt4 book ai didi

iphone - 如何将文本字段中的文本插入到警报 View 中

转载 作者:行者123 更新时间:2023-11-29 05:00:10 25 4
gpt4 key购买 nike

如果我想将文本字段中的文本插入到警报 View 中,我是否可以使用此代码?文本应该在的地方写着: 。感谢您的帮助!

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] ...

关于iphone - 如何将文本字段中的文本插入到警报 View 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7170297/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com