UITextField.ShouldChangeTextInRange(UITextRange, String) 方法

定义

允许应用开发人员以编程方式拒绝替换文本。

[Foundation.Export("shouldChangeTextInRange:replacementText:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool ShouldChangeTextInRange(UIKit.UITextRange inRange, string replacementText);
abstract member ShouldChangeTextInRange : UIKit.UITextRange * string -> bool
override this.ShouldChangeTextInRange : UIKit.UITextRange * string -> bool

参数

inRange
UITextRange

更改文本的当前选择范围。

replacementText
String

要插入的替换文本。

返回

true 如果旧文本要替换为新文本,则为 ; false 如果要中止替换操作,则为 。

属性

适用于