I am currently writing a tvOS application. I discovered and redefined the menu button using tapRecognizer to switch between storyboards and other features. My problem is that when I am on my home screen and press the menu, it does not exit the application. Instead, it remembers the last function that I used when overriding the menu button and performs that function. Any thoughts on how to clear tapRecognizer? Or a function that exits the application?
I override the menu button with
at storyboard1
tapRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(home)]; tapRecognizer.allowedPressTypes = @[[NSNumber numberWithInteger:UIPressTypeMenu]]; [self.view addGestureRecognizer:tapRecognizer];
in my home routine, I send the user back to my storyboard home page. But from now on, the menu button will not exit the application, but will send me back to the storyboard1. thanks, SW
source share