【问题标题】:Retain object through UIAlertView/UIActionView dialogs通过 UIAlertView/UIActionView 对话框保留对象
【发布时间】:2023-03-12 18:15:02
【问题描述】:

我正在处理本地(方法)自定义对象,需要向用户显示一个对话框(UIActionSheet 或 UIAlertView)。在用户与对话框交互后调用委托时访问同一对象的最佳方法是什么?除了向当前类添加另一个实例变量之外,还有什么 Cocoa 技巧?

【问题讨论】:

    标签: cocoa-touch uialertview uiactionsheet


    【解决方案1】:

    一种方法是使用"Associated Objects"。 (但you can't test it in simulator。)

    【讨论】:

      猜你喜欢
      • 2022-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-08
      相关资源
      最近更新 更多