我在我的应用程序中获得2个视图。 view1目前view2。我可以通过presentModalViewController
或如下所示:self.navigationController pushViewController
它不重要。发送关闭ViewController的信息
我需要在view2中选择一些行,然后转到view1并提供一些信息。我怎样才能做到没有singeltones和全局变量?
我在我的应用程序中获得2个视图。 view1目前view2。我可以通过presentModalViewController
或如下所示:self.navigationController pushViewController
它不重要。发送关闭ViewController的信息
我需要在view2中选择一些行,然后转到view1并提供一些信息。我怎样才能做到没有singeltones和全局变量?
1.You可以使用NSUserDefaults的
您可以使用NSNotificationCenter发布通知。然后你将使用NSDictionary * infos来传递你的数据。
此信息可能对你很有意思: http://stackoverflow.com/questions/626898/how-do-i-create-delegates -in-目标c – pmk 2012-03-06 10:06:30