Called after the controller's view is loaded into memory.
컨트롤러의 뷰가 메모리에 로드된 후에 호출된다.
view가 로드되는 처음 한번만 실행됨
Notifies the view controller that its view is about to be added to a view hierarchy.
뷰가 뷰 hierarchy에 추가되기 직전에 호출된다.
viewDidLoad와 viewWillAppear의 차이
둘의 차이는 화면이 여러개일 때 나타난다.
뷰를 처음 보여졌을 때는 viewDidLoad와 ViewWillAppear가 둘다 호출되지만 다른 화면을 갔다가 돌아왔을때는 viewWillAppear만 호출된다.
Notifies the view controller that its view was added to a view hierarchy.
뷰가 나타난 뒤에 호출된다.
뷰가 사라지기 직전에 호출된다.
Notifies the view controller that its view was removed from a view hierarchy.
뷰가 사리지고 난 뒤에 호출된다.