我不知道为什么,但是要使其正常工作,您需要更换:
fetchedResultsController.sections![section].objects!.count
与
fetchedResultsController.sections![section].numberOfObjects
由于某种原因,
objects!.count返回与属性相反的对象数量 不正确
numberOfObjects。

我不知道为什么,但是要使其正常工作,您需要更换:
fetchedResultsController.sections![section].objects!.count
与
fetchedResultsController.sections![section].numberOfObjects
由于某种原因,
objects!.count返回与属性相反的对象数量 不正确
numberOfObjects。