How to show popup in tvOS?

I am trying to show a popup when a UICollectionView cell, but I had no luck ...

On iOS, I usually used modalPresentationStyle as follows:

popoverContent.modalPresentationStyle = .Popover

but in tvOS this is not available.

I think a popup is possible with

UIPopoverController

but he gives me a warning that it is deprecated in tvOS 9.0. Is this something I can ignore and just use?

I am wondering if anyone has an idea how to make popup work in tvOS?

ps

Does anyone know if there is a way for tvOS application to read data from external equipment via Apple TV USB?

+4
source share
2 answers

tvOS. , , , , , .

0

, UIAlertController, TvOS 9.0

UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"
                                                               message:@"This is an alert."
                                                        preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK"
                                                        style:UIAlertActionStyleDefault
                                                      handler:^(UIAlertAction * action) {}];

[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
0

Source: https://habr.com/ru/post/1613440/


All Articles