iphone - NSMutableDictionary 键值

标签 iphone objective-c cocoa-touch

NSMutableDictionary 的键值只能是字符串是真的吗?

我尝试使用对象,但收到警告。

最佳答案

来自docs :

In general, a key can be any object (provided that it conforms to the NSCopying protocol—see below), but note that when using key-value coding the key must be a string (see Key-Value Coding Fundamentals).

你收到了什么警告?

关于iphone - NSMutableDictionary 键值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1983822/

相关文章:

iphone - 用于检查 iPhone 与 USB 的连接的应用程序

ios - "InvalidArgumentException"在包 NSBundle 中找不到名为 "Details"的 Storyboard

objective-c - 如何实现基于属性(property)值(value)的平等?

iphone - 使用非零原点初始化 UIImageView 的更好方法

ios - 使用切换动画隐藏/显示 View

iPhone iOS 如何创建交互式拖动、旋转、调整大小、删除 View 控件?

ios - 在 iOS 中共享后,Google Plus 无法重定向到应用程序

iphone - CAAnimation 的问题

objective-c - 如果比较两个 NSString 对象时 "a == b"为假

objective-c - Outlet 应该有 getter/setter 吗?