iPhone - NSFetchedResultsController的缓存名称 [英] iPhone - Cache name for NSFetchedResultsController

查看:97
本文介绍了iPhone - NSFetchedResultsController的缓存名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

G'day Folks

G'day Folks

我的CoreData驱动的应用程序有来自同一商店的数据的多个视图。所有使用NSFetchedResultsController。目前,它们都有相同的名称为NSFetchedResultsController缓存,根。我的应用程式的使用者可以大概会,在观点之间不分青红皂白地跳跃。如果我给每个NSFetchedResultsController的缓存一个唯一的名称,对用户体验会更好吗?

My CoreData driven app has a number of views of data from the same store & all using an NSFetchedResultsController. Currently they all have the same name for the NSFetchedResultsController cache, "Root". Users of my app can, & probably will, jump indiscriminately between views. Would it be better for user experience if I gave the cache for each NSFetchedResultsController a unique name?

TIA,Pedro:)

TIA, Pedro :)

推荐答案

为不同的抓取提供不同的缓存名称是可取的并且有助于提高性能。

Providing a different cache name for different fetches is advisable and will help with performance.

a href =http://developer.apple.com/library/ios/documentation/CoreData/Reference/NSFetchedResultsController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008227-CH1-SW24> http:/ /developer.apple.com/library/ios/documentation/CoreData/Reference/NSFetchedResultsController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008227-CH1-SW24

From Apple documentation at http://developer.apple.com/library/ios/documentation/CoreData/Reference/NSFetchedResultsController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008227-CH1-SW24


如果你有多个获取的结果
控制器与不同的
配置(不同的排序
描述符等),你必须给
每个都有不同的快取名称。

If you have multiple fetched results controllers with different configurations (different sort descriptors and so on), you must give each a different cache name.

干杯,
Rog

Cheers, Rog

这篇关于iPhone - NSFetchedResultsController的缓存名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆