     @IBOutlet weak var collectionView: UICollectionView!
     
     @IBOutlet weak var noImagesLabel: UILabel!
-        
+    
+    var newCollectionButton: UIBarButtonItem? = nil
+    
     /* The pin to be displayed on the map. Should be set by the source view controller. */
     var pin:Pin?
     

        
        // fetch a new set of images
        searchPhotosByLatLon()
    }
    


//                    pictures.removeAll(keepCapacity: false) // TODO: debug only. remove.
                    self.flickrImages = pictures
                    
                    // TODO - can i move the view functionality out of this function to separate it from the data code?
                    
                    // halt the activity indicator
                    self.stopActivityIndicator()
                    
                    // enable the New Collection button.
                    self.newCollectionButton!.enabled = true
                    
                    // force the cells to update now that the image has been downloaded
                    dispatch_async(dispatch_get_main_queue()) {
                        
                        // TODO - why the delay in enabling the newCollectionButton? Which of the following calls is prefered to trigger a redraw?
                        self.view.setNeedsLayout()
                        self.view.setNeedsDisplay()
                        
                        self.collectionView.reloadData()
                    }
                }
