开发者

Keeping data in a UIViewController, even after go to a TablevViewController and come back?

开发者 https://www.devze.com 2023-03-11 13:18 出处:网络
I have a UIViewController with some UITextFields in it which holds username and other details. And i need to go to another view, which is a UITableView which holds the list of countries to user to cho

I have a UIViewController with some UITextFields in it which holds username and other details. And i need to go to another view, which is a UITableView which holds the list of countries to user to choose and get back to the UIViewController again, when user picks one.

What my problem is i will lose all my data mentioned previously in the UIViewControl, when get back from 开发者_运维百科UITableView. I can use application's delegate to store data when go to UITableView and load them back when UIViewController is loaded again.

I was wondering, whether is there a way to achieve my goal, other than this approach? I have to use number of variables in the delegate to store these data as there are many.

Can anyone help me out with an idea please???


I dont think.But I think you are reloading the table in viewWillAppear.Thats why ur older values are not remaining

0

精彩评论

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