2011-08-24 91 views

回答

2
NSMutableArray *totalArray = [ [ NSMutableArray alloc] init]; 

    //here i assume u want to delete NSString object vijay in all arrays 

NSString *[email protected]"vijay"; 

[totalArray addObject:firstArray]; 

[totalArray addObject:secondArray]; 

for (NSMutableArray *arr in totalArray) { 



    if ([arr containsObject:toDelete]) { 

     [arr removeObject:toDelete]; 

    } 



} 

NSLog(@"firstarry : %@ \n\n",firstArray); 

NSLog(@"secondarray : %@ \n\n",secondArray); 
+0

您好,我想從所有的數組中刪除僅此特定項目,而不是一個陣列 – Lucas

+0

更新的代碼中的所有項目............. –

+0

的http://計算器.com/questions/6308425/ios-5-best-practice-release-retain –

相關問題