如何将带有文本的图像添加到 UIAlertView 中? [英] How to add image with text into UIAlertView?
本文介绍了如何将带有文本的图像添加到 UIAlertView 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将带有一些文本的图像添加到 UIAlertView 中,如下面的给定图像
I want to add image with some text into UIAlertView like given image below
这是我的代码
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];
但是图片没有显示在警报视图中.您的帮助将是可观的.谢谢
But image is not showing inside alertview. Your help will be appreciable. Thanks
推荐答案
是表情符号.您可以在此处找到 emoji 的完整 unicode:Emoji Unicode
It is emoji. You can find the entire unicode of emoji's here: Emoji Unicode
您可以使用相应图像的 unicode 在您的警报中显示,例如:
You can use the unicode of corresponding image to show that in your alert like:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Midhun" message:@"\xE2\x9C\x88" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil];
[alert show];
这篇关于如何将带有文本的图像添加到 UIAlertView 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文