---
title: "NSFetchRequest排序"
author: "mrjeye"
date: "2011-11-10T16:53:36Z"
tags: []
categories: ["移动开发"]
slug: "nsfetchrequest"
draft: false
lastmod: "2011-11-10T16:53:36Z"
id: 1250430
url: "https://mrjeye.iteye.com/blog/1250430"
---

```java

NSSortDescriptor *sortByPrice = [[nssortdescriptor alloc] initWithKey:@"price" ascending:NO];
[fetchrequest setsortdescriptors:[nsarray arraywithobjects:sortbyprice, nil]]

```