Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-15-2010, 02:39 AM   #1 (permalink)
korki696
Registered Member
 
Join Date: Jun 2009
Posts: 16
Default Saving NSArray to file with custom objects?

Hey all,
So I need to save an NSArray to a file but the problem is the NSArray has custom objects. Someone else has posted a question like it but heres my problem. Im using the Three20 API and am trying to save the TTLauncher view (It looks like the iphone home view) and the way you do that is as follows:

Code:
array = [NSArray arrayWithObjects:
	[NSArray arrayWithObjects:
	  [[[TTLauncherItem alloc] initWithTitle:@"Game1"
	   image:@"bundle://Icon.png"
		URL:@"tt://game1" canDelete:NO] autorelease],
	  [[[TTLauncherItem alloc] initWithTitle:@"Game2"
	   image:@"bundle://Icon.png"
		 URL:@"tt://game2" canDelete:NO] autorelease],
	  [[[TTLauncherItem alloc] initWithTitle:@"Game3"
	   image:@"bundle://Icon.png"
		 URL:@"tt://game3" canDelete:NO] autorelease],
	  [[[TTLauncherItem alloc] initWithTitle:@"Game4"
	   image:@"bundle://Icon.png"
		 URL:@"tt://game4" canDelete:NO] autorelease],
	  [[[TTLauncherItem alloc] initWithTitle:@"Game5"
	   image:@"bundle://Icon.png"
		 URL:@"tt://game5" canDelete:NO] autorelease],
	  nil],
	 nil
	 ];
So how could I save this array in a file?

Thanks
-Korki
korki696 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,853
Threads: 89,223
Posts: 380,677
Top Poster: BrianSlick (7,129)
Welcome to our newest member, iphonejail01break
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.