且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 uitableview 中显示重复事件的***方式是什么

更新时间:2023-01-13 16:00:09

处理重复出现的内容是有问题的,尤其是当您不严格拥有基础数据时(因为它在设备日历中).因此,尝试从您提出的每个解决方案中取出***的部分,并删除您不喜欢的部分:

Dealing with recurring content is problematic, especially when you don't strictly own the underlying data (because it's in the device calendar). So, try taking the best parts from each of your proposed solutions and dropping the bits you don't like:

  1. 对单个事件使用 FRC
  2. 当 FRC 为您提供更新时,计算所有重复发生的事件
  3. 根据您计算的事件显示,而不是直接从 FRC 显示

通过这种方式,您可以使用 FRC 来获取基础"数据并在数据存储中发生变化时触发更新,但您也能够干净利落地处理多重性.

In this way you're using the FRC to get the 'underlying' data and to trigger updates when things change in the data store, but you're also able to deal with the multiplicity cleanly.