2014-10-08 46 views

回答

3

使用數組作爲媒介。寫作:

NSArray* temp = someSet.allObjects; 
if (![temp writeToURL:someURL atomically:YES]) 
    /* handle error */; 

閱讀:

NSArray* temp = [NSArray arrayWithContentsOfURL:someURL]; 
if (!temp) 
    /* handle error */; 
NSMutableSet* set = [NSMutableSet setWithArray:temp]; 
+0

我避免這種不過貌似也沒有別的辦法。這並不是那麼糟糕。 – p0lAris 2014-10-08 04:20:55