如何将 class 返回的整数值显示到 NStextField?

How to display Integer value returned from class on to the NStextField?

在这里,我附上了将显示我的代码的图片,我正在尝试从 objective-c 中的 class 访问值并尝试在 NSTextField

上显示

这是因为 NSInteger 将转换为 32 位和 64 位 CPU 位 changes.You 可以使用它来避免这种情况:

NSLog(@"Your integer: %ld", (long)txt1.integerValue);

或者您可以忽略这些错误,因为这无关紧要。