어떤 뷰가 나타났을때 특정 동작을 수행하고 싶다면
SomeView().onApear(perform: someFunction())
어떤 뷰가 사라졌을때 특정 동작을 수행하고 싶다면
SomeView().onDisapear(perform: someFunction())