λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
🍎 iOS

Swift 5 beginDisablingInterfaceAutorotation Ignoring 디버깅

by ν‹΄λ”” 2021. 7. 12.
728x90
λ°˜μ‘ν˜•
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on 
<UIWindow: 0x7f84445068f0; frame = (0 0; 390 844); 
gestureRecognizers = <NSArray: 0x600003554600>; layer = <UIWindowLayer: 0x600003b32f20>> 
without matching -beginDisablingInterfaceAutorotation. Ignoring.

정상적인 μƒν™©μ—μ„œλŠ” 호좜 λ˜μ§€ μ•ŠλŠ” λ©”μ‹œμ§€ μž…λ‹ˆλ‹€. μ—λŸ¬ λ©”μ‹œμ§€λŠ” μ•„λ‹ˆκ³  κ·Έλƒ₯ 이렇닀 ~ μ •λ„μ˜ λ©”μ‹œμ§€ 인것 κ°™μŠ΅λ‹ˆλ‹€(Ignoring!!!)

μ½˜μ†”μ— 찍어 보지도 μ•Šμ•˜λŠ”λ° μ—λŸ¬λ₯Ό μ•Œλ¦¬λŠ” 것 같은 λ©”μ‹œμ§€κ°€ λ…ΈμΆœλœλ‹€? 정상적인 λ™μž‘μ„ μˆ˜ν–‰ν•œκ±΄ μ•„λ‹ˆλ‹ˆκΉŒ 이유λ₯Ό μ°Ύμ•„λ³΄μžλ©΄

 

주둜 ν‚€λ³΄λ“œμ—μ„œ λ‚˜νƒ€λ‚˜λŠ” μ—λŸ¬μž…λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ 

let textField = UITextField()
textField.resignFirstResponder()

슀크둀 ν•΄μ„œ λ·°λ₯Ό 닫을 λ•Œ 팬제슀처 λλ‚˜λŠ” μ‹œμ μ—μ„œ ν•œλ²ˆ λ·°κ°€ dimiss λ λ•Œ ν•œλ²ˆ ν•΄μ„œ μ—¬λŸ¬λ²ˆμ— 걸쳐 resign μ‹œν‚€κ²Œ 되면 μœ„μ™€ 같은 문ꡬ가 μ½˜μ†”μ— μ°νž™λ‹ˆλ‹€

FirstResponder에 κ΄€λ ¨λœ κ²ƒμœΌλ‘œ νƒ­ μ œμŠ€μ²˜λ‚˜ 팬 μ œμŠ€μ²˜μ—μ„œλ„ λ°œμƒν•  수 μžˆλ‚˜λ΄…λ‹ˆλ‹€

이번의 κ²½μš°μ—λŠ”

UIViewControllerAnimatedTransitioning μ—μ„œ μ• λ‹ˆλ©”μ΄μ…˜μ΄ λλ‚˜λŠ” μ§€μ μ—μ„œ 

transitionContext.completeTransition()을 두 번 ν˜ΈμΆœν•΄μ„œ λ°œμƒν•œ λ¬Έμ œμ˜€μŠ΅λ‹ˆλ‹€.. 호좜 해놓고 λ‹€λ₯Έ λΉ„κ΅λ¬Έμ—μ„œ 또 ν˜ΈμΆœν•΄μ„œ μœ„μ™€ 같은 ignoring 이 λ–΄λ˜κ²ƒ..  

systemμ—κ²Œ 무언가 λλ‚¬μŒμ„ μ•Œλ €μ€„ 땐 타이밍 κ³ λ € μž˜ν•΄μ„œ λ§žλŠ” λ‘œμ§μ„ μ‚¬μš©ν•΄μ•Ό κ² λ‹€ γ… γ… γ… 

728x90
λ°˜μ‘ν˜•

λŒ“κΈ€