NSSortDescriptor ignores Comperator Block
2015-08-29 13:33
381 查看
Thanks to the hint from Paul I was able to figure out what the problem is. The solution can be found in the Apple docs(have a look at the "Fetch Predicates and Sort Description" section).
I thought the NSFetchRequest would just use SQL to fetch the Objects from the SQLite DB and then use the SortDescriptions to sort the fetched objects in memory. This is not ture: it seems that the complete sorting work is handed over to the SQLite store
as well. Of course the Objective-C statements form the block cannot be translated into a SQL query and thus the block is ignored.
referred to link:
http://stackoverflow.com/questions/11022287/nssortdescriptor-ignores-comperator-block
I thought the NSFetchRequest would just use SQL to fetch the Objects from the SQLite DB and then use the SortDescriptions to sort the fetched objects in memory. This is not ture: it seems that the complete sorting work is handed over to the SQLite store
as well. Of course the Objective-C statements form the block cannot be translated into a SQL query and thus the block is ignored.
referred to link:
http://stackoverflow.com/questions/11022287/nssortdescriptor-ignores-comperator-block
相关文章推荐
- 个人信息安全报告发布:有 APP 每分钟调用位置权限 1468 次
- 下载量超过一亿的流行应用被发现含有恶意模块
- 苹果与Siri的七年之痒:“宫斗”戏码不断上演
- Symantec Norton Ghost v12.0 Retail ISO 多国语言版 下载
- Android APP与媒体存储服务的交互
- java实现收藏名言语句台词的app
- 修改Android App样式风格的方法
- Android App数据格式Json解析方法和常见问题
- 通过Html网页调用本地安卓(android)app程序代码
- PHP实现批量生成App各种尺寸Logo
- Could not load file or assembly "App_Licenses.dll"的问题
- 基于App自适应draw9patch不失真背景的方法详解
- 安卓APP测试之使用Burp Suite实现HTTPS抓包方法
- web app与原生app的区别
- 使用Chrome浏览器调试Android App详解
- Android开发自学笔记(三):APP布局上
- Android开发自学笔记(四):APP布局下
- Android学习笔记(二)App工程文件分析
- 怎么发布打包并发布自己的Android应用(APP)
- Chrome Web App开发小结