 //    }
     
     //幅を変更
-    func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat {
-        return 80
-    }
-    //高さを変更
-    func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
-        return 50
-    }
+//    func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat {
+//        return 80
+//    }
+//    //高さを変更
+//    func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
+//        return 50
+//    }
     
     //pickerviewやツールバー上のボタン動作
-    func TapButton(_ sender: UIButton){
-        
-        if selecttextfieldtag == 1 {            //日中のテキストフィールドが選択されている状態
-            switch(sender.tag){
-            case 10:    //Doneボタン
-                break
-//                TimeFrom1.text = time[textfieldrowfrom1]
-//                TimeTo1.text = time[textfieldrowto1]
-//                TimeFrom1.resignFirstResponder()
-//                TimeTo1.resignFirstResponder()
-
-            case 11:    //Cancelボタン
-                textfieldrowfrom1 = 8
-                textfieldrowto1 = 42
-
-//                TimeFrom1.text = ""
-//                TimeTo1.text = ""
-//                TimeFrom1.resignFirstResponder()
-//                TimeTo1.resignFirstResponder()
-                
-            default:
-                break
-            }
-        }else if selecttextfieldtag == 2 {      //深夜のテキストフィールドが選択されている状態
-            switch(sender.tag){
-            case 10:    //Doneボタン
-                break
-//                TimeFrom2.text = time[textfieldrowfrom2]
-//                TimeTo2.text = time[textfieldrowto2]
-//                TimeFrom2.resignFirstResponder()
-//                TimeTo2.resignFirstResponder()
-                
-            case 11:    //Cancelボタン
-                textfieldrowfrom2 = 42
-                textfieldrowto2 = 8
-
-//                TimeFrom2.text = ""
-//                TimeTo2.text = ""
-//                TimeFrom2.resignFirstResponder()
-//                TimeTo2.resignFirstResponder()
-                
-            default:
-                break
-            }
-
-        }else if selecttextfieldtag == 3 {      //日中の時給テキストフィールドが選択されている
-//            Salaly1.resignFirstResponder()
-        }else if selecttextfieldtag == 4 {      //深夜の時給テキストフィールドが選択されている
-//            Salaly2.resignFirstResponder()
-        }
-    }
-    
-    var selecttextfieldtag = 0
-    //textfieldがタップされた時
-    func textFieldDidBeginEditing(_ textField: UITextField) {
-        selecttextfieldtag = textField.tag
-        if textField.tag == 1 {
-            timeUIPicker.selectRow(textfieldrowfrom1, inComponent: 0, animated: true)
-            timeUIPicker.selectRow(textfieldrowto1, inComponent: 2, animated: true)
-//            TimeFrom1.text = time[textfieldrowfrom1]
-//            TimeTo1.text = time[textfieldrowto1]
-        }else if textField.tag == 2 {
-            timeUIPicker.selectRow(textfieldrowfrom2, inComponent: 0, animated: true)
-            timeUIPicker.selectRow(textfieldrowto2, inComponent: 2, animated: true)
-//            TimeFrom2.text = time[textfieldrowfrom2]
-//            TimeTo2.text = time[textfieldrowto2]
-        }
-    }
+//    func TapButton(_ sender: UIButton){
+//
+//        if selecttextfieldtag == 1 {            //日中のテキストフィールドが選択されている状態
+//            switch(sender.tag){
+//            case 10:    //Doneボタン
+//                break
+////                TimeFrom1.text = time[textfieldrowfrom1]
+////                TimeTo1.text = time[textfieldrowto1]
+////                TimeFrom1.resignFirstResponder()
+////                TimeTo1.resignFirstResponder()
+//
+//            case 11:    //Cancelボタン
+//                textfieldrowfrom1 = 8
+//                textfieldrowto1 = 42
+//
+////                TimeFrom1.text = ""
+////                TimeTo1.text = ""
+////                TimeFrom1.resignFirstResponder()
+////                TimeTo1.resignFirstResponder()
+//
+//            default:
+//                break
+//            }
+//        }else if selecttextfieldtag == 2 {      //深夜のテキストフィールドが選択されている状態
+//            switch(sender.tag){
+//            case 10:    //Doneボタン
+//                break
+////                TimeFrom2.text = time[textfieldrowfrom2]
+////                TimeTo2.text = time[textfieldrowto2]
+////                TimeFrom2.resignFirstResponder()
+////                TimeTo2.resignFirstResponder()
+//
+//            case 11:    //Cancelボタン
+//                textfieldrowfrom2 = 42
+//                textfieldrowto2 = 8
+//
+////                TimeFrom2.text = ""
+////                TimeTo2.text = ""
+////                TimeFrom2.resignFirstResponder()
+////                TimeTo2.resignFirstResponder()
+//
+//            default:
+//                break
+//            }
+//
+//        }else if selecttextfieldtag == 3 {      //日中の時給テキストフィールドが選択されている
+////            Salaly1.resignFirstResponder()
+//        }else if selecttextfieldtag == 4 {      //深夜の時給テキストフィールドが選択されている
+////            Salaly2.resignFirstResponder()
+//        }
+//    }
+    
+//    var selecttextfieldtag = 0
+//    //textfieldがタップされた時
+//    func textFieldDidBeginEditing(_ textField: UITextField) {
+//        selecttextfieldtag = textField.tag
+//        if textField.tag == 1 {
+//            timeUIPicker.selectRow(textfieldrowfrom1, inComponent: 0, animated: true)
+//            timeUIPicker.selectRow(textfieldrowto1, inComponent: 2, animated: true)
+////            TimeFrom1.text = time[textfieldrowfrom1]
+////            TimeTo1.text = time[textfieldrowto1]
+//        }else if textField.tag == 2 {
+//            timeUIPicker.selectRow(textfieldrowfrom2, inComponent: 0, animated: true)
+//            timeUIPicker.selectRow(textfieldrowto2, inComponent: 2, animated: true)
+////            TimeFrom2.text = time[textfieldrowfrom2]
+////            TimeTo2.text = time[textfieldrowto2]
+//        }
+//    }
     
     //セーブボタンを押した時
     func SaveButtontapped(_ sender: UIButton){

    }
    
    //テキストフィールドが入力状態になった際に動作
    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
        txtActiveField = textField
        return true
    }
    //リターンキーを押した時に動作
    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        view.endEditing(true)
        return true
    }
    
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        
        let notificationCenter = NotificationCenter.default
        notificationCenter.removeObserver(self, name: NSNotification.Name.UIKeyboardWillShow, object: nil)
        notificationCenter.removeObserver(self, name: NSNotification.Name.UIKeyboardWillHide, object: nil)
        
        SetText()
    }
    
    func SetText(){

//        Salaly1.tag = 3
//        Salaly2.tag = 4
        
//        timeUIPicker.tag = 1
        
        //Toolbarの作成
//        let pickertoolBar = UIToolbar()
//        pickertoolBar.barStyle = UIBarStyle.default
//        pickertoolBar.isTranslucent = true
//        pickertoolBar.sizeToFit()
//        let numberpadtoolBar = UIToolbar()
//        numberpadtoolBar.barStyle = UIBarStyle.default
//        numberpadtoolBar.isTranslucent = true
//        numberpadtoolBar.sizeToFit()
        
        //Toolbarにつけるボタンの作成
//        let pickerdoneButton = UIBarButtonItem(title: "完了", style: UIBarButtonItemStyle.plain, target: self, action: #selector(HourlyWageSetting.TapButton(_:)))
//        let pickercancelButton = UIBarButtonItem(title: "キャンセル", style: UIBarButtonItemStyle.plain, target: self, action: #selector(HourlyWageSetting.TapButton(_:)))
//        let flexSpace = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
//        let salalyButton = UIBarButtonItem(title: "完了", style: UIBarButtonItemStyle.plain, target: self, action: #selector(HourlyWageSetting.TapButton(_:)))
        
//        pickerdoneButton.tag = 10
//        pickercancelButton.tag = 11
//        salalyButton.tag = 30
        
        //Toolbarへボタンの追加
//        pickertoolBar.setItems([pickercancelButton,flexSpace,pickerdoneButton], animated: false)
//        pickertoolBar.isUserInteractionEnabled = true
//        numberpadtoolBar.setItems([flexSpace,salalyButton], animated: false)
//        numberpadtoolBar.isUserInteractionEnabled = true
        
        //PickerViewの追加
//        timeUIPicker.frame = CGRect(x: 0,y: 0,width: self.view.bounds.width/2+20, height: 260.0)
//        timeUIPicker.delegate = self
//        timeUIPicker.dataSource = self
        
