Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理本地(方法)自定义对象,需要向用户显示一个对话框(UIActionSheet 或 UIAlertView)。在用户与对话框交互后调用委托时访问同一对象的最佳方法是什么?除了向当前类添加另一个实例变量之外,还有什么 Cocoa 技巧?
一种方法是使用"Associated Objects"。(但你不能在模拟器中测试它。)