Tag: xcode6 nsfetchrequest

Swift核心数据 – 组不起作用

我正在使用一个简单的iOS Swift应用程序,并且找不到任何有关核心数据的小问题的解决scheme。 我必须将一些数据从核心数据中提取出来,但是不起作用。 这是我的fetchRequest: <NSFetchRequest: 0x7f82fbe105e0> (entity: Sets; predicate: ((null)); sortDescriptors: (( "(sort, ascending, compare:)" )); type: NSDictionaryResultType; includesPendingChanges: NO; propertiesToFetch: (( name )); propertiesToGroupBy: (( name )); ) 我已经sorting并添加属性来分组。 还有一个结果types – DictionaryResultType。 这里是我的FetchRequest: fetchRequest = NSFetchRequest(entityName:entity) fetchRequest.propertiesToGroupBy = groupDescriptors fetchRequest.propertiesToFetch = propertiesToFetch fetchRequest.resultType = .DictionaryResultType let fetchedResults = managedContext.executeFetchRequest(fetchRequest as NSFetchRequest, error: &error) as? […]