gpt4 book ai didi

objective-c - Cocoa 有没有办法知道 NSTextField 是否脏了?如果已经编辑过?

转载 作者:行者123 更新时间:2023-12-03 17:35:31 26 4
gpt4 key购买 nike

Cocoa 有没有办法知道 NSTextField 是否脏了?如果已被编辑?

我知道有委托(delegate)方法:

- (void)textDidChange:(NSNotification *)notification;

但我想知道编辑后,当我关闭窗口时 NSTextField 是否已被编辑。

最佳答案

在委托(delegate)方法 - textDidBeginEditingtextDidChange 中,您可以设置一个 bool 变量,稍后您可以检查该 bool 变量的值。

关于objective-c - Cocoa 有没有办法知道 NSTextField 是否脏了?如果已经编辑过?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10897710/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com