Background - Foreground stop issue

detecting background => foreground in ViewController - 야곰닷넷

NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification,
                                       object: nil,
                                       queue: .main) {
    [unowned self] notification in
    // background에서 foreground로 돌아오는 경우 실행 될 코드
    startRecordsAnimation()
    
}

UIView.animte은 백그라운드로 가게 되면 레이어가 삭제되서 애니메이션 동작이 멈춘다.