Storyboard segues without stacking?

ios, ipad, iphone, storyboard

Solution

I think everytime you end the flow in viewController C, you must just pop back to view Controller A, to start again any other flow.

Assuming you have a navigation controller, you can do this inside your viewController C, as soon your processing is done:

[self.navigationController popToRootViewControllerAnimated:YES];

In this way, your view controllers B and C will be deallocated everytime you end one flow.

Problem

I am developing an app consisting of three screens - a camera capture screen (A), a processing screen (B) and a screen showing the processing result (C). The app transitions from A to B to C and then back to A again and so on (ie. A->B->C->A->B...) . If I do this using storyboard segues (A->B, B->C, C->A) the stack of controllers would keep growing. What would be a good design to solve this?

Original source