nonamelive nonamelive - 4 years ago 168
Objective-C Question

How to limit the result count of NSFetchRequest?

I want to have a feature of "Recent 20 Items" in my iOS app. I use Core Data and

. How can I limit the result number to 20 to achieve this? Thank you in advance!


Answer Source

set the fetchLimit of the NSFetchRequest

[request setFetchLimit:20];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download