AppCoordinator.swift 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*****************************************************************************
  2. * AppCoordinator.swift
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2018 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Carola Nitz <nitz.carola # gmail.com>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. import Foundation
  13. @objc(VLCService)
  14. public class Services: NSObject {
  15. @objc let mediaDataSource = VLCMediaDataSource()
  16. @objc let rendererDiscovererManager = VLCRendererDiscovererManager(presentingViewController: nil)
  17. }
  18. @objc class AppCoordinator: NSObject {
  19. var childCoordinators: [NSObject] = []
  20. private var tabBarController: UITabBarController
  21. private var services = Services()
  22. @objc public init(tabBarController: UITabBarController) {
  23. self.tabBarController = tabBarController
  24. super.init()
  25. }
  26. @objc public func start() {
  27. let tabbarCoordinator = VLCTabbarCooordinator(tabBarController: self.tabBarController, services:services)
  28. tabbarCoordinator.start()
  29. childCoordinators.append(tabbarCoordinator)
  30. }
  31. }