Database Reference
In-Depth Information
}
You've implemented these methods many times in this topic, so you're probably
familiar with what they do. The first method, numberOfRowsInSection , matches the
number of cells in the table view with the number of fetched objects in the venues
array.
The second method, cellForRowAtIndexPath , dequeues a cell for a given index path
and populates it with the information of the corresponding Venue in the venues
array. In this case, the main label gets the venue's name and the detail label, in
turn, gets a price category that is one of three possible values: $, $$ or $$$.
Build and run the project, and you'll see the following:
You can scroll down the list of bubble tea venues. These are all real places in New
York City that sell the delicious drink.
Note: When should you store fetch requests in your data model?
If you know you'll be making the same fetch over and over in different parts of
your app, you can use this feature to save you from writing the same code
multiple times. A drawback of stored fetch requests is that there is no way to
specify a sort order for the results.
Search WWH ::




Custom Search