Does anyone know how to enable the UIAlertViewController that was submitted for rejection by pressing the Menu button on tvOS?
The Settings app on Apple TV 4 has this behavior, but it doesnβt work by default in my application. I use the following code to create actions that a user can take, but would like to let him choose nothing and return by pressing the "Menu" button on the remote control.
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Alert" message:@"Please make a choice" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction* action1 = [UIAlertAction actionWithTitle:@"Option 1" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {}]; [alert addAction:action1]; UIAlertAction* action2 = [UIAlertAction actionWithTitle:@"Option 2" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {}]; [alert addAction:action2]; [self presentViewController:alert animated:YES completion:nil];
Thanks in advance.
source share