tvOS and I found that Apple offers nice set of templates written using
TVML. I’d like to know if a
tvOS app that utilises
TVML templates can also use UIKit.
Can I mix UIKit and TVMLKit within one app?
var appController: TVApplicationController?
This object has a
UINavigationController property associated with it. So whenever you see fit, you can call:
let myViewController = UIViewController() self.appController?.navigationController.pushViewController(myViewController, animated: true)
This allows you to push a Custom UIKit viewcontroller onto the navigation stack. If you want to go back to TVML Templates, just pop the viewController off of the navigation stack.
Once you call
createPushMyView() in Swift, you are free to call
If you already have a native UIKit app for tvOS, but would like to extend it by using TVMLKit for some part of it, You can.
Use the TVMLKit as a sub app in your native tvOS app. The following app shows how to do this, by retaining the
TVApplicationController and present the
navigationController from the
This is the end of post