toh*_*lio 115
对于NSString你会使用:
NSString *myString = [theTextField stringValue];
Run Code Online (Sandbox Code Playgroud)
对于int你会使用:
int myInt = [theTextField intValue];
Run Code Online (Sandbox Code Playgroud)
还有许多其他方法可以从控件中获取值.有一个看看NSControl更多的信息参考,在"获取和设置控件值"一节.
这是一个清单:
doubleValuefloatValueintValueintegerValueobjectValuestringValueattributedStringValue| 归档时间: |
|
| 查看次数: |
44089 次 |
| 最近记录: |