protected void PerformSelectAction() { // https://stackoverflow.com/questions/34922331/getting-and-setting-cursor-position-of-uitextfield-and-uitextview-in-swift UITextPosition start = ValueField.BeginningOfDocument; UITextPosition end = ValueField.EndOfDocument; switch (_EntryCell.OnSelectAction) { case AiEntryCell.SelectAction.None: break; case AiEntryCell.SelectAction.Start: ValueField.SelectedTextRange = ValueField.GetTextRange(start, start); ValueField.Select(ValueField); break; case AiEntryCell.SelectAction.End: ValueField.SelectedTextRange = ValueField.GetTextRange(end, end); ValueField.Select(ValueField); break; case AiEntryCell.SelectAction.All: ValueField.SelectedTextRange = ValueField.GetTextRange(start, end); ValueField.Select(ValueField); //ValueField.SelectAll(ValueField); break; default: throw new ArgumentOutOfRangeException(); } }