gpt4 book ai didi

ios - 如何将带有文本的图像添加到 UIAlertView 中?

转载 作者:可可西里 更新时间:2023-11-01 05:04:38 28 4
gpt4 key购买 nike

我想将带有一些文本的图像添加到 UIAlertView 中,如下图所示 enter image description here

这是我的代码

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Please use Settings(    ) to configure the phone number and image." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(160.5, 27, 15, 15)];

imageView.image = [UIImage imageNamed:@"settingIcon.png"];

[alert addSubview:imageView];

[alert show];

但是图像没有显示在 alertview 中。你的帮助将是可观的。谢谢

最佳答案

这是表情符号。您可以在此处找到表情符号的完整 unicode:Emoji Unicode

您可以使用相应图像的 unicode 在您的警报中显示:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Midhun" message:@"\xE2\x9C\x88" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil];
[alert show];

关于ios - 如何将带有文本的图像添加到 UIAlertView 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16714053/

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