cha*_*dan 4 uiimageview uialertview ios
我想将带有一些文本的图像添加到UIAlertView中,如下图所示 
这是我的代码
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];
Run Code Online (Sandbox Code Playgroud)
但是图像没有显示在alertview内部.你的帮助会很明显.谢谢
它是表情符号.你可以在这里找到表情符号的整个unicode:Emoji Unicode
您可以使用相应图像的unicode在警报中显示:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Midhun" message:@"\xE2\x9C\x88" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil];
[alert show];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6217 次 |
| 最近记录: |