How do I add UIImageView to UIAlertView in xamarin.forms?

UIAlertView alert = new UIAlertView () { 
    Title = alertTitle, Message = alertMessage
};

UIImageView imageview = new UIImageView ();
UIImage img = UIImage.FromFile ("Resources/Default.png");
imageview.Image = img;
alert.AddSubview (imageview);

alert.AddButton (alertPositiveBtnText);
alert.AddButton (alertNegativeBtnText);
alert.Show ();

This is the piece of code i am working upon.I want to show an image as background in alertbox.I have set theUIImageView andUIAlertView but image is not showing up.Help me?


Source: ios

Leave a Reply