保存最后一步后如何隐藏UIButton

时间:2019-07-01 03:52:05

标签: swift xcode10.2

我使用swift 5 xcode 10.2 我的第一次登录下面的值

urlcheckPlanDate ==> http://www.webservice.com/myproject/projectService.svc/GetPlanDate/12
resultDataResponse ==> "[  {    \"PlanDate\": \"18\/01\/2019\",    \"PlanDateFullFormat\": \"20190118\"  }]"
strStringPlanDate ==>  "[  {    \"PlanDate\": \"18\/01\/2019\",    \"PlanDateFullFormat\": \"20190118\"  }]"
strObjectPlanDate ==> [  {    "PlanDate": "18\/01\/2019",    "PlanDateFullFormat": "20190118"  }]
jsonResponsePlanDate ==> Optional([["PlanDateFullFormat": 20190118, "PlanDate": 18/01/2019]])
jsonArrayPlanDate ==>[["PlanDateFullFormat": 20190118, "PlanDate": 18/01/2019]]
planDates ==> [20190118]
jsonDictionary ==>["PlanDateFullFormat": 20190118, "PlanDate": 18/01/2019]
checkPlanDateFullFormat ==>20190118
pplandate ==>Optional("20190118")

保存回国后的最后一步 我有下面的返回值

urlcheckPlanDate ==> http://www.webservice.com/myproject/projectService.svc/GetPlanDate/12
resultDataResponse ==> "[]"
strStringPlanDate ==>  "[]"
strObjectPlanDate ==> []
jsonResponsePlanDate ==> Optional([])
jsonArrayPlanDate ==>[]

保存完最后一步后返回值时我想隐藏按钮

@IBAction func loadingAtDCButton(_ sender: UIButton) {
   Code
}

这是我的代码

//  Button Loading at DC
    @IBAction func loadingAtDCButton(_ sender: UIButton) {
        if (ptruckidDCPlanData != nil) {
            DispatchQueue.main.async {
              self.performSegue(withIdentifier: "gotoBeforeLoadingatDC", sender: self)
                sender.isHidden = false
            }//DispatchQueue
            if(pplandate == nil){
                //Hide
                sender.isHidden = true
            }else{
                //Show
                sender.isHidden = false
            }//if
        }//if
    }//loadingAtDCButton

请向我建议...

0 个答案:

没有答案