Learned a lot about transitions and animations today.
If I want to animate the transition between two elements I can use a modifier like this:
.transition(AnyTransition.scale.animation(.default))
If I want to combine transitions I can use something like this:
.transition(AnyTransition.scale.combined(with: .opacity).animation(.easeInOut(duration: 0.3)))
Additionally I learned more about the Result
data type and how to work with it:
.response { response in
switch response.result {
case.success:
completionHandler(nil)
case .failure(let error):
completionHandler(error)
}
}
I notice how I slowly have a more familiar feeling with all Swift concepts.