I am using storyboards.
Here is my views
My NavigationController --> [Series of ViewControllers] ->About View Controller
Now from AboutViewController I have
AboutViewController--> ViewController1-->ViewController2-->ViewController3-->ViewController4-->
back to AboutViewController using PUSH SEGUE.
Now suppose I am a user and i do above and after coming back to AboutViewController I again go to viewController1 and so on upto viewController4 and does this loop a number of times.
I want to know if this will cause some memory issues since views are put on stack on navigationController. If so What strategy should be used to come back to aboutViewController from ViewController4
No it won’t create any memory issues. iOS takes care it for you. When it present’s another view, previous view gets deallocated automatically if you don’t have strong reference cycle(always have weak reference to the parent in child viewcontroller). You can try adding initWithCoder and dealloc methods like below in each view controllers and see what happens.
Also add viewDidAppear – ViewDidDisappear methods to see exactly what’s happening. It’s really interesting. Let me know if this doesn’t make sense.
P.S see Beginning Storyboards in iOS 5 tutorials for details.