iOS개발/Swift 기본
swift 여백 클릭해서 창닫기
Larooly
2023. 7. 3. 09:59
이번에는 워낙 간단한 내용이기 때문에
별도 설명없이 코드만 올려드립니다.
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
if let touch = touches.first , touch.view == self.view{
self.dismiss(animated: true)
}
}
주로 저는 OverFullScreen 에 자주 사용합니다.
오늘도 파이팅입니다.