tvos

How can I put an Apple TV app in background after pressing the Menu button

余生长醉 提交于 2019-12-02 01:22:01
I have tried to use a private method to put the app in background after pressing the Menu button; and the following code works properly: @implementation ViewController { UITapGestureRecognizer *tapRecognizer; } -(void)viewDidLoad { [super viewDidLoad]; tapRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleTap:)]; tapRecognizer.allowedPressTypes = @[[NSNumber numberWithInteger:UIPressTypeMenu]]; [self.view addGestureRecognizer:tapRecognizer]; } -(void)handleTap:(UITapGestureRecognizer *)sender { if (sender.state == UIGestureRecognizerStateEnded) { NSLog(@

Uninstall Apps on tvOS Simulator

浪子不回头ぞ 提交于 2019-12-01 15:33:32
How can i uninstall apps from tvOS simulator? I already tried to long press the icon, but no "close button" appears. I know, this is a Beta version, maybe in future they'll implement something like iOS. Thank you. Method 1 From Home Screen: Settings->General->Manage Storage And here you can uninstall your apps. Method 2 As suggested Jess. Long press on the remote. Apps start to wiggle. Hit the play/pause button. You will be presented with a delete dialog. Long press on the remote. Apps start to wiggle. Hit the play/pause button. You will be presented with a delete dialog. Long press on the

Uninstall Apps on tvOS Simulator

不羁岁月 提交于 2019-12-01 14:31:19
问题 How can i uninstall apps from tvOS simulator? I already tried to long press the icon, but no "close button" appears. I know, this is a Beta version, maybe in future they'll implement something like iOS. Thank you. 回答1: Method 1 From Home Screen: Settings->General->Manage Storage And here you can uninstall your apps. Method 2 As suggested Jess. Long press on the remote. Apps start to wiggle. Hit the play/pause button. You will be presented with a delete dialog. 回答2: Long press on the remote.

tvOS: Focus not moving correctly

爱⌒轻易说出口 提交于 2019-12-01 13:14:17
I have a UIView with two buttons on it. In the MyView class I have this code: -(BOOL) canBecomeFocused { return YES; } -(NSArray<id<UIFocusEnvironment>> *)preferredFocusEnvironments { return @[_editButton, _addButton]; } -(IBAction) editTapped:(id) sender { BOOL editing = !tableViewController.editing; [_editButton setTitle:editing ? @"Done" : @"Edit" forState:UIControlStateNormal]; _addButton.hidden = !editing; [tableViewController setEditing:editing animated:YES]; } The basic idea is that the user can move the focus to the edit button, which can then make the Add button appear. The problem

Allow Menu button to exit tvOS app when pressed on presented modal view controller

戏子无情 提交于 2019-12-01 12:14:36
问题 I have a tvOS app, with a UITabBarController as the main entry point for the main storyboard. If the user is not logged in, the UITabBarController presents a LoginViewController modally. When the user presses the Menu button on the Siri remote, the system automatically dismiss the LoginViewController and shows the UITabBarController . I want the app to instead exit to the tvOS headboard. Expect the solution to involve either a UITapGestureRecognizer to override the Menu button action, or

Set font family in TVML

為{幸葍}努か 提交于 2019-12-01 11:36:21
In my TVML app I am able to set font style properties such as font-size and font-weight using tv-text-style:none, however I am not able to set the font-family property, which seems to be ignored: var Template = function() { return `<?xml version="1.0" encoding="UTF-8" ?> <document> <head> <style> .customText { tv-text-style: none; tv-position: center; color: white; font-size: 40px; font-weight: bold; font-family: Courier; } </style> </head> <paradeTemplate> ... <listItemLockup> <title>Title</title> <relatedContent> <divTemplate> <title class="customText">abcABC</title> </divTemplate> <

tvOS: Focus not moving correctly

早过忘川 提交于 2019-12-01 10:52:33
问题 I have a UIView with two buttons on it. In the MyView class I have this code: -(BOOL) canBecomeFocused { return YES; } -(NSArray<id<UIFocusEnvironment>> *)preferredFocusEnvironments { return @[_editButton, _addButton]; } -(IBAction) editTapped:(id) sender { BOOL editing = !tableViewController.editing; [_editButton setTitle:editing ? @"Done" : @"Edit" forState:UIControlStateNormal]; _addButton.hidden = !editing; [tableViewController setEditing:editing animated:YES]; } The basic idea is that

tvos: UITextView focus appearance like movies App

允我心安 提交于 2019-12-01 05:33:42
I am building a tvos app and i want the UITextView to behave similarly like in tvos Movies app. I am specially interested in the focused appearence. Please have a look ate these two pictures. Currently i am just adding background color to the textview when it is focused but how i can achieve this focused appearance in the attached images. here is my small code override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) { super.didUpdateFocusInContext(context, withAnimationCoordinator: coordinator) if context

Make UILabel focusable and tappable (tvOS)

倾然丶 夕夏残阳落幕 提交于 2019-12-01 05:26:30
I'm trying to implement 6 lines high description label and I want it to be focusable. Ideally that would mean extending UILabel class to make a custom component. I tried that by implementing canBecomeFocused and didUpdateFocusInContext but my UILabel doesn't seem to get any focus. I also tried replacing UILabel with UIButton, but buttons aren't really optimised for this sort of thing. Also that would mean I'd need to change buttonType on focus from custom to plain.. and buttonType seems to be a ready-only property. In reality I'd like to have exact same text label implemented by Apple in Apple

tvos: UITextView focus appearance like movies App

一个人想着一个人 提交于 2019-12-01 03:45:37
问题 I am building a tvos app and i want the UITextView to behave similarly like in tvos Movies app. I am specially interested in the focused appearence. Please have a look ate these two pictures. Currently i am just adding background color to the textview when it is focused but how i can achieve this focused appearance in the attached images. here is my small code override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator