Hossam Ghareeb
Hossam Ghareeb

Reputation: 7123

how can we handle logic of TVML and can it work with UIKit?

I'm working in a demo for tvOS, I found that you can build your app either with UIKit or with TVML markup language with Javascript. I have checked the UIKit Catalog and the TVML Catalog and they look great. I have two question:

  1. How can we handle logic of javascript while using TVML? will be in JS also in JS files or we will write Swift code to handle logic?
  2. Is this possible to combine TVML screens with UIKit screen from storyboard?

Upvotes: 2

Views: 644

Answers (2)

loretoparisi
loretoparisi

Reputation: 16271

If your aim is to mix up a TVML User Interface, so self hosted TVML templates and JavaScript files, this is a possibile solution:

How to bridge TVML/JavaScriptCore to UIKit/Objective-C (Swift)?

Upvotes: 1

Daniel Carter
Daniel Carter

Reputation: 116

This is so new that you will probably have better luck looking at the official TVMLKit forum on Apple's website: forums.developer.apple.com/community/app-frameworks/tvmlkit

Short Answers:

  1. The logic is handled in Javascript
  2. You can expose your own views built in UIKit to the TVMLKit framework. You can also add your own JavaScript hooks from ObjC/Swift.

Upvotes: 1

Related Questions