views:

28

answers:

1

I have three view controllers, let's call them A, B and C.

When a button is pressed on view A, view B is shown using presentModalViewController:animated:

When the finish button is pressed on screen B, it dismisses itself. View A is notified whereupon it immediately shows view C, again using presentModalViewController:animated:

The problem is that view A's content is momentarily flashed on the screen between view B closing and view C opening.

I can get around this by making view A blank and moving it's current content to a new view, D.

(For various reasons, I don't want view B to own view C, that's why it's not opening it)

Am I over-complicating this? I'm sure there is a smarter way to go?

ThanksT

+1  A: 

With view Controllers you are dealing with a stack of controllers. A is on top of the stack, you push B on top of A, B shows and is happy, when you dismiss B, A shows again, until the time when C is then pushed. This creates your flash effect. One way around it, without knowing more of your architecture, is for B to push the C controller, and for B to be removed from the stack at that time. More detail requires more information.

Cheers,

Kenny

Kenny
When I posted the question I was posting new views modally not using stacks. The reason being I felt my app did not suit the stack, first-on, first-off paradigm. I soon realized I was being too rigid in my thinking and that I could and should manipulate the stack contents to achieve my needs, eg popping or pushing multiple views at time etc. This is in line with your answer. Thank-you for taking the time.
KP Overflow