Me encontré con este problema hoy, necesitaba tener números de teléfono y direcciones que se pueden hacer clic en mi vista de alerta y me quedé perplejo por un tiempo ya que las vistas de alerta personalizadas están fuera de cuestión.
Después de algunas investigaciones, parece que puede agregar una vista de texto a una alerta que pareció resolver mi problema. Aquí está mi enfoque que permite escalar dinámicamente alertviews (nota: el uso de C#
con Xamarin):
// create text view with variable size message
UITextView alertTextView = new UITextView();
alertTextView.Text = someLongStringWithUrlData;
// enable links data inside textview and customize textview
alertTextView.DataDetectorTypes = UIDataDetectorType.All;
alertTextView.ScrollEnabled = false; // is necessary
alertTextView.BackgroundColor = UIColor.FromRGB(243, 243, 243); // close to alertview default color
alertTextView.Editable = false;
// create UIAlertView
UIAlertView Alert = new UIAlertView("Quick Info", "", null, "Cancel", "OK");
Alert.SetValueForKey(alertTextView, (Foundation.NSString)"accessoryView");
// IMPORTANT/OPTIONAL need to set frame of textview after adding to subview
// this will size the text view appropriately so that all data is shown (also resizes alertview
alertTextView.Frame = new CoreGraphics.CGRect(owner.View.Center, alertTextView.ContentSize);
Alert.Show();
¿Qué es "propietario"? penúltima línea. Funciona muy bien por cierto! – stepheaw