开发者

How to pass information between views

开发者 https://www.devze.com 2023-03-08 21:39 出处:网络
I want to pass information like number between two views in 开发者_开发百科navigation controller. But I don\'t know how.

I want to pass information like number between two views in 开发者_开发百科navigation controller. But I don't know how.

Thanks


Another option might be using singletons if the "numbers" are just a synonym for your application model. Remember, you should use the MVC-concept!

http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html

Try the SynthesizeSingleton.h macro if you want a tough solution!


You need to use delegates and protocols. Here is a site with an example http://iosdevelopertips.com/objective-c/the-basics-of-protocols-and-delegates.html

0

精彩评论

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