iOS 개발자 TDCIAN

  • 홈
  • 태그
  • 방명록

detecting background 1

[iOS / UIKit] How to detect when the application state become foreground from the background in ViewController not SceneDelegate

안녕하세요! 오늘은 앱이 background 상태에 있다가 foreground로 올라오는 것을 SceneDelegate가 아니라 ViewController에서 확인하는 방법을 알아봅시다! 다들 아시다시피 SceneDelegate를 통해 우리는 앱이 Background에서 Foreground로 넘어오는 것을 확인할 수 있습니다. 물론 그 반대도 가능합니다! 하지만 특정 ViewController에서 Foreground로 넘어오는 것을 확인하는 게 필요한 상황이 있죠? 바로 알아봅시다! willEnterForegroundNotification 옵저버를 추가해주니 ViewController에서 foreground로 들어오는 상황을 notify 해주는 게 보이네요! 그럼 background로 나가는 것도 알 수..

iOS/UIKit 2023.03.03
이전
1
다음
더보기
프로필사진

iOS 개발자 TDCIAN

  • 분류 전체보기 (77)
    • iOS (68)
      • UIKit (15)
      • SwiftUI (9)
      • Common (34)
      • Reactive Programming in iOS (2)
      • Objective-C (8)
    • Computer Science (9)

최근글과 인기글

  • 최근글
  • 인기글

Calendar

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

Copyright © Kakao Corp. All rights reserved.

티스토리툴바