Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

replaceObjectAtIndex

Ads

 
 

Share on Google+Share on Google+

Java Coder
replaceObjectAtIndex
1 Answer(s)      5 years and 4 months ago
Posted in : MobileApplications

How to write nsmutablearray replaceobjectatindex withobject?

Ads
View Answers

March 28, 2012 at 12:29 PM


myModel = [NSMutableArray arrayWithObjects:@"3 animals", @"dog", @"cat", @"chicken", nil];
// here, wherever else my model is altered:
[myModel replaceObjectAtIndex:0 withObject:[NSString stringWithFormat:@"%d animals", myModel.count-1]];

Ads









Related Tutorials/Questions & Answers:
replaceObjectAtIndex
replaceObjectAtIndex  How to write nsmutablearray replaceobjectatindex withobject?   myModel = [NSMutableArray arrayWithObjects:@"3 animals...: [myModel replaceObjectAtIndex:0 withObject:[NSString stringWithFormat:@"%d
NSMutableArray change object at Index
, it's fine to do like that) [allMessageArray replaceObjectAtIndex:index
Advertisements