¡@

Home 

2014/10/15 ¤U¤È 10:10:27

iphone Programming Glossary: initwithwarehouse

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

getSingleton ... Instead the dependencies should be injected like this @implementation BookPickerViewController void initWithWarehouse BookWarehouse warehouse myBookWarehouse is an instance variable myBookWarehouse warehouse myBookWarehouse retain void doSomething.. So we might modify our BookPickerViewController init method as follows @implementation BookPickerViewController void initWithWarehouse BookWarehouse warehouse andCheckoutController CheckoutController checkoutController myBookWarehouse warehouse myCheckoutController.. myCheckout MyCheckoutController alloc init BookPickerViewController bookPicker BookPickerViewController alloc initWithWarehouse initWithWarehouse andCheckoutController myCheckout ... window addSubview bookPicker view window makeKeyAndVisible Finally..