需要一些帮助。我可以在Parse中存储一个ibeacon的主要次要UUID。但是我怎样才能了解CLProximity?
示例: 这很有效,因为我可以轻松地将字符串转换为与主要NSNumber类型匹配的Int。
if clBeacon.major == beacon.objectForKey("major").integerValue
这不起作用:
beacon是PFObject and "CLProximity"
是String类型的Parse列。
if beacon.objectForKey("CLProximity") as CLProximity (This doesn't work)
if beacon.objectForKey("CLProximity") as String (This doesn't work)
任何建议伙伴们? 谢谢!
答案 0 :(得分:0)
typedef NS_ENUM(NSInteger, CLProximity) {
CLProximityUnknown,
CLProximityImmediate,
CLProximityNear,
CLProximityFar
} NS_ENUM_AVAILABLE_IOS(7_0);
因此,您可以将CLProximity
存储为NSInteger