UITextField.ShouldChangeTextInRange(UITextRange, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
允许应用开发人员以编程方式拒绝替换文本。
[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
如果要中止替换操作,则为 。
- 属性