Reputation: 10575
In my iOS 5 project, using ARC and Storyboards, I feel that I have run into a strange behavior. I would like to confirm if what I am experiencing is in fact the default behavior AND if it can be modified.
I have a NavigationController
with a RootViewController
in story board. Neither of these is tied to a specific subclass. On RootViewController
I have a button that is connected to a segue for a ListingViewController
, which makes a static call to a web service (does not vary by user input). What I have noticed - at least in the simulator - is that when I press the button, go back, and press it again, the second time it loads unrealistically quickly! It seems as though the ListingViewController
is being cached.
Is this supposed to be happening? What can I do to fix it?
Upvotes: 1
Views: 804
Reputation: 124997
Is this supposed to be happening? What can I do to fix it?
Why do you think it's broken? I haven't looked into whether the storyboard holds onto its view controllers, but it wouldn't be surprising if it does.
If you're doing something like making your web service request in -viewDidLoad
, but you want it to happen every time the view appears, you should move that to -viewWillAppear
or -viewDidAppear
.
Upvotes: 3