views:

41

answers:

1

Heya!

I'm making a role-playing game, and I want to have a Map View and a Battle Screen. With the possibility of other screens as well.

I thought the best way to achieve this was to use multiple NIB files.

When I prototyped this by have one view that creates content, switching to the next view, and then back, the content on the original view was reset.

How do I make it so that the first view doesn't reset the data each time it's loaded?

Thanks!

+1  A: 

Your question is a little vague. A view usually does not get "reset" unless you run into a low memory warning. That said, even then it's just up to you to keep the right references and setup your view correctly. Maybe have a read through Apple documentation or provide some code. Adrian also has a good write-up about this.

tcurdt
I assume you have a view controller per NIB. Make sure you keep their references around.
tcurdt
How would I do that? O.o
Just retain them through an ivar/propterty.
tcurdt
Thanks for the link! :)
Adrian Kosmaczewski