AppCoordinator.swift 820 Bytes
Newer Older
Carola Nitz's avatar
Carola Nitz committed
1 2 3 4 5 6 7 8 9 10
//
//  AppCoordinator.swift
//  VLC-iOS
//
//  Created by Carola Nitz on 11/30/17.
//  Copyright © 2017 VideoLAN. All rights reserved.
//

import Foundation

11 12 13 14
@objc(VLCService)
public class Services:NSObject {
    @objc let mediaDataSource = VLCMediaDataSource()
}
Carola Nitz's avatar
Carola Nitz committed
15

16 17 18
@objc class AppCoordinator : NSObject {

    var childCoordinators: [NSObject] = []
19
    private var tabBarController:UITabBarController
20
    private var services = Services()
Carola Nitz's avatar
Carola Nitz committed
21

22 23
    @objc public init(tabBarController: UITabBarController) {
        self.tabBarController = tabBarController
Carola Nitz's avatar
Carola Nitz committed
24 25
        super.init()
    }
26

Carola Nitz's avatar
Carola Nitz committed
27
    @objc public func start() {
28
        let tabbarCoordinator = VLCTabbarCooordinator(tabBarController: self.tabBarController, services:services)
29 30
        tabbarCoordinator.start()
        childCoordinators.append(tabbarCoordinator)
Carola Nitz's avatar
Carola Nitz committed
31 32
    }
}