     var contentImages: [UIImage] = [UIImage(named: "placeholder")!]
     var pin: Pin?
     
+    // Create NSFetchedResultsController
+    lazy var fetchedResultsController: NSFetchedResultsController<NSFetchRequestResult>? = {
+        let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Photo")
+        fetchRequest.sortDescriptors = [NSSortDescriptor(key: "id", ascending: true)]
+        fetchRequest.predicate = NSPredicate(format: "pin == %@", self.pin!)
+        let fetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: AppDelegate.stack.context, sectionNameKeyPath: nil, cacheName: nil)
+        return fetchedResultsController
+    }()
+    
     // MARK: Outlets
     
     // MARK: Life Cycle

        
        if pin != nil {
            print("This worked!")
        }
        
        setVenueImages() { (success) in

//

import UIKit
import CoreData

class BopPageViewController: UIPageViewController, UIPageViewControllerDataSource, FoursquareRequestType {

