【发布时间】:2013-10-21 19:01:39
【问题描述】:
是否可以通过setValue forKey 将数组添加到CLBeaconRegion?
我已尝试添加:
[regionAdvert setValue:haveArray forKey:@"advertArray"];
但我只收到以下错误:
> Terminating app due to uncaught exception 'NSUnknownKeyException',
> reason: '[<CLBeaconRegion 0x15379600> setValue:forUndefinedKey:]: this
> class is not key value coding-compliant for the key advertArray.'
【问题讨论】:
-
您想将任意对象与该区域相关联?
-
那么,这不可能吗?我很困惑,因为 xcode 向我建议了它。 :S
-
为什么不使用
major、minor属性来识别区域? -
@Wain 识别不是问题。我想向该区域添加数据。例如,只打开一个警报视图,如果该区域有一个包含对象 abc 的数组。
标签: objective-c exception nsarray ibeacon