variables declared before viewDidLoad doesnt just run on startup?

I have been working on my app for a while now and all of a sudden, I realised something weird. I always thought that the variable that was declared before viewDidLoad only gets called on startup when the ViewController appears. However, it appears that the program goes back to the variables when I have break points on them.

My program has five tabs. And I put break points on all variables and IBOutlets that was declared before the viewDidLoad. This happens on all viewControllers expect the one that has no code in it (newly created VC).

I am suspecting the code goes to it but doesn't actually do anything?

For example, in one of the VC I declared

var downloadComplete: Bool = false 

After the download is completed, the value is set to true. However, the program goes back to the var downloadComplete: Bool = false at some point but my program doesn't do anything unusual thinking that it is still true.



Category: ios Time: 2016-07-30 Views: 6

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.178 (s). 12 q(s)