When pushing the detail view, we will pass the food item dictionary as a property so that we can display the data related to that food item in the detail view. To do this, let's add a property. Switch to
FoodDetailViewController.h, and beneath our
IBOutlets, add the following property:
@property (strong, nonatomic) NSDictionary *foodItem;
Now, we can pass a food item to this view controller. Next, we want to set the background image of the detail view. For our application, we are going to use our food image itself as the background image. Before we set the image, we will blur it and apply a dark tint to create a nice blurred image effect.
In order to do this, we will be using a
UIImage category provided by Apple on the Apple Developer Portal. I have packed this category with the resources file available for download with this book. Open the provided
Food And Me folder that was downloaded earlier from the Packt Publishing website (if you have not...