Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Assume that i have one array like this, NSArray * arr=[[NSArray alloc] initWithObjects:@"1",@"2",@"",@"4",@"5",nil]; for me once it reaches empty object (index 2),it should take next object and go on.. output has 1 2 4 5 .. how to make condition? Thanks in advance..
its unclear what you are asking or what you are trying to do. The headline mentions "adding" objects to an array. remember you can only add objects to an NSMutableArray.
Assume that i have one array like this, NSArray * arr=[[NSArray alloc] initWithObjects:@"1",@"2",@"",@"4",@"5",nil]; for me once it reaches empty object (index 2),it should take next object and go on.. output has 1 2 4 5 .. how to make condition? Thanks in advance..
In terms of just outputting the values that are not empty, something simple like the following would work:
for( NSString* str in arr ) { //skip over the empty ones if( [ str isEqualToString: @\"\"] ) continue;
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome