I'm overriding pressesBegan
to receive Select presses. The Siri Remote's Menu Button does not exit my application when the focus is on a UIButton
. If no UI element is focused the Menu Button works as expected.
How do I receive Menu Button presses when the focus is on a UIButton
?
override func pressesBegan(presses: Set<UIPress>, withEvent event: UIPressesEvent?) {
for item in presses {
if item.type == .Select {
print("Click")
}
if item.type == .Menu {
print("Menu Button")
super.pressesBegan(presses, withEvent: event)
}
}
}
UITapGestureRecognizer
. Is there a way to return to the home screen gracefully rather thanexit(0)
? – Attwood