VideoViewController.swift 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*****************************************************************************
  2. * VideoViewController.swift
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2018 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Carola Nitz <caro # videolan.org>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. class VLCVideoViewController: VLCMediaViewController {
  13. override init(services: Services) {
  14. super.init(services: services)
  15. setupUI()
  16. }
  17. private func setupUI() {
  18. title = NSLocalizedString("VIDEO", comment: "")
  19. tabBarItem = UITabBarItem(
  20. title: NSLocalizedString("VIDEO", comment: ""),
  21. image: UIImage(named: "TVShowsIcon"),
  22. selectedImage: UIImage(named: "TVShowsIcon"))
  23. tabBarItem.accessibilityIdentifier = VLCAccessibilityIdentifier.video
  24. }
  25. override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
  26. let movies = VLCMediaCategoryViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.movies)
  27. movies.delegate = super.self()
  28. let episodes = VLCMediaCategoryViewController<MLShowEpisode>(services: services, subcategory: VLCMediaSubcategories.episodes)
  29. episodes.delegate = super.self()
  30. let playlists = VLCMediaCategoryViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.videoPlaylists)
  31. playlists.delegate = super.self()
  32. return [movies, episodes, playlists]
  33. }
  34. }