I am having trouble moving the cursor in a field I populate with data to the beginning of the text field. This question and another like it I thought would give me the answer, however, when I create the textfield the app crashes. I am trying to do this for an alert view with a textfield if that makes a difference.
Here is the code sample:
var alertView = new UIAlertView("Enter Address:", "", null, "Cancel", "Okay");
alertView.AlertViewStyle = UIAlertViewStyle.PlainTextInput;
alertView.Clicked += AlertView_Clicked;
alertView.GetTextField(0).Text = Address;
var beginning = alertView.GetTextField(0).BeginningOfDocument;
alertView.GetTextField.SelectedTextRange = alertView.GetTextField(0).GetTextRange(beginning, beginning);