         }
     }
     
+    //MARK: Action
+    
+    @IBAction func editAction(sender: AnyObject) {
+        
+    }
+    
+    
     //MARK: - UICollectionViewDataSource
     
     func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {

    }
    
    func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
        print("ICI")
        if kind == UICollectionElementKindSectionHeader && !self.data[indexPath.section].bills.isEmpty {
            let header = collectionView.dequeueReusableSupplementaryViewOfKind(UICollectionElementKindSectionHeader, withReuseIdentifier: reuseIdentifierHeader, forIndexPath: indexPath) as! BillHeaderView
            header.title.text = self.data[indexPath.section].name
            return header;
        }
        print("ONONONON")
        return UICollectionReusableView()
    }
    

        return UIEdgeInsetsMake(10, 5, 10, 5); //top,left,bottom,right
    }
    
    //MARK: - Search control
    
    func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
        print(#function)
        autoreleasepool {
            var predicate: NSPredicate? = nil
            var error: NSError? = nil
            var result: [AnyObject]?
            
            if self.searchBar.text?.characters.count != 0 {
                predicate = NSPredicate(format: "(name contains [cd] %@)", searchBar.text!)
            }
            
            
            
            let fetch: NSFetchRequest = NSFetchRequest(entityName: "SubCategory")
            fetch.predicate = predicate
            do {
                result = try self.managedObjectContext!.executeFetchRequest(fetch)
            } catch let nserror1 as NSError{
