In the media editing app contest of Telegram in late 2022, there were vector buttons that could be animated to different vector shapes. Telegram provided Lottie animation for these buttons, but I decided to implement a mechanism for animating this type of buttons from scratch. Please feel free to use the button code and give it a star if you find it useful.
let cancelBackView = CancelBackView()
cancelBackView.apply(model: .init(state: .back))
let textAligmentView = TextAligmentView()
textAligmentView.apply(model: .init(aligment: .left))