tvos

Are there any hidden tools in tvOS for Focus Engine debugging?

老子叫甜甜 提交于 2019-12-03 13:43:20
One of my favorite hidden debugging tools for iOS is using recursiveDescription on UIView instances. This is very useful for troubleshooting view locations that may be off-screen, for example. Debugging the Focus Engine on tvOS brings its own set of challenges, especially around what it thinks are focusable elements. Are there any hidden debugging tools for tvOS to introspect what is going on inside the Focus Engine? There are two helpful methods, both of which are actually documented in the App Programming Guide for tvOS . UIView If you're trying to move focus to a particular view and can't,

consuming API JSon calls through TVJS-tvOS

偶尔善良 提交于 2019-12-03 13:23:23
问题 I am trying to play with tvOS, and I have small question regarding handling json call. I have to get some data through an API, let's say for sake of test that I am calling this link http://query.yahooapis.com/v1/public/yql?q=select%20item%20from%20weather.forecast%20where%20location%3D%223015%22&format=json I tried to use this function with some modification function getDocument(url) { var templateXHR = new XMLHttpRequest(); templateXHR.responseType = "json"; templateXHR.open("GET", url, true

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

Why is there a space between the cells in my UITableView

空扰寡人 提交于 2019-12-03 10:58:22
I have UITableView with 1 section and 10 rows with blue background. Why am I getting space between the cells? How do I remove it? This is the default behaviour on tvOS. This way there is space to scale up the cell which has focus without the scaled cell overlapping its neighbours. To avoid spacing , you can set tableview background as your cell's contentView background. 来源: https://stackoverflow.com/questions/33364236/why-is-there-a-space-between-the-cells-in-my-uitableview

How to cancel DispatchQueue.main.asyncAfter(deadline: time) in Swift3? [duplicate]

早过忘川 提交于 2019-12-03 10:05:35
This question already has answers here : Cancel a timed event in Swift? (7 answers) Description: I'm currently using the following code to see if the user has stopped typing in the searchBar. I would like to cancel it everytime the user immediately starts typing after 0.5 seconds. Code: DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { // your function here } Question: How do I cancel DispatchQueue.main.asyncAfter if the user starts typing again in Swift3 ? What I've tried: I previously tried implementing : NSObject.cancelPreviousPerformRequests(withTarget: self) self.perform(Selector((

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:

Which 3rd party Analytics SDK support tvOS?

给你一囗甜甜゛ 提交于 2019-12-03 07:36:24
问题 I found out that none of those are supporting tvOS : Google Analytics, Fabric, Flurry. So I wonder is there any Analytics SDK that I could use? 回答1: We just added support for tvOS for Google Analytics: https://github.com/analytics-pros/GA-Tracker-for-Apple-tvOS. Let me know if you have any questions 回答2: For Google Analytics, if you're using the TVML and TVJS to build your app, you can use tvjs_google_analytics. If you are not using TVML+TVJS, it looks like the Google Analytics SDK for iOS

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.

Which 3rd party Analytics SDK support tvOS?

天涯浪子 提交于 2019-12-02 22:37:51
I found out that none of those are supporting tvOS : Google Analytics, Fabric, Flurry. So I wonder is there any Analytics SDK that I could use? We just added support for tvOS for Google Analytics: https://github.com/analytics-pros/GA-Tracker-for-Apple-tvOS . Let me know if you have any questions For Google Analytics, if you're using the TVML and TVJS to build your app, you can use tvjs_google_analytics . If you are not using TVML+TVJS, it looks like the Google Analytics SDK for iOS now supports bitcode , though they apparently do not have a tvOS target yet so you'll probably have to wait until

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