views:

11

answers:

0

In my iPad app I am creating a root view that contains a lot of images that are used as thumbnails. Clicking a thumbnail presents a new window displaying details about said item, along with an enlarged thumbnail. From here it allows the user to open the item, or use aMFMailComposeViewController to create some files and export them. If the user 'opens' the item, a new view controller + view is presented.

Currently I have each new view appearing as a modal view, presented from the previous view - so the 'call stack' might look like:

thumbnailViewController
|
V    (presentModalViewController)
previewViewController
|
V     (presentModalViewController)
editCanvasViewController

So at this point the view hierarchy can be 3 or 4 modal controllers deep. This seems like a bad design to me (I assume you should only really want to be one modalView deep at any one time).

I'm experiencing some memory issues at the moment and would like to know if I should be handling this in a better way?

Do all my views + controllers remain in memory while the 'chain' of modal controllers are used? My old application for iPhone used a UINavigationController, but I'm not sure the best way to handle multiple views on the iPad.

Should I be replacing the old view controller at each step instead of relying on presenting them modally?

I guess I'm looking to see if I'm handling this in the complete wrong way :)