0

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);
Community
  • 1
  • 1
Blaze Phoenix
  • 859
  • 2
  • 14
  • 33

1 Answers1

0

Better to post questions on xamarin Forums,because xamarin community remain active there 24/7; link below :)

http://forums.xamarin.com/categories/ios