Commit 5addb093 authored by Soomin Lee's avatar Soomin Lee

Add AudioViewController

parent 48da301a
/*****************************************************************************
* AudioViewController.swift
* VLC for iOS
*****************************************************************************
* Copyright (c) 2018 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <caro # videolan.org>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
class VLCAudioViewController: VLCMediaViewController {
override init(services: Services) {
super.init(services: services)
setupUI()
}
private func setupUI() {
title = NSLocalizedString("AUDIO", comment: "")
tabBarItem = UITabBarItem(
title: NSLocalizedString("AUDIO", comment: ""),
image: UIImage(named: "MusicAlbums"),
selectedImage: UIImage(named: "MusicAlbums"))
tabBarItem.accessibilityIdentifier = VLCAccessibilityIdentifier.audio
}
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
let tracks = VLCMediaCategoryViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.tracks)
tracks.delegate = super.self()
let genres = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.genres)
genres.delegate = super.self()
let artists = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.artists)
artists.delegate = super.self()
let albums = VLCMediaCategoryViewController<MLAlbum>(services: services, subcategory: VLCMediaSubcategories.albums)
albums.delegate = super.self()
let playlists = VLCMediaCategoryViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.audioPlaylists)
playlists.delegate = super.self()
return [tracks, genres, artists, albums, playlists]
}
}
......@@ -12,37 +12,6 @@
import UIKit
class VLCAudioViewController: VLCMediaViewController {
override init(services: Services) {
super.init(services: services)
setupUI()
}
private func setupUI() {
title = NSLocalizedString("AUDIO", comment: "")
tabBarItem = UITabBarItem(
title: NSLocalizedString("AUDIO", comment: ""),
image: UIImage(named: "MusicAlbums"),
selectedImage: UIImage(named: "MusicAlbums"))
tabBarItem.accessibilityIdentifier = VLCAccessibilityIdentifier.audio
}
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
let tracks = VLCMediaCategoryViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.tracks)
tracks.delegate = super.self()
let genres = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.genres)
genres.delegate = super.self()
let artists = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.artists)
artists.delegate = super.self()
let albums = VLCMediaCategoryViewController<MLAlbum>(services: services, subcategory: VLCMediaSubcategories.albums)
albums.delegate = super.self()
let playlists = VLCMediaCategoryViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.audioPlaylists)
playlists.delegate = super.self()
return [tracks, genres, artists, albums, playlists]
}
}
class VLCMediaViewController: VLCPagingViewController<VLCLabelCell> {
var services: Services
private var rendererButton: UIButton
......
......@@ -251,6 +251,7 @@
8DD651BA208F6AF00052EE68 /* VLCActionSheetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD651B9208F6AF00052EE68 /* VLCActionSheetCell.swift */; };
8DD651C4208F786F0052EE68 /* VLCActionSheetSectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD651C3208F786F0052EE68 /* VLCActionSheetSectionHeader.swift */; };
8DE187812105DAB100A091D2 /* VideoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DE187802105DAB100A091D2 /* VideoViewController.swift */; };
8DE187832105DB2E00A091D2 /* AudioViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DE187822105DB2E00A091D2 /* AudioViewController.swift */; };
8F91EC79195CEC7900F5BCBA /* VLCOpenInActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */; };
8F91EC7F195E1DAB00F5BCBA /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F91EC7E195E1DAB00F5BCBA /* AssetsLibrary.framework */; };
9B088308183D7BEC004B5C2A /* VLCCloudStorageTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B088307183D7BEC004B5C2A /* VLCCloudStorageTableViewController.m */; };
......@@ -957,6 +958,7 @@
8DD651B9208F6AF00052EE68 /* VLCActionSheetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VLCActionSheetCell.swift; sourceTree = "<group>"; };
8DD651C3208F786F0052EE68 /* VLCActionSheetSectionHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VLCActionSheetSectionHeader.swift; sourceTree = "<group>"; };
8DE187802105DAB100A091D2 /* VideoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoViewController.swift; sourceTree = "<group>"; };
8DE187822105DB2E00A091D2 /* AudioViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioViewController.swift; sourceTree = "<group>"; };
8DEAD87A672248D0A6790405 /* libPods-vlc-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-vlc-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8F91EC77195CEC7900F5BCBA /* VLCOpenInActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCOpenInActivity.h; path = Sources/VLCOpenInActivity.h; sourceTree = SOURCE_ROOT; };
8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCOpenInActivity.m; path = Sources/VLCOpenInActivity.m; sourceTree = SOURCE_ROOT; };
......@@ -2123,6 +2125,7 @@
8DE1877F2105DA2B00A091D2 /* MediaViewControllers */ = {
isa = PBXGroup;
children = (
8DE187822105DB2E00A091D2 /* AudioViewController.swift */,
4170152B209A1D3600802E44 /* MediaViewController.swift */,
8DE187802105DAB100A091D2 /* VideoViewController.swift */,
);
......@@ -3313,6 +3316,7 @@
7D30F3D0183AB2AC00FFC021 /* VLCMediaFileDiscoverer.m in Sources */,
7D18F0A21B34522000651A30 /* VLCActivityManager.m in Sources */,
DD3EFEEE1BDEBA3800B68579 /* VLCServerListViewController.m in Sources */,
8DE187832105DB2E00A091D2 /* AudioViewController.swift in Sources */,
7DB847D71A5871570002DC30 /* VLCOneDriveObject.m in Sources */,
CABCBAFF20EB15EA0040E2F5 /* VLCSettingsTableViewCell.swift in Sources */,
7D1052E91A4DCC1100295F08 /* VLCOneDriveTableViewController.m in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment