iphone - How to check whether all elements in an array are null or not -
i have code in want thing when elements in array null. please me in doing this.
this simple. have check array using line
int count = 0; (int i=0; i<array.count; i++) { nsstring *str = [array objectatindex:i]; if (str == (id)[nsnull null] && str.length == 0 && [str isequaltostring:@"<null>"]) { count++; if (count == array.count) { // here object null } } } good luck !!!
Comments
Post a Comment