The view sends the message tableView:canMoveRowAtIndexPath: to the dataSource (in the application that’s ItemViewController) asking if it can move the row at a particular indexPath. The controller sends a BOOL back to tell the view if it should allow the movement of the row at the indexPath.
In this implementation, if the indexPath row property is equal to the number of objects in allItems then the answer is NO. I’m assuming “defaultStore” is similar if not the same as the book’s “sharedStore,” and that the author of this code has ensured the last object in allItems will always be an object that stores @“No More Items.” In short, this implementation means you can’t rearrange or move the last object in the allItems array and subsequently the last row of the tableView.
I hope this helps. If not, I’ll be happy to try and answer another question. Also, check out the documentation for tableView:canMoveRowAtIndexPath:. It may be helpful. Here’s the link to Apple’s “Table View Programming Guide for iOS:”