화면 터치 액션

화면 터치로 모달 닫기

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

        self.dismiss(animated: true, completion: nil)

    }

화면 터치로 키보드 숨기기

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

        self.view.endEditing(true)

    }

results matching ""

    No results matching ""