I am writing an app and having some doubt while doing it. I save data in NSUserDefault. And I have 4 views which is: update view, delete view, adding view and a display view. Since data in NSUserDefault is not mutable. So what I do is to overwrite the data.
I am thinking of using one array to store all the data. Let’s say I call it as controlArray.
But How can I carray the data in the controlArray to different view? for example: i remove an item in the controlArray in the delete view, then when I switch to the display view, that item should not be seen anymore. Do the same thing for other view. Can I do that? please tell me, give me some hint.
Thank u so much.
Try to save the Array in the AppDelegate. You can access it from everywhere and make changes to it.