开发者

how to store recent data?

开发者 https://www.devze.com 2023-01-31 02:22 出处:网络
I am using tabbarviewcontroller and i am doing some operations on 3 out of 5 view controllers and i want to store data from every controller when ever i did something and i want to display the stored

I am using tabbarviewcontroller and i am doing some operations on 3 out of 5 view controllers and i want to store data from every controller when ever i did something and i want to display the stored information in 4th view controller using tableview (example : like recent dialed list in iphone native phone app )

what is the best method to开发者_如何学Go achieve it ?

thanks for help

regards


Store globally in appDelegate

yourAppDelegate *appObj=(yourAppDelegate *)[[UIApplication sharedApplication]delegate];
appObj.anyObjectWhichYouDeclaredInAppDelegate = Something;

You can assign or retrieve the object in whichever viewcontroller you want by using the above code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号