Hi all am developing a app using swift 2.2 i declared a variable in first view controller i want to access that in second view controller.i have searched other stack overflow answers nothing supports me.
In my first view controller:
class firstViewController: UIViewController{
var timer:nstimer?
//performed some functions using nstimer
}
Now i want to stop the timer and i kept button action in the second view controller so i want to access the variable timer.how to access??
I searched before stack overflow answers that asked to use prepare for segue but am already given some connection and performed segue to other controllers.
Now am looking for the solution to access that variables.can anyone help me out from this problem??
Thanks in advance.