Guest User

Untitled

a guest
Nov 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. func DownArrowPress(sender: UIKeyCommand) {
  2. print("Arrow Down Start")
  3. }
  4. func UpArrowPress(sender: UIKeyCommand) {
  5. print("Arrow Up Start")
  6. }
  7. func LeftArrowPress(sender: UIKeyCommand) {
  8. print("Arrow Left Start")
  9. }
  10. func RightArrowPress(sender: UIKeyCommand) {
  11. print("Arrow Right Start")
  12. }
  13. func SpaceKeyPress(sender: UIKeyCommand) {
  14. print("Space Start")
  15. }
  16. override var keyCommands: [UIKeyCommand]? {
  17. return [
  18. UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: [], action: "DownArrowPress"),
  19. UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: [], action: "UpArrowPress"),
  20. UIKeyCommand(input: UIKeyInputLeftArrow, modifierFlags: [], action: "UIKeyInputLeftArrow"),
  21. UIKeyCommand(input: UIKeyInputRightArrow, modifierFlags: [], action: "UIKeyInputRightArrow"),
  22. UIKeyCommand(input: " ", modifierFlags: [], action: "SpaceKeyPress")]
  23. }
Add Comment
Please, Sign In to add comment