【发布时间】:2013-06-02 10:09:34
【问题描述】:
我正在尝试测试一些 NSTextField 的变化。
我正在使用:
- (void)controlTextDidEndEditing:(NSNotification *)notification {
if ([notification object] == field1)
NSLog(@"field1: stringValue == %@", [field1 stringValue]);
if ([notification object] == field2)
NSLog(@"field2: stringValue == %@", [field2 stringValue]);
if ([notification object] == field3)
NSLog(@"field3: stringValue == %@", [field3 stringValue]);
}
这可行,但我想知道是否有更好的方法。谢谢
【问题讨论】:
标签: objective-c cocoa osx-mountain-lion nstextfield