How to check an NSMutableArray is null or not ?
+8
A:
If you want to check if it is empty:
if ([myMutableArray count] == 0) { ... }
If you want to check if the variable is nil
:
if (!myMutableArray) { ... }
or:
if (myMutableArray == nil) { ... }
Alex Reynolds
2010-01-12 10:06:47