Scene based Life-cycle

w0308h 1월 31일 AM 08:11 4 0
w0308h Profile Image Level 9
2 #TIL

iOS 13 이후 window 개념이 scene으로 대체되었다.

  • Unattached state
    • 유저나 시스템이 새로운 scene을 요청하게 되면, UIKit은 unattached 상태의 scene 생성
      • unattached: 소속되지 않은, 무소속의
  • Foreground
    • 사용자가 요청한 scene은 전경으로 빠르게 이동하여 화면에 나타납니다. (Foreground Inactive → Foreground Active)
  • Background
    • 시스템이 요청한 scene은 일반적으로 이벤트를 처리할 수 있도록 배경으로 이동합니다. (A system-requested scene typically moves to the background so that it can process an event.) ex. 위치 이벤트 등 화면에 표시할 필요가 X
  • Suspended
    • 사용자가 앱의 UI를 닫으면, UIKit은 관련 scene을 background 상태로 이동하고 결국 suspended 상태로 이동합니다.
    • UIKit은 언제든지 리소스를 회수하여 background, suspended scene을 unattached 상태로 되돌릴 수 있다.
댓글