ハロの外部記憶インターフェイス

そろそろ覚える努力が必要かも…

NSSet

配列の集合体

NSSet *set1 = [NSSet setWithArray:(NSArray*)arr1];

allObjects

NSSetの全要素を配列に変換する

NSArray *arr1 = [allSet allObjects];

(BOOL)[A inSubsetOfSet:B]

Aセットの中にBセットが含まれているかを返す

NSSet *set1 = [NSSet setWithArray:arr1];
NSSet *set2 = [NSSet setWithArray:arr2];
[set1 isSubsetOfSet:set2]==YES ? @"yes", @"no";
  1. set1の中にset2が含まれている場合、yesを返す