Saving an NSMutableArray of custom Objects

Posted by aahrens on Stack Overflow See other posts from Stack Overflow or by aahrens
Published on 2010-04-23T12:54:11Z Indexed on 2010/05/28 3:01 UTC
Read the original article Hit count: 399

Filed under:
|
|

I have a custom class that is used as a wrapper to an NSMutableArray

@interface AllCourses : NSObject {

 NSMutableArray *arrClasses;
}

The array above stores Objects of another custom class.

@interface Course : NSObject {

NSString *className;
NSString *classGrade;
NSInteger creditHours;
}

I use the method below to add Course objects to my AllCourses

//Adds a new Course to the total Courses
-(void) addClass:(Course *)aCourse{
  [arrClasses addObject:aCourse];
 }

What's going to be the best way to save the arrClasses MutableArray in AllCourses so that when my app loads it can keep the saved data the user already entered and populate it?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsmutablearray