【发布时间】:2013-10-28 23:28:13
【问题描述】:
我希望能够在初始化CLBeaconRegion 时添加更多信息,例如数组或字符串,以便我可以在didRangeBeacons 方法中接收它。 (非主要或次要)
目前看起来是这样的:
_advertRegion = [[CLBeaconRegion alloc] initWithProximityUUID:_uuid identifier:@"003-002-001"];
但我真的很想像这样或类似的方式初始化它:
_advertRegion = [[CLBeaconRegion alloc] initWithProximityUUID:_uuid identifier:@"003-002-001" setArrayOrSomething:myArray];
而且我显然应该能够从该地区获取信息,例如:
[region getArray];
当然,不一定要那样,只要你有一个想法,我“需要”什么。
我的尝试
- 我尝试通过
objc_setAssociatedObject设置/获取它 - 我尝试通过
setValue forKey设置它
【问题讨论】:
标签: objective-c core-location cllocationmanager core-bluetooth ibeacon