Thursday, 5 September 2013

NSArray with multiple Objects

NSArray with multiple Objects

I have a array with 10 objects , sometimes out of 10 objects ,some objects
tends to null and if any of the object is null ,Its comes as empty in my
UIPickerView but I want If the value of any object is null then it should
be skipped.. what I am trying to do is
if([ob1 isEqualToString:@""]){
NSArray *Ar =[NSArray
arrayWithObjects:ob2,ob3,ob4,ob5,ob6,ob7,ob8,ob9,ob10,Nil];}
else if [ob2 isEqualToString:@""] {}
but this will be long chain if i skip any null value this way..what should
be the better way.

No comments:

Post a Comment