开发者

Passing data over views

开发者 https://www.devze.com 2023-03-15 07:47 出处:网络
I have a navigation based view and the data entered in a view that is lower down in the hierarchy is then to be shown in a table-view in the 开发者_高级运维root-view. How do I pass data entered in a s

I have a navigation based view and the data entered in a view that is lower down in the hierarchy is then to be shown in a table-view in the 开发者_高级运维root-view. How do I pass data entered in a subview to a superview??


There is several ways to do that. You can create a singleton class which provide data to your UIViewControllers: Creating a Singleton Instance

Or you can use UINavigationControllerDelegate Protocol which include method called before and after UIViewController push.

0

精彩评论

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