ios - Custom ViewController objects don't persist through View changes -


i have no idea if i'm using right terminology here, i'm hoping can - i'm pretty new ios dev , have run problem:

i have created custom class used store object. has bunch of properties , functions, object should. object being declared in viecontroller's .h file, , initialised , used throughout viewcontroller. object holds bunch of information test, , takes measurements in various threads.

the problem i'm facing when load view (using ecslidingviewcontroller menu) , return view had object...it seems have forgotten object. tasks running in threads still running, instance of object seems gone.

is there way preserve instance of object when changing views when return appropriate view, object still there , can still use it?

thanks!

i'd recommend put objects reference in transversal class, manager or other class consider appropriate according design , important needs class you're sure won't release nor re-created view controllers when change 1 view controller other. singleton instance manages main logic option.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -