Welcome to the Treehouse Community
Looking to learn something new?
I created an integer and whenever i switch View Controllers the value of this integer gets reset to 0. How can i keep the value of the integer the same throughout all views?
Stone Preston42,016 Points
how are you accessing this integer from the other view controller? One way to do it is to create a property in your second view controller and pass it to the second view controller in the first view controllers prepareForSegue method