【问题标题】:Move cursor of text field to beginning将文本字段的光标移动到开头
【发布时间】:2014-04-03 19:23:00
【问题描述】:

我在用数据填充的字段中将光标移动到文本字段的开头时遇到问题。 This questionanother like it 我想会给我答案,但是,当我创建文本字段时,应用程序崩溃了。我正在尝试为带有文本字段的警报视图执行此操作,如果这会有所不同。

这是代码示例:

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);

【问题讨论】:

    标签: ios xamarin.ios uitextfield


    【解决方案1】:

    最好在 xamarin 论坛上发布问题,因为 xamarin 社区在那里 24/7 保持活跃;下面的链接:)

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-08
      • 1970-01-01
      • 2019-11-14
      • 2011-05-09
      • 1970-01-01
      • 2011-01-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多