apple-tv

Forced Touch with tvOS

房东的猫 提交于 2019-12-04 15:13:37
Does anybody know how to detect a forced touch/click on the remote control with tvOS? I want to use the click in a Sprite Kit scene to open a 'game paused alert'. I have no UIKit controls which have the focus and will react on the click. I'm already using the 'normal' touch events on the remote control to move my sprites around. Apple suggests using UIPressesEvent 's to detect presses/clicks. override func pressesBegan(presses: Set<UIPress>, withEvent event: UIPressesEvent?) { for item in presses { if item.type == .Select { self.view.backgroundColor = UIColor.greenColor() } } } override func

How to make a UIView focusable using the focus engine on Apple TV

不羁的心 提交于 2019-12-04 12:22:30
问题 Is it possible to make a UIView focusable? Or should I just use a custom UIButton for all possible views? I tried to override canBecomeFocused but nothing happened. 回答1: So the problem was that I didn't notice that my cell got focus. To wrap this up, you need to implement 1) override canBecomeFocused 2) override "didUpdateFocusInContext:withAnimationCoordinator:" method to be able to highlight the cell as focused Swift 2.3: override func canBecomeFocused() -> Bool { return true } override

Airplay from iPad - a separate UIView to display on Apple TV

杀马特。学长 韩版系。学妹 提交于 2019-12-04 09:46:24
问题 I want to use Airplay to send images in high definition to a Apple TV. Airplay works fine on my iPad 2 with iOS 5.0.1. When I start my app, my UIScreen screens array only has 1 item in it. (the iPad of course). I register for the notification for more screens, it never comes unless i bring up the multitasking bar and select my Apple TV. I don't want to do this. I want an in app pop over where I can select the Apple TV or any other airplay device in the list. I used MPVolumeView , which did

Has anyone reversed engineered the protocol used by Apple's iOS Remote app for controlling an Apple TV over IP?

邮差的信 提交于 2019-12-03 11:40:10
问题 I'm curious if it's possible for me to write programs that can control an Apple TV, specifically an Apple TV 4th gen running tvOS 9.1.1, like Apple's Remote app for iOS can. I'd like to send it commands for navigating in the four cardinal directions, selecting an item on the screen, going up the navigation stack -- essentially what Apple's Remote app can do. Has anyone done any work reverse engineering the protocol it uses? Cursory Googling only has so far yielded out of date results about

How to make a UIView focusable using the focus engine on Apple TV

无人久伴 提交于 2019-12-03 07:47:58
Is it possible to make a UIView focusable? Or should I just use a custom UIButton for all possible views? I tried to override canBecomeFocused but nothing happened. So the problem was that I didn't notice that my cell got focus. To wrap this up, you need to implement 1) override canBecomeFocused 2) override "didUpdateFocusInContext:withAnimationCoordinator:" method to be able to highlight the cell as focused Swift 2.3: override func canBecomeFocused() -> Bool { return true } override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator:

Has anyone reversed engineered the protocol used by Apple's iOS Remote app for controlling an Apple TV over IP?

烂漫一生 提交于 2019-12-03 02:06:07
I'm curious if it's possible for me to write programs that can control an Apple TV, specifically an Apple TV 4th gen running tvOS 9.1.1, like Apple's Remote app for iOS can. I'd like to send it commands for navigating in the four cardinal directions, selecting an item on the screen, going up the navigation stack -- essentially what Apple's Remote app can do. Has anyone done any work reverse engineering the protocol it uses? Cursory Googling only has so far yielded out of date results about earlier generation Apple TVs and the DAAP protocol which looks like something different than what I want.

Simulators missing in Xcode 10.3 [duplicate]

☆樱花仙子☆ 提交于 2019-12-02 16:46:39
问题 This question already has answers here : Xcode 10.3 Installation (5 answers) Closed 4 months ago . After updating to Xcode 10.3, I found some of my simulators were missing. Trying to manually add one from Window -> Devices and Simulators produced a error. 回答1: Restarting the computer worked for me. 来源: https://stackoverflow.com/questions/57171360/simulators-missing-in-xcode-10-3

Change background color for page control

。_饼干妹妹 提交于 2019-12-02 10:48:36
Is there any way to change background color of page control in tvOS ? NOTE : i want to set background color as clear color I have try the below code, but it is not working in tvOS . var pageControl : UIPageControl! pageControl = UIPageControl(frame: CGRectMake(0, self.view.frame.height - 200, self.view.frame.width, 50)) pageControl.pageIndicatorTintColor = UIColor(red: 255/255, green: 255/255, blue: 255/255, alpha: 0.70) pageControl.currentPageIndicatorTintColor = UIColor.whiteColor() pageControl.backgroundColor = UIColor.clearColor() pageControl.opaque = false pageControl.numberOfPages = 10

Simulators missing in Xcode 10.3 [duplicate]

寵の児 提交于 2019-12-02 10:13:44
This question already has an answer here: Xcode 10.3 Installation 5 answers After updating to Xcode 10.3, I found some of my simulators were missing. Trying to manually add one from Window -> Devices and Simulators produced a error. Restarting the computer worked for me. 来源: https://stackoverflow.com/questions/57171360/simulators-missing-in-xcode-10-3

Airplay on new Apple TV (3rd gen.) for second screen not at 1080p

谁说胖子不能爱 提交于 2019-12-02 01:08:21
问题 I am working on an app that uses Airplay mirroring for a second display that has different content to the iPad itself. I'm using an iPad3 and ATV3 (i.e. released March 2012) attached to an LCD capable of 1920x1080 via HDMI. With Airplay mirroring, the second screen's UIScreen is available through [UIScreen screens] array. I was able to get rid of the black borders by setting overscanCompensation to 3 but I can only display a 1280x720 image. The monitor is working at 1920x1080 (i.e. checked in