-4

Hai am trying to animation effect of iOS keyboard into the buttons of my application. In the image on pressing O it became Bigger and displayed the alphabet chosen, i am trying to get the same effect into one of UIbuttons in swift. On clicking the button there should also appear just like picture a bigger frame and display the text it.

Picture of the Keyboard and animation that i want

Thanks

rmaddy
  • 314,917
  • 42
  • 532
  • 579
pramod aravind
  • 117
  • 1
  • 12

1 Answers1

0

Increase the size of UIButton with

UIView.animate(withDuration: DURATION, animations: {
     btn.frame.width += 20
     btn.frame.height += 20
}, completion: { (success) in

})

or you can also try this answer Scale UIButton Animation- Swift

Community
  • 1
  • 1
Muhammad Raza
  • 952
  • 7
  • 24