【发布时间】:2013-05-12 15:43:01
【问题描述】:
我有两套使用
NSMutableSet *monitoredRegionSet = [[locationManager monitoredRegions]mutableCopy];
另一个是使用
获得的NSMutableSet *regionSet = [NSMutableSet setWithCapacity:regionChunks.count];
CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:coordinate radius:radius
identifier:regionString];
[regionSet addObject:region];
当我尝试在它们之间设置操作时它不起作用。我是否应该实现一个 CLRegion 类别并实现 isEqual: 和 hash: 方法。有没有更好的方法来做到这一点。
[monitoredRegionSet intersectSet:regionSet];
[monitoredRegionSet minusSet:regionSet];
【问题讨论】:
-
什么是“它们之间的集合操作”?
-
我试过 minusSet: 和 intersectSect: 但它们都不起作用。
-
你能把操作代码贴出来吗?