Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人知道如何使用 NSDictionary 中的绑定值填充 NSTableView 吗?
提前致谢。
您需要NSDictionaryController在 Interface Builder 中创建一个。将其绑定到您的字典,然后将 绑定NSTableView到NSDictionaryController.
NSDictionaryController
NSTableView
看这里:http: //developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSDictionaryController_Class/Introduction/Introduction.html
如果你还没有完全理解 Cocoa Bindings 和 KV 编码,你应该先从这里开始阅读:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html%23//apple_ref/doc/uid/10000167i