 
 import Foundation
 import UIKit
+import CoreData
 
 class AddBillViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource, UITextFieldDelegate {
     

    
    //MARK: - TextField
    /**
        selection active tectField
    */
    func textFieldDidBeginEditing(textField: UITextField) { // became first responder
        print("activeTextField")
        self.activeTextField = textField
    }

    /**
        dismiss inputView when user touch outside the view
    */
    override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?){
        view.endEditing(true)
        super.touchesBegan(touches, withEvent: event)

        self.subCategoryTextField.inputAccessoryView = toolbar
        self.subCategoryTextField.inputView = self.subCategoryPickerView
    }
    
    /**
     dismiss inputView
     */
    func donePressed() {
        self.activeTextField?.resignFirstResponder()
