Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func DownArrowPress(sender: UIKeyCommand) {
- print("Arrow Down Start")
- }
- func UpArrowPress(sender: UIKeyCommand) {
- print("Arrow Up Start")
- }
- func LeftArrowPress(sender: UIKeyCommand) {
- print("Arrow Left Start")
- }
- func RightArrowPress(sender: UIKeyCommand) {
- print("Arrow Right Start")
- }
- func SpaceKeyPress(sender: UIKeyCommand) {
- print("Space Start")
- }
- override var keyCommands: [UIKeyCommand]? {
- return [
- UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: [], action: "DownArrowPress"),
- UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: [], action: "UpArrowPress"),
- UIKeyCommand(input: UIKeyInputLeftArrow, modifierFlags: [], action: "UIKeyInputLeftArrow"),
- UIKeyCommand(input: UIKeyInputRightArrow, modifierFlags: [], action: "UIKeyInputRightArrow"),
- UIKeyCommand(input: " ", modifierFlags: [], action: "SpaceKeyPress")]
- }
Add Comment
Please, Sign In to add comment