Passing an object between view controllers, does the object become null in new controller?
I am new to Objective C and trying to get my head around OOP in apps as opposed to web OOP.
Lets say I have a class theDay.h and theDay.m
setDay is a class which in one view controller it takes in a value, say a integer, via a set method, and then in another view controller using a get method you can get the value example: (if my syntax is wrong sorry, very new!)
then to get it:
int day; day = [theDay getDay];
Is this correct and is the object available throughout the views?
Yes the object will be available! You are passing reference to that object, not the object!! But you have to allocate that object somewhere in the code!