Here's an example of how to create a grey button with the text "press here" which jumps when you press it in Swift:
main.swift234 chars6 lines
main.swift296 chars8 lines
This will make the button jump 10 points (∼15 pixels) upward and downward when pressed. You can adjust these values to your liking.
Also, don't forget to add the button to your view controller's view:
main.swift24 chars2 lines
gistlibby LogSnag