I am having a application in which one view controller is pushed and when we pop from the pushed controller i do not get the value for the variable
For eg consider there is A controller i n which i am havinh the int variable named Component now i push to B Controller on click event of button from A Controller ,When we are pushed to B view there is Table View and when i select any of the cell i just pass indexpath.row value to the int component and here i print value of component value which is correct , now when its pop to A controller again i print the value of component which comes to be 0(zero) always..
Where am i wrong
Without seeing any code I would say that you haven’t set up a reference to controller A in controller B so when you are calling A.someInt = 5 nothing is happening. Unlink other languages, calling a method on a nil reference just returns nil. It doesn’t throw an error.