Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add image with text into UIAlertView?

I want to add image with some text into UIAlertView like given image below enter image description here

Here is my code

    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

like image 959
chandan Avatar asked Dec 21 '22 05:12

chandan


1 Answers

It is emoji. You can find the entire unicode of emoji's here: Emoji 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];
like image 73
Midhun MP Avatar answered Dec 24 '22 09:12

Midhun MP