From 1f034b7090977a34788ffbef285f5db51ab2224b Mon Sep 17 00:00:00 2001 From: Carola Nitz <nitz.carola@googlemail.com> Date: Fri, 5 Jan 2018 16:37:47 +0100 Subject: [PATCH] newUI: Introduction of the new UI Move from the sidemenu to use the tabbarcontroller, removed the MenuRevealButton Add the MediaViewController and adjust the architecture in the VLCDisplayController Created a subclass for the view of the VLCDisplayController to let touches go through Have only one instance of the Playbackcontroller that is going to be part of the tabbarcontroller Changed the code that is currently calculating the miniviews position. This still needs fixing in case you turn the phone Add sort button still need to implement functionality Add Presentationtheme and darkmode. Move Appearance code into own class Move the Wificell into the VLCServerListViewController --- .../VLCPlaybackInfoChaptersTVViewController.m | 5 - ...VLCPlaybackInfoMediaInfoTVViewController.m | 5 - .../VLCPlaybackInfoTracksTVViewController.m | 5 - .../VLCFullscreenMovieTVViewController.m | 1 - Apple-TV/VLCCloudServicesTVViewController.m | 5 - Resources/About Contents.html | 14 +- Resources/Settings.bundle/Root.inApp.plist | 22 +- Resources/Settings.bundle/Root.plist | 10 + .../Settings.bundle/en.lproj/Root.strings | Bin 8036 -> 8108 bytes Resources/VLCDownloadViewController.xib | 74 +++-- .../VLCOpenNetworkStreamViewController.xib | 56 ++-- Resources/VLCPlaylistCollectionViewCell.xib | 11 +- Resources/VLCPlaylistTableViewCell.xib | 11 +- Resources/VLCStringsForLocalization.m | 1 + Resources/en.lproj/Localizable.strings | 6 +- .../Clouds/VLCBoxCollectionViewController.m | 5 - .../VLCDropboxCollectionViewController.m | 5 - .../Coordinators/AppCoordinator.swift | 35 +++ SharedSources/Coordinators/SortOption.swift | 21 ++ SharedSources/MediaDataSource.swift | 69 +++++ SharedSources/PresentationTheme.swift | 157 ++++++++++ .../HTTP/VLCLocalNetworkServiceBrowserHTTP.m | 3 - .../VLCLocalServerDiscoveryController.m | 2 - SharedSources/VLCPlayerControlWebSocket.m | 5 - Sources/AppearanceManager.swift | 55 ++++ .../RemoteNetworkDataSource.swift | 27 ++ .../VLCNetworkListViewController.m | 13 +- .../VLCNetworkLoginViewController.m | 5 - .../VLCServerListViewController.h | 2 - .../VLCServerListViewController.m | 122 +++++--- Sources/MediaViewController.swift | 137 +++++++++ Sources/UIBarButtonItem+Theme.h | 1 - Sources/UIBarButtonItem+Theme.m | 22 -- Sources/VLCAboutViewController.m | 41 ++- Sources/VLCAlertView.m | 5 - Sources/VLCAppDelegate.h | 5 - Sources/VLCAppDelegate.m | 276 ++++++++---------- Sources/VLCBoxController.m | 5 - Sources/VLCBoxTableViewController.m | 5 - Sources/VLCCloudServicesTableViewController.m | 39 +-- Sources/VLCCloudStorageTableViewController.m | 30 +- Sources/VLCConstants.h | 2 + Sources/VLCDownloadViewController.m | 46 ++- .../VLCDragAndDropManager.swift | 4 +- Sources/VLCDropboxTableViewController.m | 5 - Sources/VLCHTTPUploaderController.m | 5 - Sources/VLCLibrarySearchDisplayDataSource.h | 2 +- Sources/VLCLibrarySearchDisplayDataSource.m | 18 +- Sources/VLCLibraryViewController.m | 15 +- Sources/VLCMediaDataSource.m | 66 ++--- Sources/VLCMenuTableViewController.m | 30 +- Sources/VLCMiniPlaybackView.m | 24 +- Sources/VLCMovieViewController.h | 9 +- Sources/VLCMovieViewController.m | 13 +- Sources/VLCOpenNetworkStreamViewController.m | 45 +-- Sources/VLCPlaybackController.h | 1 - Sources/VLCPlaybackController.m | 1 - Sources/VLCPlayerDisplayController.h | 6 +- Sources/VLCPlayerDisplayController.m | 125 +++----- Sources/VLCPlaylistCollectionViewCell.h | 5 +- Sources/VLCPlaylistCollectionViewCell.m | 23 +- Sources/VLCPlaylistTableViewCell.h | 3 +- Sources/VLCPlaylistTableViewCell.m | 6 +- Sources/VLCSettingsController.m | 24 +- Sources/VLCTabBarCoordinator.swift | 172 +++++++++++ Sources/VLCWiFiUploadTableViewCell.h | 1 + Sources/VLCWiFiUploadTableViewCell.m | 6 +- VLC-iOS-Bridging-Header.h | 24 +- VLC.xcodeproj/project.pbxproj | 98 +++++-- .../cloudServices/Box.imageset/Contents.json | 15 +- .../Drive.imageset/Contents.json | 15 +- .../DriveWhite.imageset/Contents.json | 15 +- .../Dropbox.imageset/Contents.json | 15 +- .../OneDrive.imageset/Contents.json | 15 +- .../OneDriveWhite.imageset/Contents.json | 15 +- .../dropbox-white.imageset/Contents.json | 15 +- .../iCloud.imageset/Contents.json | 15 +- .../iCloudIcon.imageset/Contents.json | 15 +- 78 files changed, 1471 insertions(+), 761 deletions(-) create mode 100644 SharedSources/Coordinators/AppCoordinator.swift create mode 100644 SharedSources/Coordinators/SortOption.swift create mode 100644 SharedSources/MediaDataSource.swift create mode 100644 SharedSources/PresentationTheme.swift create mode 100644 Sources/AppearanceManager.swift create mode 100644 Sources/LocalNetworkConnectivity/RemoteNetworkDataSource.swift create mode 100644 Sources/MediaViewController.swift rename {SharedSources => Sources}/VLCDragAndDropManager.swift (98%) create mode 100644 Sources/VLCTabBarCoordinator.swift diff --git a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoChaptersTVViewController.m b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoChaptersTVViewController.m index ea7b1ccac..042bb1e7e 100644 --- a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoChaptersTVViewController.m +++ b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoChaptersTVViewController.m @@ -60,11 +60,6 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mediaPlayerChanged) name:VLCPlaybackControllerPlaybackMetadataDidChange object:nil]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - + (BOOL)shouldBeVisibleForPlaybackController:(VLCPlaybackController *)vpc { return [vpc numberOfChaptersForCurrentTitle] > 1; diff --git a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoMediaInfoTVViewController.m b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoMediaInfoTVViewController.m index 8c3ed3d9a..cb210bc56 100644 --- a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoMediaInfoTVViewController.m +++ b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoMediaInfoTVViewController.m @@ -39,11 +39,6 @@ object:nil]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewWillAppear:(BOOL)animated { if ([UIScreen mainScreen].traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) { diff --git a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoTracksTVViewController.m b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoTracksTVViewController.m index 7e65fd190..657394d08 100644 --- a/Apple-TV/Playback/Playback Info/VLCPlaybackInfoTracksTVViewController.m +++ b/Apple-TV/Playback/Playback Info/VLCPlaybackInfoTracksTVViewController.m @@ -60,11 +60,6 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mediaPlayerChanged) name:VLCPlaybackControllerPlaybackMetadataDidChange object:nil]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; diff --git a/Apple-TV/Playback/VLCFullscreenMovieTVViewController.m b/Apple-TV/Playback/VLCFullscreenMovieTVViewController.m index 788fd40ee..00bd87806 100644 --- a/Apple-TV/Playback/VLCFullscreenMovieTVViewController.m +++ b/Apple-TV/Playback/VLCFullscreenMovieTVViewController.m @@ -181,7 +181,6 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState) [fileManager removeItemAtPath:tempSubsDirPath error:nil]; [super viewWillDisappear:animated]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; } - (BOOL)canBecomeFirstResponder diff --git a/Apple-TV/VLCCloudServicesTVViewController.m b/Apple-TV/VLCCloudServicesTVViewController.m index 37e6c8d60..ad87df6bd 100644 --- a/Apple-TV/VLCCloudServicesTVViewController.m +++ b/Apple-TV/VLCCloudServicesTVViewController.m @@ -53,11 +53,6 @@ [self performSelector:@selector(updateDropbox) withObject:nil afterDelay:0.1]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (NSString *)title { return NSLocalizedString(@"CLOUD_SERVICES", nil); diff --git a/Resources/About Contents.html b/Resources/About Contents.html index 78c2d49df..8e6b68a1d 100644 --- a/Resources/About Contents.html +++ b/Resources/About Contents.html @@ -1,17 +1,17 @@ <html> <head> </head> -<body style="background-color: #1f1f1f"> +<body style="background-color: BACKGROUNDCOLOR"> <style type="text/css"> - h3 {color: #aaaaaa} - h5 {text-decoration: plain; color: #aaaaaa} - A:link {text-decoration: underline; color: #aaaaaa} - A:visited {text-decoration: none; color: #aaaaaa} - A:active {text-decoration: none; color: #aaaaaa} + h3 {color: TEXTCOLOR} + h5 {text-decoration: plain; color: TEXTCOLOR} + a:link {text-decoration: underline; color: TEXTCOLOR} + a:visited {text-decoration: none; color: TEXTCOLOR} + a:active {text-decoration: none; color: TEXTCOLOR} body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300; } </style> -<div style="text-align:left; border:solid transparent 1px; padding:0.5em 1em 0.5em 1em; overflow:auto; font-size:10pt; font-family:Helvetica; color:#aaaaaa"; A:link {text-decoration: underline; color:#aaaaaa}> +<div style="text-align:left; border:solid transparent 1px; padding:0.5em 1em 0.5em 1em; overflow:auto; font-size:10pt; font-family:Helvetica; color:TEXTCOLOR"; A:link {text-decoration: underline; color:TEXTCOLOR}> <p align="center"> <table cellspacing="0" cellpadding="0"> <tr> diff --git a/Resources/Settings.bundle/Root.inApp.plist b/Resources/Settings.bundle/Root.inApp.plist index fe290b247..9c21362c8 100644 --- a/Resources/Settings.bundle/Root.inApp.plist +++ b/Resources/Settings.bundle/Root.inApp.plist @@ -5,12 +5,22 @@ <key>PreferenceSpecifiers</key> <array> <dict> - <key>Type</key> - <string>PSGroupSpecifier</string> - <key>Title</key> - <string>SETTINGS_GENERIC_TITLE</string> - </dict> - <dict> + <key>Type</key> + <string>PSGroupSpecifier</string> + <key>Title</key> + <string>SETTINGS_GENERIC_TITLE</string> + </dict> + <dict> + <key>DefaultValue</key> + <string>NO</string> + <key>Key</key> + <string>darkMode</string> + <key>Title</key> + <string>SETTINGS_DARKTHEME</string> + <key>Type</key> + <string>PSToggleSwitchSpecifier</string> + </dict> + <dict> <key>DefaultValue</key> <string>NO</string> <key>Key</key> diff --git a/Resources/Settings.bundle/Root.plist b/Resources/Settings.bundle/Root.plist index 55fd0ef55..c081f3152 100644 --- a/Resources/Settings.bundle/Root.plist +++ b/Resources/Settings.bundle/Root.plist @@ -10,6 +10,16 @@ <key>Title</key> <string>SETTINGS_GENERIC_TITLE</string> </dict> + <dict> + <key>DefaultValue</key> + <true/> + <key>Key</key> + <string>SETTINGS_USE_DARKTHEME</string> + <key>Title</key> + <string>SETTINGS_APPTHEME</string> + <key>Type</key> + <string>PSToggleSwitchSpecifier</string> + </dict> <dict> <key>DefaultValue</key> <true/> diff --git a/Resources/Settings.bundle/en.lproj/Root.strings b/Resources/Settings.bundle/en.lproj/Root.strings index fd04278e914c6efb49b15978d01f385e9166544d..4435a4185d22c7c9016305777ef3b8083dab31ab 100644 GIT binary patch delta 58 zcmaE2x5j=07n7z7gCj!_gEvD6g9n2vgD(&(G1xLF07(~yM1~@UY#=*?A%h`xaz3y8 JW-g{ESpZ-s3s3+6 delta 12 TcmZ2u|HN(s7t`h-rYKneAy))Q diff --git a/Resources/VLCDownloadViewController.xib b/Resources/VLCDownloadViewController.xib index cfe7f0350..f6c789c3a 100644 --- a/Resources/VLCDownloadViewController.xib +++ b/Resources/VLCDownloadViewController.xib @@ -1,8 +1,12 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9058" systemVersion="15B30a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9048"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCDownloadViewController"> @@ -29,30 +33,27 @@ <subviews> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Enter any HTTP address to download the file to your $DEVICE." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="95"> <rect key="frame" x="0.0" y="87" width="320" height="38"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="38" id="vRA-2f-jer"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="calibratedRGB"/> + <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <textField clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="unlessEditing" translatesAutoresizingMaskIntoConstraints="NO" id="yZ7-sQ-cbO"> <rect key="frame" x="0.0" y="8" width="320" height="31"/> - <animations/> - <color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="31" id="BrP-Ow-0Rv"/> </constraints> - <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" autocorrectionType="no" keyboardAppearance="alert"/> </textField> <button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EPu-Ev-iiG"> <rect key="frame" x="0.0" y="43" width="320" height="40"/> - <animations/> - <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="40" id="paf-BZ-9vp"/> </constraints> @@ -67,34 +68,31 @@ <subviews> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current Download.mpg" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="84"> <rect key="frame" x="11" y="11" width="150" height="17"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" white="0.71999999999999997" alpha="1" colorSpace="calibratedWhite"/> + <color key="textColor" red="0.72000002861022949" green="0.72000002861022949" blue="0.72000002861022949" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <progressView contentMode="scaleToFill" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="85"> <rect key="frame" x="11" y="73" width="298" height="2"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="2" id="Jeu-jw-vzk"/> </constraints> </progressView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="86"> - <rect key="frame" x="283" y="8" width="29" height="31"/> - <animations/> + <rect key="frame" x="290" y="8" width="22" height="22"/> <constraints> <constraint firstAttribute="height" relation="lessThanOrEqual" constant="31" id="VHL-kj-SOm"/> <constraint firstAttribute="width" relation="lessThanOrEqual" constant="29" id="zTY-if-NSJ"/> </constraints> <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> <state key="normal" image="flatDeleteButton.png"> - <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/> - <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> + <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <state key="highlighted"> - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> <action selector="cancelDownload:" destination="-1" eventType="touchUpInside" id="90"/> @@ -102,39 +100,35 @@ </button> <activityIndicatorView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" hidesWhenStopped="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="91"> <rect key="frame" x="0.0" y="-129" width="37" height="37"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </activityIndicatorView> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0 Kb/s" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="97"> <rect key="frame" x="11" y="48" width="42" height="17"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" name="secondarySelectedControlColor" catalog="System" colorSpace="catalog"/> + <color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="00:00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="98"> <rect key="frame" x="248.5" y="48" width="60.5" height="17"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" name="secondarySelectedControlColor" catalog="System" colorSpace="catalog"/> + <color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="99"> <rect key="frame" x="150" y="48" width="20" height="17"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="17" id="0Fp-ES-zmf"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" name="secondarySelectedControlColor" catalog="System" colorSpace="catalog"/> + <color key="textColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="bottom" secondItem="85" secondAttribute="bottom" constant="15" id="1Ms-oP-nb3"/> <constraint firstItem="85" firstAttribute="top" secondItem="98" secondAttribute="bottom" constant="8" id="5m8-CM-by5"/> @@ -155,19 +149,17 @@ </view> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="69"> <rect key="frame" x="0.0" y="223" width="320" height="160"/> - <animations/> - <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> - <color key="separatorColor" white="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="calibratedWhite"/> - <color key="sectionIndexBackgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="calibratedRGB"/> - <color key="sectionIndexTrackingBackgroundColor" red="0.30689102410000002" green="0.30688184499999999" blue="0.3068870306" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="separatorColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/> + <color key="sectionIndexBackgroundColor" red="0.1052877679" green="0.1052846164" blue="0.1052864045" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="sectionIndexTrackingBackgroundColor" red="0.30689102410000002" green="0.30688184499999999" blue="0.3068870306" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <connections> <outlet property="dataSource" destination="-1" id="93"/> <outlet property="delegate" destination="-1" id="94"/> </connections> </tableView> </subviews> - <animations/> - <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="trailing" secondItem="yZ7-sQ-cbO" secondAttribute="trailing" id="6xO-qL-QAy"/> <constraint firstItem="yZ7-sQ-cbO" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="Dnj-BX-p5y"/> diff --git a/Resources/VLCOpenNetworkStreamViewController.xib b/Resources/VLCOpenNetworkStreamViewController.xib index 6e6c96006..f2b895ce4 100644 --- a/Resources/VLCOpenNetworkStreamViewController.xib +++ b/Resources/VLCOpenNetworkStreamViewController.xib @@ -1,9 +1,12 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9058" systemVersion="15B38b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> <dependencies> <deployment identifier="iOS"/> - <development version="6300" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9048"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCOpenNetworkStreamViewController"> @@ -26,16 +29,14 @@ <subviews> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Enter any HTTP, RTSP, RTMP, MMS, FTP or UDP/RTP address to open the stream directly." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="27"> <rect key="frame" x="0.0" y="85" width="282" height="46"/> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="calibratedRGB"/> + <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i2a-FY-QGC"> <rect key="frame" x="0.0" y="43" width="282" height="40"/> - <animations/> - <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="40" id="Vsx-fz-bZs"/> </constraints> @@ -50,20 +51,17 @@ <subviews> <switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="8"> <rect key="frame" x="20" y="10" width="51" height="31"/> - <animations/> - <color key="onTintColor" red="1" green="0.51764705879999995" blue="0.0" alpha="1" colorSpace="deviceRGB"/> + <color key="onTintColor" red="0.98948383331298828" green="0.43470591306686401" blue="0.032047603279352188" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Private Playback" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9"> - <rect key="frame" x="77" y="15.5" width="126.5" height="20.5"/> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> + <rect key="frame" x="77" y="15.5" width="126" height="20.5"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> - <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="calibratedRGB"/> + <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="8" firstAttribute="top" secondItem="19" secondAttribute="top" constant="10" id="2GS-NS-3e9"/> <constraint firstAttribute="height" constant="51" id="Cm5-Z1-hUm"/> @@ -79,20 +77,17 @@ <subviews> <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Scan Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ewx-Hn-7Lc" userLabel="Label - Scan Subtitle"> <rect key="frame" x="77" y="15.5" width="101.5" height="20.5"/> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> - <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="calibratedRGB"/> + <color key="textColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <switch opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="vn6-u6-LYP"> <rect key="frame" x="20" y="10" width="51" height="31"/> - <animations/> - <color key="onTintColor" red="1" green="0.51764705879999995" blue="0.0" alpha="1" colorSpace="deviceRGB"/> + <color key="onTintColor" red="0.98948383331298828" green="0.43470591306686401" blue="0.032047603279352188" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </switch> </subviews> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="Ewx-Hn-7Lc" firstAttribute="centerY" secondItem="Cuf-mI-ZuN" secondAttribute="centerY" id="438-cI-fcY"/> <constraint firstAttribute="height" constant="51" id="4q4-k4-3aL"/> @@ -103,9 +98,8 @@ </view> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" indicatorStyle="white" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="10"> <rect key="frame" x="0.0" y="237" width="282" height="145"/> - <animations/> - <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/> - <color key="separatorColor" white="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="calibratedWhite"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <color key="separatorColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/> <connections> <outlet property="dataSource" destination="-1" id="18"/> <outlet property="delegate" destination="-1" id="17"/> @@ -113,18 +107,16 @@ </tableView> <textField clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="unlessEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Ucc-ui-OIc"> <rect key="frame" x="0.0" y="8" width="282" height="31"/> - <animations/> - <color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" red="0.28627450980000002" green="0.28627450980000002" blue="0.28627450980000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="31" id="wUp-0d-Tui"/> </constraints> - <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" autocorrectionType="no" keyboardAppearance="alert"/> </textField> </subviews> - <animations/> - <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="trailing" secondItem="19" secondAttribute="trailing" id="5U7-LM-ATZ"/> <constraint firstItem="Ucc-ui-OIc" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="5wR-1o-dR8"/> diff --git a/Resources/VLCPlaylistCollectionViewCell.xib b/Resources/VLCPlaylistCollectionViewCell.xib index 3020f1e2d..488727a0f 100644 --- a/Resources/VLCPlaylistCollectionViewCell.xib +++ b/Resources/VLCPlaylistCollectionViewCell.xib @@ -1,15 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="14092" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> + <device id="ipad9_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14081.1"/> <capability name="Constraints to layout margins" minToolsVersion="6.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> - <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="PlaylistCell" id="2" customClass="VLCPlaylistCollectionViewCell"> + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="VLCPlaylistCollectionViewCell" id="2" customClass="VLCPlaylistCollectionViewCell"> <rect key="frame" x="0.0" y="0.0" width="341" height="190"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> @@ -54,7 +57,7 @@ <size key="shadowOffset" width="0.0" height="0.0"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Meta Data" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lP6-D2-Oef"> - <rect key="frame" x="141" y="8" width="59" height="15"/> + <rect key="frame" x="141.5" y="8" width="58.5" height="14.5"/> <fontDescription key="fontDescription" type="system" pointSize="12"/> <color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> diff --git a/Resources/VLCPlaylistTableViewCell.xib b/Resources/VLCPlaylistTableViewCell.xib index 196d9cc5a..6a574e22b 100644 --- a/Resources/VLCPlaylistTableViewCell.xib +++ b/Resources/VLCPlaylistTableViewCell.xib @@ -1,14 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14092" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14081.1"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="PlaylistCell" rowHeight="191" id="3" customClass="VLCPlaylistTableViewCell"> + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="VLCPlaylistTableViewCell" rowHeight="191" id="3" customClass="VLCPlaylistTableViewCell"> <rect key="frame" x="0.0" y="0.0" width="320" height="90"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3" id="pEL-yt-P8r"> @@ -47,7 +50,7 @@ <size key="shadowOffset" width="0.0" height="0.0"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Meta Data" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3xi-uj-aAV"> - <rect key="frame" x="131" y="8" width="59" height="15"/> + <rect key="frame" x="131.5" y="8" width="58.5" height="14.5"/> <fontDescription key="fontDescription" type="system" pointSize="12"/> <color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> diff --git a/Resources/VLCStringsForLocalization.m b/Resources/VLCStringsForLocalization.m index 403134807..62db670ba 100644 --- a/Resources/VLCStringsForLocalization.m +++ b/Resources/VLCStringsForLocalization.m @@ -37,4 +37,5 @@ NSLocalizedString(@"Passcodes did not match. Try again.", nil); NSLocalizedString(@"1 Failed Passcode Attempt", nil); NSLocalizedString(@"%d Failed Passcode Attempts", nil); NSLocalizedString(@"Next", nil); +NSLocalizedString(@"DOWNLOAD_FROM_HTTP", nil); } diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 544ba54ff..a3f73d9d2 100644 --- a/Resources/en.lproj/Localizable.strings +++ b/Resources/en.lproj/Localizable.strings @@ -77,8 +77,7 @@ "OPEN_NETWORK" = "Open Network Stream"; "NETWORK_TITLE" = "Network Stream"; "OPEN_NETWORK_HELP" = "Enter any HTTP, RTSP, RTMP, MMS, FTP or UDP/RTP address to open the stream directly."; -"ABOUT_APP" = "About VLC for iOS"; -"OPEN_VLC_MENU" = "Open VLC sidebar menu"; +"ABOUT_APP" = "About"; "HTTP_UPLOAD_SERVER_OFF" = "Inactive Server"; "HTTP_UPLOAD_NO_CONNECTIVITY" = "No active WiFi connection"; "OPEN_STREAM_OR_DOWNLOAD" = "Would you like to download or play this URL?"; @@ -340,3 +339,6 @@ /* New strings */ "PROTOCOL_NOT_SELECTED" = "Protocol not selected"; "Settings" = "Settings"; + +/* New strings */ +"FILE_NOT_SUPPORTED_LONG" = "FILE_NOT_SUPPORTED_LONG"; diff --git a/SharedSources/Clouds/VLCBoxCollectionViewController.m b/SharedSources/Clouds/VLCBoxCollectionViewController.m index 301bfd64a..0b612dd70 100644 --- a/SharedSources/Clouds/VLCBoxCollectionViewController.m +++ b/SharedSources/Clouds/VLCBoxCollectionViewController.m @@ -37,11 +37,6 @@ return self; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; diff --git a/SharedSources/Clouds/VLCDropboxCollectionViewController.m b/SharedSources/Clouds/VLCDropboxCollectionViewController.m index 8c1f7ad3e..b90407c50 100644 --- a/SharedSources/Clouds/VLCDropboxCollectionViewController.m +++ b/SharedSources/Clouds/VLCDropboxCollectionViewController.m @@ -25,11 +25,6 @@ @implementation VLCDropboxCollectionViewController -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; diff --git a/SharedSources/Coordinators/AppCoordinator.swift b/SharedSources/Coordinators/AppCoordinator.swift new file mode 100644 index 000000000..33a6f3c59 --- /dev/null +++ b/SharedSources/Coordinators/AppCoordinator.swift @@ -0,0 +1,35 @@ +/***************************************************************************** + * AppCoordinator.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ +import Foundation + +@objc(VLCService) +public class Services:NSObject { + @objc let mediaDataSource = VLCMediaDataSource() +} + +@objc class AppCoordinator : NSObject { + + var childCoordinators: [NSObject] = [] + private var tabBarController:UITabBarController + private var services = Services() + + @objc public init(tabBarController: UITabBarController) { + self.tabBarController = tabBarController + super.init() + } + + @objc public func start() { + let tabbarCoordinator = VLCTabbarCooordinator(tabBarController: self.tabBarController, services:services) + tabbarCoordinator.start() + childCoordinators.append(tabbarCoordinator) + } +} diff --git a/SharedSources/Coordinators/SortOption.swift b/SharedSources/Coordinators/SortOption.swift new file mode 100644 index 000000000..acd3a86aa --- /dev/null +++ b/SharedSources/Coordinators/SortOption.swift @@ -0,0 +1,21 @@ +/***************************************************************************** + * SortOption.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ + +public enum SortOption:String { + case alphabetically = "Name" + case insertonDate = "Date" + case size = "Size" + + var localizedDescription: String { + return NSLocalizedString(self.rawValue, comment: "") + } +} diff --git a/SharedSources/MediaDataSource.swift b/SharedSources/MediaDataSource.swift new file mode 100644 index 000000000..af725994f --- /dev/null +++ b/SharedSources/MediaDataSource.swift @@ -0,0 +1,69 @@ +/***************************************************************************** + * MediaDataSource.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ + +public class MediaDataSourceAndDelegate:NSObject, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { + + private let cellPadding:CGFloat = 5.0 + private var services: Services + public weak var delegate: UICollectionViewDelegate? + + public convenience init(services:Services) { + self.init() + self.services = services + } + + public override init() { + self.services = Services() + super.init() + } + + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return Int(services.mediaDataSource.numberOfFiles()) + } + + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + if let playlistCell = collectionView.dequeueReusableCell(withReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier(), for: indexPath) as? VLCPlaylistCollectionViewCell { + playlistCell.mediaObject = services.mediaDataSource.object(at: UInt(indexPath.row)) + return playlistCell + } + return UICollectionViewCell() + } + + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + delegate?.collectionView!(collectionView, didSelectItemAt: indexPath) + } + + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + + let numberOfCells:CGFloat = collectionView.traitCollection.horizontalSizeClass == .regular ? 3.0 : 2.0 + let aspectRatio:CGFloat = 10.0 / 16.0 + + // We have the number of cells and we always have numberofCells + 1 padding spaces. -pad-[Cell]-pad-[Cell]-pad- + // we then have the entire padding, we divide the entire padding by the number of Cells to know how much needs to be substracted from ech cell + // since this might be an uneven number we ceil + var cellWidth = collectionView.bounds.size.width / numberOfCells + cellWidth = cellWidth - ceil(((numberOfCells + 1) * cellPadding) / numberOfCells) + + return CGSize(width:cellWidth, height:cellWidth * aspectRatio) + } + + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsetsMake(cellPadding, cellPadding, cellPadding, cellPadding); + } + + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return cellPadding + } + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + return cellPadding + } +} diff --git a/SharedSources/PresentationTheme.swift b/SharedSources/PresentationTheme.swift new file mode 100644 index 000000000..522d75540 --- /dev/null +++ b/SharedSources/PresentationTheme.swift @@ -0,0 +1,157 @@ +/***************************************************************************** + * PresentationTheme.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. + *****************************************************************************/ + +import Foundation + +extension Notification.Name { + static let VLCThemeDidChangeNotification = Notification.Name("themeDidChangeNotfication") +} + +@objcMembers public class ColorPalette : NSObject { + + public let isDark: Bool + public let name: String + public let background:UIColor + public let cellBackgroundA:UIColor + public let cellBackgroundB:UIColor + public let cellDetailTextColor:UIColor + public let cellTextColor:UIColor + public let lightTextColor:UIColor + public let sectionHeaderTextColor:UIColor + public let sectionHeaderTintColor:UIColor + public let settingsBackground:UIColor + public let settingsCellBackground:UIColor + public let settingsSeparatorColor:UIColor + public let tabBarColor:UIColor + public let orangeUI:UIColor + + public init(isDark: Bool, + name: String, + background:UIColor, + cellBackgroundA:UIColor, + cellBackgroundB:UIColor, + cellDetailTextColor:UIColor, + cellTextColor:UIColor, + lightTextColor:UIColor, + sectionHeaderTextColor:UIColor, + sectionHeaderTintColor:UIColor, + settingsBackground:UIColor, + settingsCellBackground:UIColor, + settingsSeparatorColor:UIColor, + tabBarColor:UIColor, + orangeUI:UIColor) { + self.isDark = isDark + self.name = name + self.background = background + self.cellBackgroundA = cellBackgroundA + self.cellBackgroundB = cellBackgroundB + self.cellDetailTextColor = cellDetailTextColor + self.cellTextColor = cellTextColor + self.lightTextColor = lightTextColor + self.sectionHeaderTextColor = sectionHeaderTextColor + self.sectionHeaderTintColor = sectionHeaderTintColor + self.settingsBackground = settingsBackground + self.settingsCellBackground = settingsCellBackground + self.settingsSeparatorColor = settingsSeparatorColor + self.tabBarColor = tabBarColor + self.orangeUI = orangeUI + } +} + +@objcMembers public class PresentationTheme : NSObject { + + public static let brightTheme = PresentationTheme(colors: brightPalette) + public static let darkTheme = PresentationTheme(colors: darkPalette) + + static var current: PresentationTheme = { + let isDarkTheme = UserDefaults.standard.bool(forKey: kVLCSettingAppTheme) + return isDarkTheme ? PresentationTheme.darkTheme : PresentationTheme.brightTheme + }() + { + didSet { + NotificationCenter.default.post(name: .VLCThemeDidChangeNotification, object: self) + AppearanceManager.setupAppearance(theme: self.current) + } + } + public init(colors: ColorPalette) { + self.colors = colors + } + + public let colors: ColorPalette +} + +@objc public extension UIColor { + + public convenience init(_ rgbValue:UInt32, _ alpha:CGFloat = 1.0) { + let r = CGFloat((rgbValue & 0xFF0000) >> 16)/255.0 + let g = CGFloat((rgbValue & 0xFF00) >> 8)/255.0 + let b = CGFloat(rgbValue & 0xFF)/255.0 + self.init(red: r, green: g, blue: b, alpha: 1.0) + } + + private func toHex(alpha: Bool = false) -> String? { + guard let components = cgColor.components, components.count >= 3 else { + assertionFailure() + return nil + } + let r = Float(components[0]) + let g = Float(components[1]) + let b = Float(components[2]) + var a = Float(1.0) + + if components.count == 4 { + a = Float(components[3]) + } + + if alpha { + return String(format: "#%02lX%02lX%02lX%02lX", lroundf(r * 255), lroundf(g * 255), lroundf(b * 255), lroundf(a * 255)) + } else { + return String(format: "#%02lX%02lX%02lX", lroundf(r * 255), lroundf(g * 255), lroundf(b * 255)) + } + } + + var toHex: String? { + return toHex() + } +} + +let brightPalette = ColorPalette(isDark: false, + name: "Default", + background: UIColor(0xf9f9f7), + cellBackgroundA: UIColor(0xf9f9f7), + cellBackgroundB: UIColor(0xe5e5e3), + cellDetailTextColor: UIColor(0xd3d3d3), + cellTextColor: UIColor(0x000000), + lightTextColor: UIColor(0x888888), + sectionHeaderTextColor: UIColor(0xf9f9f7), + sectionHeaderTintColor: UIColor(0xe5efe3), + settingsBackground: UIColor(0xdcdcdc), + settingsCellBackground: UIColor(0xf9f9f7), + settingsSeparatorColor: UIColor(0xd3d3d3), + tabBarColor: UIColor(0xffffff), + orangeUI: UIColor(0xff8800)) + +let darkPalette = ColorPalette(isDark: true, + name: "Dark", + background: UIColor(0x292b36), + cellBackgroundA: UIColor(0x292b36), + cellBackgroundB: UIColor(0x000000), + cellDetailTextColor: UIColor(0xd3d3d3), + cellTextColor: UIColor(0xffffff), + lightTextColor: UIColor(0xb8b8b8), + sectionHeaderTextColor: UIColor(0x828282), + sectionHeaderTintColor: UIColor(0x3c3c3c), + settingsBackground: UIColor(0x292b36), + settingsCellBackground: UIColor(0x3d3f40), + settingsSeparatorColor: UIColor(0xa9a9a9), + tabBarColor: UIColor(0xffffff), + orangeUI: UIColor(0xff8800)) diff --git a/SharedSources/ServerBrowsing/HTTP/VLCLocalNetworkServiceBrowserHTTP.m b/SharedSources/ServerBrowsing/HTTP/VLCLocalNetworkServiceBrowserHTTP.m index 6fe5c28c7..8ac77be61 100644 --- a/SharedSources/ServerBrowsing/HTTP/VLCLocalNetworkServiceBrowserHTTP.m +++ b/SharedSources/ServerBrowsing/HTTP/VLCLocalNetworkServiceBrowserHTTP.m @@ -24,9 +24,6 @@ serviceType:@"_http._tcp." domain:@""]; } -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - (VLCSharedLibraryParser *)httpParser { if (!_httpParser) { diff --git a/SharedSources/ServerBrowsing/VLCLocalServerDiscoveryController.m b/SharedSources/ServerBrowsing/VLCLocalServerDiscoveryController.m index 5762b61fc..f9662253d 100644 --- a/SharedSources/ServerBrowsing/VLCLocalServerDiscoveryController.m +++ b/SharedSources/ServerBrowsing/VLCLocalServerDiscoveryController.m @@ -69,8 +69,6 @@ - (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [_reachability stopNotifier]; [self stopDiscovery]; } diff --git a/SharedSources/VLCPlayerControlWebSocket.m b/SharedSources/VLCPlayerControlWebSocket.m index 9de0706e2..86e7b88c0 100644 --- a/SharedSources/VLCPlayerControlWebSocket.m +++ b/SharedSources/VLCPlayerControlWebSocket.m @@ -15,11 +15,6 @@ @implementation VLCPlayerControlWebSocket -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)didOpen { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; diff --git a/Sources/AppearanceManager.swift b/Sources/AppearanceManager.swift new file mode 100644 index 000000000..043bd1ff4 --- /dev/null +++ b/Sources/AppearanceManager.swift @@ -0,0 +1,55 @@ +/***************************************************************************** + * AppearanceManager.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ +import UIKit + +@objc(VLCApperanceManager) +class AppearanceManager:NSObject +{ + @objc class func setupAppearance(theme:PresentationTheme = PresentationTheme.current) + { + // Change the keyboard for UISearchBar + UITextField.appearance().keyboardAppearance = theme == PresentationTheme.darkTheme ? .dark : .light + // For the cursor + UITextField.appearance().tintColor = theme.colors.orangeUI + + // Don't override the 'Cancel' button color in the search bar with the previous UITextField call. Use the default blue color + let attributes = [NSAttributedStringKey.foregroundColor: UIColor.white] + UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).setTitleTextAttributes(attributes, for: .normal) + + UINavigationBar.appearance().barTintColor = theme.colors.orangeUI + UINavigationBar.appearance(whenContainedInInstancesOf: [VLCPlaybackNavigationController.self]).barTintColor = nil + UINavigationBar.appearance().tintColor = .white + UINavigationBar.appearance().titleTextAttributes = attributes + + if #available(iOS 11.0, *) { + UINavigationBar.appearance().prefersLargeTitles = true + UINavigationBar.appearance(whenContainedInInstancesOf:[VLCPlaybackNavigationController.self]).prefersLargeTitles = false + UINavigationBar.appearance().largeTitleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white] + } + // For the edit selection indicators + UITableView.appearance().tintColor = theme.colors.orangeUI + UISegmentedControl.appearance().tintColor = theme.colors.orangeUI + UISwitch.appearance().onTintColor = theme.colors.orangeUI + UISearchBar.appearance().barTintColor = .white + + UITabBar.appearance().tintColor = theme.colors.orangeUI + //customization of MoreViewController + //Since there is no clean way to customize the Morecontroller appearance we're getting the class + if let moreListControllerClass = NSClassFromString("UIMoreListController") as? UIAppearanceContainer.Type { + UITableViewCell.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).backgroundColor = theme.colors.cellBackgroundA + UITableViewCell.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).textLabel?.textColor = theme.colors.cellTextColor + UITableView.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).backgroundColor = theme.colors.background + UITableView.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).separatorColor = .lightGray + UILabel.appearance(whenContainedInInstancesOf: [moreListControllerClass.self]).textColor = theme.colors.cellTextColor + } + } +} diff --git a/Sources/LocalNetworkConnectivity/RemoteNetworkDataSource.swift b/Sources/LocalNetworkConnectivity/RemoteNetworkDataSource.swift new file mode 100644 index 000000000..b7b739aba --- /dev/null +++ b/Sources/LocalNetworkConnectivity/RemoteNetworkDataSource.swift @@ -0,0 +1,27 @@ +/***************************************************************************** + * RemoteNetworkDataSource.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # googlemail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ +import Foundation + +@objc(VLCRemoteNetworkDataSource) +public class RemoteNetworkDataSource:NSObject, UITableViewDataSource { + + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if let wifiCell = tableView.dequeueReusableCell(withIdentifier: VLCWiFiUploadTableViewCell.cellIdentifier()) { + return wifiCell + } + return UITableViewCell() + } +} diff --git a/Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m b/Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m index 27010c7f7..7e20de665 100644 --- a/Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m +++ b/Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m @@ -92,8 +92,7 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier"; } self.definesPresentationContext = YES; - self.navigationItem.rightBarButtonItems = @[[UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(menuButtonAction:)], - [UIBarButtonItem themedPlayAllButtonWithTarget:self andSelector:@selector(playAllAction:)]]; + self.navigationItem.rightBarButtonItems = @[[UIBarButtonItem themedPlayAllButtonWithTarget:self andSelector:@selector(playAllAction:)]]; _searchData = [[NSMutableArray alloc] init]; [_searchData removeAllObjects]; @@ -118,6 +117,8 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier"; - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; + if (self.isEditing) + [self setEditing:NO animated:YES]; } - (BOOL)shouldAutorotate @@ -128,14 +129,6 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier"; return YES; } -- (IBAction)menuButtonAction:(id)sender -{ - [[VLCSidebarController sharedInstance] toggleSidebar]; - - if (self.isEditing) - [self setEditing:NO animated:YES]; -} - - (IBAction)playAllAction:(id)sender { // to be implemented by subclass diff --git a/Sources/LocalNetworkConnectivity/VLCNetworkLoginViewController.m b/Sources/LocalNetworkConnectivity/VLCNetworkLoginViewController.m index 085303c75..6a665d2ad 100644 --- a/Sources/LocalNetworkConnectivity/VLCNetworkLoginViewController.m +++ b/Sources/LocalNetworkConnectivity/VLCNetworkLoginViewController.m @@ -87,11 +87,6 @@ // self.edgesForExtendedLayout = UIRectEdgeNone; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; diff --git a/Sources/LocalNetworkConnectivity/VLCServerListViewController.h b/Sources/LocalNetworkConnectivity/VLCServerListViewController.h index e5b872b8e..1dd69e907 100644 --- a/Sources/LocalNetworkConnectivity/VLCServerListViewController.h +++ b/Sources/LocalNetworkConnectivity/VLCServerListViewController.h @@ -15,6 +15,4 @@ @interface VLCServerListViewController : UIViewController -@property (nonatomic, strong) UITableView *tableView; - @end diff --git a/Sources/LocalNetworkConnectivity/VLCServerListViewController.m b/Sources/LocalNetworkConnectivity/VLCServerListViewController.m index 9d638a33c..ce8d8ca11 100644 --- a/Sources/LocalNetworkConnectivity/VLCServerListViewController.m +++ b/Sources/LocalNetworkConnectivity/VLCServerListViewController.m @@ -2,7 +2,7 @@ * VLCLocalServerListViewController.m * VLC for iOS ***************************************************************************** - * Copyright (c) 2013-2015 VideoLAN. All rights reserved. + * Copyright (c) 2013-2018 VideoLAN. All rights reserved. * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan.org> @@ -10,6 +10,7 @@ * Gleb Pinigin <gpinigin # gmail.com> * Tobias Conradi <videolan # tobias-conradi.de> * Vincent L. Cone <vincent.l.cone # tuta.io> + * Carola Nitz <caro # videolan.org> * * Refer to the COPYING file of the official project for license. *****************************************************************************/ @@ -37,45 +38,87 @@ #import "VLCLocalNetworkServiceBrowserDSM.h" #import "VLCLocalNetworkServiceBrowserBonjour.h" +#import "VLCWiFiUploadTableViewCell.h" + +#import "VLC_iOS-Swift.h" + @interface VLCServerListViewController () <UITableViewDataSource, UITableViewDelegate, VLCLocalServerDiscoveryControllerDelegate, VLCNetworkLoginViewControllerDelegate> { VLCLocalServerDiscoveryController *_discoveryController; - UIBarButtonItem *_backToMenuButton; - UIRefreshControl *_refreshControl; UIActivityIndicatorView *_activityIndicator; + UITableView *_localNetworkTableView; + UITableView *_remoteNetworkTableView; + VLCRemoteNetworkDataSource *_remoteNetworkDatasource; } @end @implementation VLCServerListViewController -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)loadView { - _tableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain]; - _tableView.backgroundColor = [UIColor VLCDarkBackgroundColor]; - _tableView.delegate = self; - _tableView.dataSource = self; - _tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite; - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - self.view = _tableView; + [super loadView]; + + _remoteNetworkDatasource = [VLCRemoteNetworkDataSource new]; + + _localNetworkTableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain]; + _localNetworkTableView.translatesAutoresizingMaskIntoConstraints = NO; + _localNetworkTableView.backgroundColor = PresentationTheme.current.colors.background; + _localNetworkTableView.delegate = self; + _localNetworkTableView.dataSource = self; + _localNetworkTableView.indicatorStyle = UIScrollViewIndicatorStyleWhite; + _localNetworkTableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _localNetworkTableView.bounces = NO; + _localNetworkTableView.rowHeight = [VLCNetworkListCell heightOfCell]; + _localNetworkTableView.separatorColor = PresentationTheme.current.colors.background; + + //TODO: this is very much work in progress we need to accomodate the wificell for now + //When we know how many cells go above the the local servers we should create and move this into a headerview of the localNetworkTable + _remoteNetworkTableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain]; + _remoteNetworkTableView.translatesAutoresizingMaskIntoConstraints = NO; + _remoteNetworkTableView.backgroundColor = PresentationTheme.current.colors.background; + _remoteNetworkTableView.delegate = self; + _remoteNetworkTableView.dataSource = _remoteNetworkDatasource; + _remoteNetworkTableView.indicatorStyle = UIScrollViewIndicatorStyleWhite; + _remoteNetworkTableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _remoteNetworkTableView.bounces = NO; + [_remoteNetworkTableView registerClass:[VLCWiFiUploadTableViewCell class] forCellReuseIdentifier:[VLCWiFiUploadTableViewCell cellIdentifier]]; + + _refreshControl = [[UIRefreshControl alloc] init]; + _refreshControl.backgroundColor = PresentationTheme.current.colors.background; + _refreshControl.tintColor = [UIColor whiteColor]; + [_refreshControl addTarget:self action:@selector(handleRefresh) forControlEvents:UIControlEventValueChanged]; + [_localNetworkTableView addSubview:_refreshControl]; + _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - _activityIndicator.center = _tableView.center; + _activityIndicator.center = _localNetworkTableView.center; _activityIndicator.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; _activityIndicator.hidesWhenStopped = YES; - [self.view addSubview:_activityIndicator]; + [_localNetworkTableView addSubview:_activityIndicator]; + + [self.view addSubview:_localNetworkTableView]; + [self.view addSubview:_remoteNetworkTableView]; + [NSLayoutConstraint activateConstraints:@[ + [_remoteNetworkTableView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor], + [_remoteNetworkTableView.rightAnchor constraintEqualToAnchor:self.view.rightAnchor], + [_remoteNetworkTableView.topAnchor constraintEqualToAnchor:self.topLayoutGuide.bottomAnchor], + [_remoteNetworkTableView.heightAnchor constraintEqualToConstant:50], + [_localNetworkTableView.topAnchor constraintEqualToAnchor:_remoteNetworkTableView.bottomAnchor], + [_localNetworkTableView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor], + [_localNetworkTableView.rightAnchor constraintEqualToAnchor:self.view.rightAnchor], + [_localNetworkTableView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor], + ]]; + self.view.backgroundColor = PresentationTheme.current.colors.background; } - (void)viewDidLoad { [super viewDidLoad]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(themeDidChange) name:kVLCThemeDidChangeNotification object:nil]; + NSArray *browserClasses = @[ [VLCLocalNetworkServiceBrowserManualConnect class], [VLCLocalNetworkServiceBrowserUPnP class], @@ -91,21 +134,6 @@ _discoveryController = [[VLCLocalServerDiscoveryController alloc] initWithServiceBrowserClasses:browserClasses]; _discoveryController.delegate = self; - - _backToMenuButton = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)]; - self.navigationItem.leftBarButtonItem = _backToMenuButton; - - self.tableView.rowHeight = [VLCNetworkListCell heightOfCell]; - self.tableView.separatorColor = [UIColor VLCDarkBackgroundColor]; - self.view.backgroundColor = [UIColor VLCDarkBackgroundColor]; - - self.title = NSLocalizedString(@"LOCAL_NETWORK", nil); - - _refreshControl = [[UIRefreshControl alloc] init]; - _refreshControl.backgroundColor = [UIColor VLCDarkBackgroundColor]; - _refreshControl.tintColor = [UIColor whiteColor]; - [_refreshControl addTarget:self action:@selector(handleRefresh) forControlEvents:UIControlEventValueChanged]; - [self.tableView addSubview:_refreshControl]; } - (void)viewWillDisappear:(BOOL)animated @@ -122,12 +150,6 @@ [_discoveryController startDiscovery]; } -- (IBAction)goBack:(id)sender -{ - [_discoveryController stopDiscovery]; - [[VLCSidebarController sharedInstance] toggleSidebar]; -} - - (BOOL)shouldAutorotate { UIInterfaceOrientation toInterfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; @@ -150,18 +172,20 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(VLCNetworkListCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - UIColor *color = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor]; + if (tableView == _remoteNetworkTableView) return; + UIColor *color = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundB : PresentationTheme.current.colors.cellBackgroundA; cell.backgroundColor = cell.titleLabel.backgroundColor = cell.folderTitleLabel.backgroundColor = cell.subtitleLabel.backgroundColor = color; + cell.titleLabel.textColor = cell.folderTitleLabel.textColor = cell.subtitleLabel.textColor = cell.thumbnailView.tintColor = PresentationTheme.current.colors.cellTextColor; } - (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section { // Text Color UITableViewHeaderFooterView *header = (UITableViewHeaderFooterView *)view; - [header.textLabel setTextColor:[UIColor colorWithRed:(130.0f/255.0f) green:(130.0f/255.0f) blue:(130.0f/255.0f) alpha:1.0f]]; + header.textLabel.textColor = PresentationTheme.current.colors.sectionHeaderTextColor; header.textLabel.font = [UIFont boldSystemFontOfSize:([UIFont systemFontSize] * 0.8f)]; - header.tintColor = [UIColor colorWithRed:(60.0f/255.0f) green:(60.0f/255.0f) blue:(60.0f/255.0f) alpha:1.0f]; + header.tintColor = PresentationTheme.current.colors.sectionHeaderTintColor; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath @@ -181,6 +205,11 @@ return cell; } +- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + return tableView == _remoteNetworkTableView ? nil : indexPath; +} + - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; @@ -230,6 +259,13 @@ [self.navigationController pushViewController:loginViewController animated:YES]; } } +#pragma mark - +- (void)themeDidChange +{ + _localNetworkTableView.backgroundColor = PresentationTheme.current.colors.background; + _localNetworkTableView.separatorColor = PresentationTheme.current.colors.background; + _refreshControl.backgroundColor = PresentationTheme.current.colors.background; +} - (void)_dismissLogin { @@ -254,7 +290,7 @@ //end the refreshing if ([_discoveryController refreshDiscoveredData]) - [self.tableView reloadData]; + [_localNetworkTableView reloadData]; [_refreshControl endRefreshing]; } @@ -286,7 +322,7 @@ - (void)discoveryFoundSomethingNew { - [self.tableView reloadData]; + [_localNetworkTableView reloadData]; } #pragma mark - custom table view appearance diff --git a/Sources/MediaViewController.swift b/Sources/MediaViewController.swift new file mode 100644 index 000000000..a1a89796f --- /dev/null +++ b/Sources/MediaViewController.swift @@ -0,0 +1,137 @@ +/***************************************************************************** + * MediaViewController.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ + +import Foundation + +@objc public protocol VLCMediaViewControllerDelegate: class { + func mediaViewControllerDidSelectMediaObject(_ mediaViewController: VLCMediaViewController, mediaObject:NSManagedObject) + func mediaViewControllerDidSelectSort(_ mediaViewController: VLCMediaViewController) +} + +public class VLCMediaViewController: UICollectionViewController, UISearchResultsUpdating, UISearchControllerDelegate +{ + private var services: Services + private var mediaDatasourceAndDelegate:MediaDataSourceAndDelegate? + private var searchController: UISearchController? + private let searchDataSource = VLCLibrarySearchDisplayDataSource() + public weak var delegate: VLCMediaViewControllerDelegate? + + @available(iOS 11.0, *) + lazy var dragAndDropManager:VLCDragAndDropManager = { + let dragAndDropManager = VLCDragAndDropManager() + dragAndDropManager.delegate = services.mediaDataSource + return dragAndDropManager + }() + + public convenience init(services:Services) { + self.init(collectionViewLayout: UICollectionViewFlowLayout()) + self.services = services + NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .VLCThemeDidChangeNotification, object: nil) + } + + public override init(collectionViewLayout layout: UICollectionViewLayout) { + self.services = Services() + super.init(collectionViewLayout: layout) + } + + @available(*, unavailable) + required public init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override public func viewDidLoad() { + super.viewDidLoad() + setupCollectionView() + setupSearchController() + setupNavigationBar() + _ = (MLMediaLibrary.sharedMediaLibrary() as! MLMediaLibrary).libraryDidAppear() + } + + @objc func themeDidChange() { + collectionView?.backgroundColor = PresentationTheme.current.colors.background + } + + func setupCollectionView(){ + mediaDatasourceAndDelegate = MediaDataSourceAndDelegate(services: services) + mediaDatasourceAndDelegate?.delegate = self + let playlistnib = UINib(nibName: "VLCPlaylistCollectionViewCell", bundle:nil) + collectionView?.register(playlistnib, forCellWithReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier()) + collectionView?.backgroundColor = PresentationTheme.current.colors.background + collectionView?.alwaysBounceVertical = true + collectionView?.dataSource = mediaDatasourceAndDelegate + collectionView?.delegate = mediaDatasourceAndDelegate + if #available(iOS 11.0, *) { + collectionView?.dragDelegate = dragAndDropManager + collectionView?.dropDelegate = dragAndDropManager + } + } + + override public func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + services.mediaDataSource.updateContents(forSelection: nil) + services.mediaDataSource.addAllFolders() + services.mediaDataSource.addRemainingFiles() + collectionView?.reloadData() + + } + func setupSearchController() { + searchController = UISearchController(searchResultsController: nil) + searchController?.searchResultsUpdater = self + searchController?.dimsBackgroundDuringPresentation = false + searchController?.delegate = self + if let textfield = searchController?.searchBar.value(forKey: "searchField") as? UITextField { + if let backgroundview = textfield.subviews.first { + backgroundview.backgroundColor = UIColor.white + backgroundview.layer.cornerRadius = 10; + backgroundview.clipsToBounds = true; + } + } + if #available(iOS 11.0, *) { + navigationItem.searchController = searchController + } else { + navigationItem.titleView = searchController?.searchBar + searchController?.hidesNavigationBarDuringPresentation = false + } + } + + func setupNavigationBar() { + navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Sort", comment: ""), style: .plain, target: self, action: #selector(sort)) + } + + @objc func sort() { + delegate?.mediaViewControllerDidSelectSort(self) + } + + override public func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { + collectionView?.collectionViewLayout.invalidateLayout() + } + + //MARK: - MediaDatasourceAndDelegate + override public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + delegate?.mediaViewControllerDidSelectMediaObject(self, mediaObject:services.mediaDataSource.object(at: UInt(indexPath.row))) + } + + //MARK: - Search + public func updateSearchResults(for searchController: UISearchController) { + searchDataSource.shouldReloadTable(forSearch: searchController.searchBar.text, searchableFiles: services.mediaDataSource.allObjects()) + collectionView?.reloadData() + } + + public func didPresentSearchController(_ searchController: UISearchController) { + collectionView?.dataSource = searchDataSource + } + + public func didDismissSearchController(_ searchController: UISearchController) { + collectionView?.dataSource = mediaDatasourceAndDelegate + } + +} diff --git a/Sources/UIBarButtonItem+Theme.h b/Sources/UIBarButtonItem+Theme.h index d9d7e2197..01baed707 100644 --- a/Sources/UIBarButtonItem+Theme.h +++ b/Sources/UIBarButtonItem+Theme.h @@ -11,7 +11,6 @@ *****************************************************************************/ @interface UIBarButtonItem (ThemedButtons) + (UIBarButtonItem *)themedBackButtonWithTarget:(id)target andSelector:(SEL)selector; -+ (UIBarButtonItem *)themedRevealMenuButtonWithTarget:(id)target andSelector:(SEL)selector; + (UIBarButtonItem *)themedDarkToolbarButtonWithTitle: (NSString*) title target:(id)target andSelector:(SEL)selector; + (UIBarButtonItem *)themedPlayAllButtonWithTarget:(id)target andSelector:(SEL)selector; @end diff --git a/Sources/UIBarButtonItem+Theme.m b/Sources/UIBarButtonItem+Theme.m index d352fbe20..8829fc1ed 100644 --- a/Sources/UIBarButtonItem+Theme.m +++ b/Sources/UIBarButtonItem+Theme.m @@ -26,28 +26,6 @@ return backButton; } -+ (UIBarButtonItem *)themedRevealMenuButtonWithTarget:(id)target andSelector:(SEL)selector -{ - /* After day 354 of the year, the usual VLC cone is replaced by another cone - * wearing a Father Xmas hat. - * Note: this icon doesn't represent an endorsement of The Coca-Cola Company - * and should not be confused with the idea of religious statements or propagation there off - */ - NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - NSUInteger dayOfYear = [gregorian ordinalityOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitYear forDate:[NSDate date]]; - UIImage *icon; - if (dayOfYear >= 354) - icon = [UIImage imageNamed:@"vlc-xmas"]; - else - icon = [UIImage imageNamed:@"menuCone"]; - - UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:target action:selector]; - menuButton.tintColor = [UIColor whiteColor]; - menuButton.accessibilityLabel = NSLocalizedString(@"OPEN_VLC_MENU", nil); - - return menuButton; -} - + (UIBarButtonItem *)themedDarkToolbarButtonWithTitle:(NSString*)title target:(id)target andSelector:(SEL)selector { UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStylePlain target:target action:selector]; diff --git a/Sources/VLCAboutViewController.m b/Sources/VLCAboutViewController.m index 45f131697..c589ef9a9 100644 --- a/Sources/VLCAboutViewController.m +++ b/Sources/VLCAboutViewController.m @@ -13,6 +13,7 @@ *****************************************************************************/ #import "VLCAboutViewController.h" +#import "VLC_iOS-Swift.h" @interface VLCAboutViewController () { @@ -26,7 +27,7 @@ - (void)loadView { self.view = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; - self.view.backgroundColor = [UIColor VLCDarkBackgroundColor]; + self.view.backgroundColor = PresentationTheme.current.colors.background; self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; _webView = [[UIWebView alloc] initWithFrame:self.view.frame]; @@ -37,6 +38,8 @@ _webView.scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite; _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.view addSubview:_webView]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(themeDidChange) name:kVLCThemeDidChangeNotification object:nil]; } - (void)viewDidLoad @@ -49,14 +52,31 @@ contributeButton.tintColor = [UIColor whiteColor]; self.navigationItem.rightBarButtonItem = contributeButton; - self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)]; + [self loadWebContent]; +} +- (void)loadWebContent +{ NSBundle *mainBundle = [NSBundle mainBundle]; - NSMutableString *htmlContent = [NSMutableString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil]; - [htmlContent replaceOccurrencesOfString:@"VLCFORIOSVERSION" withString:[[NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT", nil), [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]] stringByAppendingFormat:@" (%@)<br /><i>%@</i>", [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"], kVLCVersionCodename] options:NSLiteralSearch range:NSMakeRange(800, 1000)]; - [htmlContent replaceOccurrencesOfString:@"MOBILEVLCKITVERSION" withString:[NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT", nil),[[VLCLibrary sharedLibrary] version]] options:NSLiteralSearch range:NSMakeRange(800, 1100)]; - [_webView loadHTMLString:[NSString stringWithString:htmlContent] baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]]; - htmlContent = nil; + NSString *textColor = PresentationTheme.current.colors.cellTextColor.toHex; + NSString *backgroundColor = PresentationTheme.current.colors.background.toHex; + NSString *version = [NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT", nil), [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]]; + NSString *versionBuildNumberAndCodeName = [version stringByAppendingFormat:@" (%@)<br /><i>%@</i>", [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"], kVLCVersionCodename]; + NSString *vlcLibraryVersion = [NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT", nil),[[VLCLibrary sharedLibrary] version]]; + NSString *htmlFilePath = [mainBundle pathForResource:@"About Contents" ofType:@"html"]; + NSMutableString *htmlContent = [NSMutableString stringWithContentsOfFile:htmlFilePath encoding:NSUTF8StringEncoding error:nil]; + [htmlContent replaceOccurrencesOfString:@"VLCFORIOSVERSION" withString:versionBuildNumberAndCodeName options:NSLiteralSearch range:NSMakeRange(0, [htmlContent length])]; + [htmlContent replaceOccurrencesOfString:@"TEXTCOLOR" withString:textColor options:NSLiteralSearch range:NSMakeRange(0, [htmlContent length])]; + [htmlContent replaceOccurrencesOfString:@"BACKGROUNDCOLOR" withString:backgroundColor options:NSLiteralSearch range:NSMakeRange(0, [htmlContent length])]; + [htmlContent replaceOccurrencesOfString:@"MOBILEVLCKITVERSION" withString:vlcLibraryVersion options:NSLiteralSearch range:NSMakeRange(0, [htmlContent length])]; + [_webView loadHTMLString:htmlContent baseURL:[NSURL fileURLWithPath:[mainBundle bundlePath]]]; +} + +- (void)themeDidChange +{ + self.view.backgroundColor = PresentationTheme.current.colors.background; + _webView.backgroundColor = PresentationTheme.current.colors.background; + [self loadWebContent]; } - (BOOL)shouldAutorotate @@ -67,11 +87,6 @@ return YES; } -- (IBAction)goBack:(id)sender -{ - [[VLCSidebarController sharedInstance] toggleSidebar]; -} - - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSURL *requestURL = request.URL; @@ -83,7 +98,7 @@ - (void)webViewDidFinishLoad:(UIWebView *)webView { - _webView.backgroundColor = [UIColor VLCDarkBackgroundColor]; + _webView.backgroundColor = PresentationTheme.current.colors.background; _webView.opaque = YES; } diff --git a/Sources/VLCAlertView.m b/Sources/VLCAlertView.m index a333d0df5..a4867fb72 100644 --- a/Sources/VLCAlertView.m +++ b/Sources/VLCAlertView.m @@ -18,11 +18,6 @@ @implementation VLCAlertView -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (id)initWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitles:(NSArray *)otherButtonTitles { self = [self initWithTitle:title message:message delegate:self cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil]; diff --git a/Sources/VLCAppDelegate.h b/Sources/VLCAppDelegate.h index 1a9a79ea0..2e689512a 100644 --- a/Sources/VLCAppDelegate.h +++ b/Sources/VLCAppDelegate.h @@ -15,18 +15,13 @@ *****************************************************************************/ #import "VLCMenuTableViewController.h" -#import "VLCDownloadViewController.h" #import "VLCWatchCommunication.h" #import <AppAuth/AppAuth.h> -@class VLCLibraryViewController; - extern NSString *const VLCDropboxSessionWasAuthorized; @interface VLCAppDelegate : UIResponder <UIApplicationDelegate> -@property (nonatomic, readonly) VLCLibraryViewController *libraryViewController; - @property (nonatomic, readonly) VLCWatchCommunication *watchCommunication; @property (nonatomic, strong) UIWindow *window; diff --git a/Sources/VLCAppDelegate.m b/Sources/VLCAppDelegate.m index ccac936ae..ca138c218 100644 --- a/Sources/VLCAppDelegate.m +++ b/Sources/VLCAppDelegate.m @@ -21,18 +21,16 @@ #import "VLCMediaFileDiscoverer.h" #import "NSString+SupportedMedia.h" #import "UIDevice+VLC.h" -#import "VLCLibraryViewController.h" #import "VLCHTTPUploaderController.h" #import "VLCMigrationViewController.h" #import <BoxSDK/BoxSDK.h> #import "VLCPlaybackController.h" #import "VLCPlaybackController+MediaLibrary.h" -#import "VLCPlayerDisplayController.h" #import <MediaPlayer/MediaPlayer.h> #import <HockeySDK/HockeySDK.h> -#import "VLCSidebarController.h" #import "VLCActivityManager.h" #import "VLCDropboxConstants.h" +#import "VLCDownloadViewController.h" #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h> #import "VLCPlaybackNavigationController.h" #import "PAPasscodeViewController.h" @@ -48,6 +46,8 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize BOOL _isComingFromHandoff; VLCWatchCommunication *_watchCommunication; VLCKeychainCoordinator *_keychainCoordinator; + AppCoordinator *appCoordinator; + UITabBarController *rootViewController; } @end @@ -101,30 +101,21 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize // Configure Dropbox [DBClientsManager setupWithAppKey:kVLCDropboxAppKey]; - [self setupAppearence]; + [VLCApperanceManager setupAppearanceWithTheme:PresentationTheme.current]; // Init the HTTP Server and clean its cache [[VLCHTTPUploaderController sharedInstance] cleanCache]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + rootViewController = [UITabBarController new]; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; // enable crash preventer void (^setupBlock)() = ^{ - __weak typeof(self) weakSelf = self; void (^setupLibraryBlock)() = ^{ - _libraryViewController = [[VLCLibraryViewController alloc] init]; - UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:_libraryViewController]; - - VLCSidebarController *sidebarVC = [VLCSidebarController sharedInstance]; - sidebarVC.contentViewController = navCon; - - VLCPlayerDisplayController *playerDisplayController = [VLCPlayerDisplayController sharedInstance]; - playerDisplayController.childViewController = sidebarVC.fullViewController; - - weakSelf.window.rootViewController = playerDisplayController; + appCoordinator = [[AppCoordinator alloc] initWithTabBarController:rootViewController]; + [appCoordinator start]; }; - UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:[[UIViewController alloc] init]]; - self.window.rootViewController = navCon; - [self.window makeKeyAndVisible]; [self validatePasscodeIfNeededWithCompletion:setupLibraryBlock]; BOOL spotlightEnabled = ![VLCKeychainCoordinator passcodeLockEnabled]; @@ -202,32 +193,6 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize return YES; } -- (void)setupAppearence -{ - UIColor *vlcOrange = [UIColor VLCOrangeTintColor]; - // Change the keyboard for UISearchBar - [[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark]; - // For the cursor - [[UITextField appearance] setTintColor:vlcOrange]; - // Don't override the 'Cancel' button color in the search bar with the previous UITextField call. Use the default blue color - [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitleTextAttributes:@{[UIColor whiteColor] : NSForegroundColorAttributeName} forState:UIControlStateNormal]; - - [[UINavigationBar appearance] setBarTintColor:vlcOrange]; - [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[VLCPlaybackNavigationController class]]] setBarTintColor: nil]; - [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; - [[UINavigationBar appearance] setTitleTextAttributes: @{ NSForegroundColorAttributeName : [UIColor whiteColor] }]; - // For the edit selection indicators - [[UITableView appearance] setTintColor:vlcOrange]; - [[UISwitch appearance] setOnTintColor:vlcOrange]; - [[UISearchBar appearance] setBarTintColor:vlcOrange]; - [[UISearchBar appearance] setTintColor:[UIColor whiteColor]]; -} - -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - #pragma mark - Handoff - (BOOL)application:(UIApplication *)application willContinueUserActivityWithType:(NSString *)userActivityType @@ -248,16 +213,7 @@ continueUserActivity:(NSUserActivity *)userActivity NSDictionary *dict = userActivity.userInfo; if([userActivityType isEqualToString:kVLCUserActivityLibraryMode] || [userActivityType isEqualToString:kVLCUserActivityLibrarySelection]) { - - VLCLibraryMode libraryMode = (VLCLibraryMode)[(NSNumber *)dict[@"state"] integerValue]; - - if (libraryMode <= VLCLibraryModeAllSeries) { - [[VLCSidebarController sharedInstance] selectRowAtIndexPath:[NSIndexPath indexPathForRow:libraryMode inSection:0] - scrollPosition:UITableViewScrollPositionTop]; - [self.libraryViewController setLibraryMode:libraryMode]; - } - - [self.libraryViewController restoreUserActivityState:userActivity]; + //TODO: Add restoreUserActivityState to the mediaviewcontroller _isComingFromHandoff = YES; return YES; } else { @@ -308,96 +264,112 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType return YES; } - if (_libraryViewController && url != nil) { - APLog(@"requested %@ to be opened", url); - - if (url.isFileURL) { - NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *directoryPath = searchPaths.firstObject; - NSURL *destinationURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%@", directoryPath, url.lastPathComponent]]; - NSError *theError; - NSFileManager *manager = [NSFileManager defaultManager]; - [[NSFileManager defaultManager] moveItemAtURL:url toURL:destinationURL error:&theError]; - if (theError.code != noErr) - APLog(@"saving the file failed (%li): %@", (long)theError.code, theError.localizedDescription); - - [[VLCMediaFileDiscoverer sharedInstance] updateMediaList]; - - NSURLRelationship relationship; - [manager getRelationship:&relationship ofDirectoryAtURL:[NSURL fileURLWithPath:directoryPath] toItemAtURL:url error:&theError]; - if (relationship == NSURLRelationshipContains) { - [self playWithURL:url successCallback:nil errorCallback:nil]; - } - } else if ([url.scheme isEqualToString:@"vlc-x-callback"] || [url.host isEqualToString:@"x-callback-url"]) { - // URL confirmes to the x-callback-url specification - // vlc-x-callback://x-callback-url/action?param=value&x-success=callback - APLog(@"x-callback-url with host '%@' path '%@' parameters '%@'", url.host, url.path, url.query); - NSString *action = [url.path stringByReplacingOccurrencesOfString:@"/" withString:@""]; - NSURL *movieURL; - NSURL *successCallback; - NSURL *errorCallback; - NSString *fileName; - for (NSString *entry in [url.query componentsSeparatedByString:@"&"]) { - NSArray *keyvalue = [entry componentsSeparatedByString:@"="]; - if (keyvalue.count < 2) continue; - NSString *key = keyvalue[0]; - NSString *value = [keyvalue[1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - - if ([key isEqualToString:@"url"]) - movieURL = [NSURL URLWithString:value]; - else if ([key isEqualToString:@"filename"]) - fileName = value; - else if ([key isEqualToString:@"x-success"]) - successCallback = [NSURL URLWithString:value]; - else if ([key isEqualToString:@"x-error"]) - errorCallback = [NSURL URLWithString:value]; - } - if ([action isEqualToString:@"stream"] && movieURL) { - [self playWithURL:movieURL successCallback:successCallback errorCallback:errorCallback]; - } - else if ([action isEqualToString:@"download"] && movieURL) { - [self downloadMovieFromURL:movieURL fileNameOfMedia:fileName]; - } - } else { - NSString *receivedUrl = [url absoluteString]; - if ([receivedUrl length] > 6) { - NSString *verifyVlcUrl = [receivedUrl substringToIndex:6]; - if ([verifyVlcUrl isEqualToString:@"vlc://"]) { - NSString *parsedString = [receivedUrl substringFromIndex:6]; - NSUInteger location = [parsedString rangeOfString:@"//"].location; - - /* Safari & al mangle vlc://http:// so fix this */ - if (location != NSNotFound && [parsedString characterAtIndex:location - 1] != 0x3a) { // : - parsedString = [NSString stringWithFormat:@"%@://%@", [parsedString substringToIndex:location], [parsedString substringFromIndex:location+2]]; - } else { - parsedString = [receivedUrl substringFromIndex:6]; - if (![parsedString hasPrefix:@"http://"] && ![parsedString hasPrefix:@"https://"] && ![parsedString hasPrefix:@"ftp://"]) { - parsedString = [@"http://" stringByAppendingString:[receivedUrl substringFromIndex:6]]; - } - } - url = [NSURL URLWithString:parsedString]; - } - } - [[VLCSidebarController sharedInstance] selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] - scrollPosition:UITableViewScrollPositionNone]; - - NSString *scheme = url.scheme; - if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"]) { - VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:NSLocalizedString(@"OPEN_STREAM_OR_DOWNLOAD", nil) message:url.absoluteString cancelButtonTitle:NSLocalizedString(@"BUTTON_DOWNLOAD", nil) otherButtonTitles:@[NSLocalizedString(@"PLAY_BUTTON", nil)]]; - alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) { - if (cancelled) - [self downloadMovieFromURL:url fileNameOfMedia:nil]; - else { - [self playWithURL:url successCallback:nil errorCallback:nil]; - } - }; - [alert show]; - } else { - [self playWithURL:url successCallback:nil errorCallback:nil]; - } - } - return YES; - } + //TODO: we need a model of URLHandlers that registers with the VLCAppdelegate + // then we can go through the list of handlers ask if they can handle the url and the first to say yes handles the call. + // that way internal if elses get encapsulated + /* + protocol VLCURLHandler { + func canHandleOpen(url: URL, options:[UIApplicationOpenURLOptionsKey:AnyObject]=[:]()) -> bool + func performOpen(url: URL, options:[UIApplicationOpenURLOptionsKey:AnyObject]=[:]()) -> bool + } */ +// if (_libraryViewController && url != nil) { +// APLog(@"%@ requested %@ to be opened", sourceApplication, url); +// +// if (url.isFileURL) { +// NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); +// NSString *directoryPath = searchPaths[0]; +// NSURL *destinationURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%@", directoryPath, url.lastPathComponent]]; +// NSError *theError; +// [[NSFileManager defaultManager] moveItemAtURL:url toURL:destinationURL error:&theError]; +// if (theError.code != noErr) +// APLog(@"saving the file failed (%li): %@", (long)theError.code, theError.localizedDescription); +// +// [[VLCMediaFileDiscoverer sharedInstance] updateMediaList]; +// } else if ([url.scheme isEqualToString:@"vlc-x-callback"] || [url.host isEqualToString:@"x-callback-url"]) { +// // URL confirmes to the x-callback-url specification +// // vlc-x-callback://x-callback-url/action?param=value&x-success=callback +// APLog(@"x-callback-url with host '%@' path '%@' parameters '%@'", url.host, url.path, url.query); +// NSString *action = [url.path stringByReplacingOccurrencesOfString:@"/" withString:@""]; +// NSURL *movieURL; +// NSURL *successCallback; +// NSURL *errorCallback; +// NSString *fileName; +// for (NSString *entry in [url.query componentsSeparatedByString:@"&"]) { +// NSArray *keyvalue = [entry componentsSeparatedByString:@"="]; +// if (keyvalue.count < 2) continue; +// NSString *key = keyvalue[0]; +// NSString *value = [keyvalue[1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; +// +// if ([key isEqualToString:@"url"]) +// movieURL = [NSURL URLWithString:value]; +// else if ([key isEqualToString:@"filename"]) +// fileName = value; +// else if ([key isEqualToString:@"x-success"]) +// successCallback = [NSURL URLWithString:value]; +// else if ([key isEqualToString:@"x-error"]) +// errorCallback = [NSURL URLWithString:value]; +// } +// if ([action isEqualToString:@"stream"] && movieURL) { +// VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance]; +// vpc.fullscreenSessionRequested = YES; +// +// VLCMediaList *medialist = [[VLCMediaList alloc] init]; +// [medialist addMedia:[VLCMedia mediaWithURL:movieURL]]; +// vpc.successCallback = successCallback; +// vpc.errorCallback = errorCallback; +// [vpc playMediaList:medialist firstIndex:0 subtitlesFilePath:nil]; +// +// } +// else if ([action isEqualToString:@"download"] && movieURL) { +// [self downloadMovieFromURL:movieURL fileNameOfMedia:fileName]; +// } +// } else { +// NSString *receivedUrl = [url absoluteString]; +// if ([receivedUrl length] > 6) { +// NSString *verifyVlcUrl = [receivedUrl substringToIndex:6]; +// if ([verifyVlcUrl isEqualToString:@"vlc://"]) { +// NSString *parsedString = [receivedUrl substringFromIndex:6]; +// NSUInteger location = [parsedString rangeOfString:@"//"].location; +// +// /* Safari & al mangle vlc://http:// so fix this */ +// if (location != NSNotFound && [parsedString characterAtIndex:location - 1] != 0x3a) { // : +// parsedString = [NSString stringWithFormat:@"%@://%@", [parsedString substringToIndex:location], [parsedString substringFromIndex:location+2]]; +// } else { +// parsedString = [receivedUrl substringFromIndex:6]; +// if (![parsedString hasPrefix:@"http://"] && ![parsedString hasPrefix:@"https://"] && ![parsedString hasPrefix:@"ftp://"]) { +// parsedString = [@"http://" stringByAppendingString:[receivedUrl substringFromIndex:6]]; +// } +// } +// url = [NSURL URLWithString:parsedString]; +// } +// } +// [[VLCSidebarController sharedInstance] selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] +// scrollPosition:UITableViewScrollPositionNone]; +// +// NSString *scheme = url.scheme; +// if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"]) { +// VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:NSLocalizedString(@"OPEN_STREAM_OR_DOWNLOAD", nil) message:url.absoluteString cancelButtonTitle:NSLocalizedString(@"BUTTON_DOWNLOAD", nil) otherButtonTitles:@[NSLocalizedString(@"PLAY_BUTTON", nil)]]; +// alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) { +// if (cancelled) +// [self downloadMovieFromURL:url fileNameOfMedia:nil]; +// else { +// VLCMedia *media = [VLCMedia mediaWithURL:url]; +// VLCMediaList *medialist = [[VLCMediaList alloc] init]; +// [medialist addMedia:media]; +// [[VLCPlaybackController sharedInstance] playMediaList:medialist firstIndex:0 subtitlesFilePath:nil]; +// } +// }; +// [alert show]; +// } else { +// VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance]; +// vpc.fullscreenSessionRequested = YES; +// VLCMediaList *medialist = [[VLCMediaList alloc] init]; +// [medialist addMedia:[VLCMedia mediaWithURL:url]]; +// [vpc playMediaList:medialist firstIndex:0 subtitlesFilePath:nil]; +// } +// } +// return YES; +// } return NO; } @@ -415,11 +387,10 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType return; } } - __weak typeof(self) weakself = self; [self validatePasscodeIfNeededWithCompletion:^{ - [weakself.libraryViewController updateViewContents]; + //TODO: handle updating the videoview and if ([VLCPlaybackController sharedInstance].isPlaying){ - [[VLCPlayerDisplayController sharedInstance] pushPlaybackView]; + //TODO: push playback } }]; [[MLMediaLibrary sharedMediaLibrary] applicationWillExit]; @@ -429,7 +400,8 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType { if (!_isRunningMigration && !_isComingFromHandoff) { [[MLMediaLibrary sharedMediaLibrary] updateMediaDatabase]; - [[VLCMediaFileDiscoverer sharedInstance] updateMediaList]; + // [[VLCMediaFileDiscoverer sharedInstance] updateMediaList]; + [[VLCPlaybackController sharedInstance] recoverDisplayedMetadata]; } else if(_isComingFromHandoff) { _isComingFromHandoff = NO; } @@ -454,20 +426,20 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType // TODO Should we update media db after adding new files? [sharedLibrary updateMediaDatabase]; - [_libraryViewController updateViewContents]; + // TODO: update the VideoViewController } } - (void)mediaFileDeleted:(NSString *)name { [[MLMediaLibrary sharedMediaLibrary] updateMediaDatabase]; - [_libraryViewController updateViewContents]; + // TODO: update the VideoViewController } - (void)mediaFilesFoundRequiringAdditionToStorageBackend:(NSArray<NSString *> *)foundFiles { [[MLMediaLibrary sharedMediaLibrary] addFilePaths:foundFiles]; - [[(VLCAppDelegate *)[UIApplication sharedApplication].delegate libraryViewController] updateViewContents]; + // TODO: update the VideoViewController } #pragma mark - pass code validation @@ -482,7 +454,7 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType - (void)validatePasscodeIfNeededWithCompletion:(void(^)(void))completion { if ([VLCKeychainCoordinator passcodeLockEnabled]) { - [[VLCPlayerDisplayController sharedInstance] dismissPlaybackView]; + //TODO: Dimiss playback [self.keychainCoordinator validatePasscodeWithCompletion:completion]; } else { completion(); diff --git a/Sources/VLCBoxController.m b/Sources/VLCBoxController.m index c06e95eb5..e633c0757 100644 --- a/Sources/VLCBoxController.m +++ b/Sources/VLCBoxController.m @@ -53,11 +53,6 @@ return sharedInstance; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)startSession { NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter]; diff --git a/Sources/VLCBoxTableViewController.m b/Sources/VLCBoxTableViewController.m index 48a146569..c0aa2d21e 100644 --- a/Sources/VLCBoxTableViewController.m +++ b/Sources/VLCBoxTableViewController.m @@ -41,11 +41,6 @@ return self; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; diff --git a/Sources/VLCCloudServicesTableViewController.m b/Sources/VLCCloudServicesTableViewController.m index e8680c8ae..99d664cd4 100644 --- a/Sources/VLCCloudServicesTableViewController.m +++ b/Sources/VLCCloudServicesTableViewController.m @@ -22,6 +22,7 @@ #import "VLCCloudServiceCell.h" #import "VLCGoogleDriveController.h" +#import "VLC_iOS-Swift.h" @interface VLCCloudServicesTableViewController () @@ -38,12 +39,9 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.title = NSLocalizedString(@"CLOUD_SERVICES", ""); - [self.tableView registerNib:[UINib nibWithNibName:@"VLCCloudServiceCell" bundle:nil] forCellReuseIdentifier:@"CloudServiceCell"]; - self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack)]; - self.tableView.separatorColor = [UIColor VLCDarkBackgroundColor]; - self.tableView.backgroundColor = [UIColor VLCDarkBackgroundColor]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(themeDidChange) name:kVLCThemeDidChangeNotification object:nil]; + [self themeDidChange]; self.dropboxTableViewController = [[VLCDropboxTableViewController alloc] initWithNibName:@"VLCCloudStorageTableViewController" bundle:nil]; self.googleDriveTableViewController = [[VLCGoogleDriveTableViewController alloc] initWithNibName:@"VLCCloudStorageTableViewController" bundle:nil]; @@ -53,6 +51,12 @@ self.documentPickerController = [VLCDocumentPickerController new]; } +- (void)themeDidChange +{ + self.tableView.separatorColor = PresentationTheme.current.colors.background; + self.tableView.backgroundColor = PresentationTheme.current.colors.background; +} + - (void)viewWillAppear:(BOOL)animated { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(authenticationSessionsChanged:) name:VLCOneDriveControllerSessionUpdated object:nil]; @@ -60,12 +64,6 @@ [super viewWillAppear:animated]; } -- (void)goBack -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [[VLCSidebarController sharedInstance] toggleSidebar]; -} - - (void)authenticationSessionsChanged:(NSNotification *)notification { [self.tableView reloadData]; @@ -80,24 +78,17 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor]; - - if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { - [cell setSeparatorInset:UIEdgeInsetsZero]; - } - - if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) { - [cell setPreservesSuperviewLayoutMargins:NO]; - } - - if ([cell respondsToSelector:@selector(setLayoutMargins:)]) { - [cell setLayoutMargins:UIEdgeInsetsZero]; - } + cell.backgroundColor = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundA: PresentationTheme.current.colors.cellBackgroundB; + [cell setSeparatorInset:UIEdgeInsetsZero]; + [cell setPreservesSuperviewLayoutMargins:NO]; + [cell setLayoutMargins:UIEdgeInsetsZero]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { VLCCloudServiceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CloudServiceCell" forIndexPath:indexPath]; + cell.cloudTitle.textColor = cell.cloudInformation.textColor = cell.lonesomeCloudTitle.textColor = PresentationTheme.current.colors.cellTextColor; + cell.icon.tintColor = PresentationTheme.current.colors.cellTextColor; switch (indexPath.row) { case 0: { //Dropbox diff --git a/Sources/VLCCloudStorageTableViewController.m b/Sources/VLCCloudStorageTableViewController.m index 6d0980737..7f7c68737 100644 --- a/Sources/VLCCloudStorageTableViewController.m +++ b/Sources/VLCCloudStorageTableViewController.m @@ -15,12 +15,12 @@ #import "VLCCloudStorageTableViewController.h" #import "VLCCloudStorageTableViewCell.h" #import "VLCProgressView.h" +#import "VLC_iOS-Swift.h" @interface VLCCloudStorageTableViewController() { VLCProgressView *_progressView; UIRefreshControl *_refreshControl; - UIBarButtonItem *_progressBarButtonItem; UIBarButtonItem *_logoutButton; } @@ -37,7 +37,7 @@ self.modalPresentationStyle = UIModalPresentationFormSheet; - UIBarButtonItem *backButton = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(goBack)]; + UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_BACK", nil) style:UIBarButtonItemStylePlain target:self action:@selector(goBack)]; self.navigationItem.leftBarButtonItem = backButton; _logoutButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_LOGOUT", "") style:UIBarButtonItemStylePlain target:self action:@selector(logout)]; @@ -46,12 +46,9 @@ [self.navigationController.toolbar setBackgroundImage:[UIImage imageNamed:@"sudHeaderBg"] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; - self.tableView.separatorColor = [UIColor VLCDarkBackgroundColor]; - self.tableView.backgroundColor = [UIColor VLCDarkBackgroundColor]; - self.view.backgroundColor = [UIColor VLCDarkBackgroundColor]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateForTheme) name:kVLCThemeDidChangeNotification object:nil]; _refreshControl = [[UIRefreshControl alloc] init]; - _refreshControl.backgroundColor = [UIColor VLCDarkBackgroundColor]; _refreshControl.tintColor = [UIColor whiteColor]; [_refreshControl addTarget:self action:@selector(handleRefresh) forControlEvents:UIControlEventValueChanged]; [self.tableView addSubview:_refreshControl]; @@ -62,6 +59,7 @@ _numberOfFilesBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"NUM_OF_FILES", nil), 0] style:UIBarButtonItemStylePlain target:nil action:nil]; [_numberOfFilesBarButtonItem setTitleTextAttributes:@{ NSFontAttributeName : [UIFont systemFontOfSize:11.] } forState:UIControlStateNormal]; + _numberOfFilesBarButtonItem.tintColor = PresentationTheme.current.colors.orangeUI; _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; _activityIndicator.hidesWhenStopped = YES; @@ -74,8 +72,20 @@ _progressView = [VLCProgressView new]; _progressBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:_progressView]; + _progressView.tintColor = PresentationTheme.current.colors.orangeUI; [self _showProgressInToolbar:NO]; + [self updateForTheme]; +} + +- (void)updateForTheme +{ + self.tableView.separatorColor = PresentationTheme.current.colors.background; + self.tableView.backgroundColor = PresentationTheme.current.colors.background; + self.view.backgroundColor = PresentationTheme.current.colors.background; + _refreshControl.backgroundColor = PresentationTheme.current.colors.background; + _activityIndicator.activityIndicatorViewStyle = PresentationTheme.current == PresentationTheme.brightTheme ? UIActivityIndicatorViewStyleGray : UIActivityIndicatorViewStyleWhiteLarge; + self.loginToCloudStorageView.backgroundColor = PresentationTheme.current.colors.background; } - (void)viewWillAppear:(BOOL)animated @@ -166,9 +176,13 @@ #pragma mark - UITableViewDelegate -- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath +- (void)tableView:(UITableView *)tableView willDisplayCell:(__kindof UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor]; + VLCCloudStorageTableViewCell *cloudcell = [cell isKindOfClass:VLCCloudStorageTableViewCell.class] ? (id)cell : nil; + cloudcell.backgroundColor = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundB : PresentationTheme.current.colors.cellBackgroundA; + cloudcell.titleLabel.textColor = PresentationTheme.current.colors.cellTextColor; + cloudcell.folderTitleLabel.textColor = PresentationTheme.current.colors.cellTextColor; + cloudcell.subtitleLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor; } - (void)goBack diff --git a/Sources/VLCConstants.h b/Sources/VLCConstants.h index 5c71a9dba..3d1c66242 100644 --- a/Sources/VLCConstants.h +++ b/Sources/VLCConstants.h @@ -16,6 +16,8 @@ #define kVLCSettingPasscodeOnKey @"PasscodeProtection" #define kVLCSettingPasscodeAllowTouchID @"AllowTouchID" #define kVLCSettingPasscodeAllowFaceID @"AllowFaceID" +#define kVLCThemeDidChangeNotification @"themeDidChangeNotfication" +#define kVLCSettingAppTheme @"darkMode" #define kVLCAutomaticallyPlayNextItem @"AutomaticallyPlayNextItem" #define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback" #define kVLCSettingStretchAudio @"audio-time-stretch" diff --git a/Sources/VLCDownloadViewController.m b/Sources/VLCDownloadViewController.m index 6a2dacbd6..ff212a91b 100644 --- a/Sources/VLCDownloadViewController.m +++ b/Sources/VLCDownloadViewController.m @@ -18,6 +18,7 @@ #import "WhiteRaccoon.h" #import "NSString+SupportedMedia.h" #import "VLCHTTPFileDownloader.h" +#import "VLC_iOS-Swift.h" typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { VLCDownloadSchemeNone, @@ -63,6 +64,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { if (self){ _currentDownloads = [[NSMutableArray alloc] init]; _currentDownloadFilename = [[NSMutableArray alloc] init]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateForTheme) name:kVLCThemeDidChangeNotification object:nil]; } return self; } @@ -71,20 +73,16 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { { [super viewDidLoad]; - NSAttributedString *coloredAttributedPlaceholder = [[NSAttributedString alloc] initWithString:@"http://myserver.com/file.mkv" attributes:@{NSForegroundColorAttributeName: [UIColor VLCLightTextColor]}]; - self.urlField.attributedPlaceholder = coloredAttributedPlaceholder; - [self.downloadButton setTitle:NSLocalizedString(@"BUTTON_DOWNLOAD", nil) forState:UIControlStateNormal]; - self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)]; - self.title = NSLocalizedString(@"DOWNLOAD_FROM_HTTP", nil); self.whatToDownloadHelpLabel.text = [NSString stringWithFormat:NSLocalizedString(@"DOWNLOAD_FROM_HTTP_HELP", nil), [[UIDevice currentDevice] model]]; self.urlField.delegate = self; self.urlField.keyboardType = UIKeyboardTypeURL; self.progressContainer.hidden = YES; - self.downloadsTable.backgroundColor = [UIColor VLCDarkBackgroundColor]; self.downloadsTable.hidden = YES; + self.whatToDownloadHelpLabel.backgroundColor = [UIColor clearColor]; self.edgesForExtendedLayout = UIRectEdgeNone; + [self updateForTheme]; } - (void)viewWillAppear:(BOOL)animated @@ -100,6 +98,30 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { [super viewWillAppear:animated]; } +- (void)updateForTheme +{ + NSAttributedString *coloredAttributedPlaceholder = [[NSAttributedString alloc] initWithString:@"http://myserver.com/file.mkv" attributes:@{NSForegroundColorAttributeName: PresentationTheme.current.colors.lightTextColor}]; + self.urlField.attributedPlaceholder = coloredAttributedPlaceholder; + self.urlField.backgroundColor = PresentationTheme.current.colors.cellBackgroundB; + self.urlField.textColor = PresentationTheme.current.colors.cellTextColor; + self.downloadsTable.backgroundColor = PresentationTheme.current.colors.background; + self.view.backgroundColor = PresentationTheme.current.colors.background; + self.downloadButton.backgroundColor = PresentationTheme.current.colors.orangeUI; + self.whatToDownloadHelpLabel.textColor = PresentationTheme.current.colors.lightTextColor; + self.progressContainer.backgroundColor = PresentationTheme.current.colors.cellBackgroundB; + self.currentDownloadLabel.textColor = PresentationTheme.current.colors.cellBackgroundB; + self.progressPercent.textColor = PresentationTheme.current.colors.cellBackgroundB; + self.speedRate.textColor = PresentationTheme.current.colors.cellBackgroundB; + self.timeDL.textColor = PresentationTheme.current.colors.cellTextColor; + [self.downloadsTable reloadData]; +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + [self.view endEditing:YES]; +} + #pragma mark - UI interaction - (BOOL)shouldAutorotate @@ -110,12 +132,6 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { return YES; } -- (IBAction)goBack:(id)sender -{ - [self.view endEditing:YES]; - [[VLCSidebarController sharedInstance] toggleSidebar]; -} - - (IBAction)downloadAction:(id)sender { if ([self.urlField.text length] > 0) { @@ -396,8 +412,8 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; - cell.textLabel.textColor = [UIColor whiteColor]; - cell.detailTextLabel.textColor = [UIColor VLCLightTextColor]; + cell.textLabel.textColor = PresentationTheme.current.colors.cellTextColor; + cell.detailTextLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor; } NSInteger row = indexPath.row; @@ -415,7 +431,7 @@ typedef NS_ENUM(NSUInteger, VLCDownloadScheme) { - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor]; + cell.backgroundColor = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundA : PresentationTheme.current.colors.cellBackgroundB; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath diff --git a/SharedSources/VLCDragAndDropManager.swift b/Sources/VLCDragAndDropManager.swift similarity index 98% rename from SharedSources/VLCDragAndDropManager.swift rename to Sources/VLCDragAndDropManager.swift index b297a17d7..6b29252a7 100644 --- a/SharedSources/VLCDragAndDropManager.swift +++ b/Sources/VLCDragAndDropManager.swift @@ -95,7 +95,7 @@ class VLCDragAndDropManager: NSObject, UICollectionViewDragDelegate, UITableView continue } //Element dragging from another App - let placeholder = UITableViewDropPlaceholder(insertionIndexPath: destinationPath, reuseIdentifier: "PlaylistCell", rowHeight: VLCPlaylistTableViewCell.heightOfCell()) + let placeholder = UITableViewDropPlaceholder(insertionIndexPath: destinationPath, reuseIdentifier: VLCPlaylistTableViewCell.cellIdentifier(), rowHeight: VLCPlaylistTableViewCell.heightOfCell()) let placeholderContext = coordinator.drop(item.dragItem, to: placeholder) createFileWith(itemProvider:itemProvider) { [weak self] file, error in @@ -187,7 +187,7 @@ class VLCDragAndDropManager: NSObject, UICollectionViewDragDelegate, UITableView continue } //Element from another App - let placeholder = UICollectionViewDropPlaceholder(insertionIndexPath: destinationPath, reuseIdentifier: "PlaylistCell") + let placeholder = UICollectionViewDropPlaceholder(insertionIndexPath: destinationPath, reuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier()) let placeholderContext = coordinator.drop(item.dragItem, to: placeholder) createFileWith(itemProvider:item.dragItem.itemProvider) { [weak self] file, error in diff --git a/Sources/VLCDropboxTableViewController.m b/Sources/VLCDropboxTableViewController.m index dd69630a3..8a0bf7961 100644 --- a/Sources/VLCDropboxTableViewController.m +++ b/Sources/VLCDropboxTableViewController.m @@ -40,11 +40,6 @@ return self; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; diff --git a/Sources/VLCHTTPUploaderController.m b/Sources/VLCHTTPUploaderController.m index 79644ecc6..ffa6ef7c8 100644 --- a/Sources/VLCHTTPUploaderController.m +++ b/Sources/VLCHTTPUploaderController.m @@ -70,11 +70,6 @@ return self; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)applicationDidBecomeActive: (NSNotification *)notification { if (!_httpServer.isRunning) diff --git a/Sources/VLCLibrarySearchDisplayDataSource.h b/Sources/VLCLibrarySearchDisplayDataSource.h index d872673ec..9b8e4252f 100644 --- a/Sources/VLCLibrarySearchDisplayDataSource.h +++ b/Sources/VLCLibrarySearchDisplayDataSource.h @@ -10,7 +10,7 @@ * Refer to the COPYING file of the official project for license. *****************************************************************************/ -@interface VLCLibrarySearchDisplayDataSource : NSObject<UITableViewDataSource> +@interface VLCLibrarySearchDisplayDataSource : NSObject<UITableViewDataSource, UICollectionViewDataSource> - (NSManagedObject *)objectAtIndex:(NSUInteger)index; - (void)shouldReloadTableForSearchString:(NSString *)searchString searchableFiles:(NSArray *)files; diff --git a/Sources/VLCLibrarySearchDisplayDataSource.m b/Sources/VLCLibrarySearchDisplayDataSource.m index 6f4d6b49c..5b6095bfc 100644 --- a/Sources/VLCLibrarySearchDisplayDataSource.m +++ b/Sources/VLCLibrarySearchDisplayDataSource.m @@ -12,6 +12,7 @@ #import "VLCLibrarySearchDisplayDataSource.h" #import "VLCPlaylistTableViewCell.h" +#import "VLCPlaylistCollectionViewCell.h" @interface VLCLibrarySearchDisplayDataSource() <UITableViewDataSource> { @@ -37,7 +38,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[tableView dequeueReusableCellWithIdentifier:kPlaylistCellIdentifier forIndexPath:indexPath]; + VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[tableView dequeueReusableCellWithIdentifier:VLCPlaylistTableViewCell.cellIdentifier forIndexPath:indexPath]; NSInteger row = indexPath.row; @@ -47,6 +48,21 @@ return cell; } +- (nonnull __kindof UICollectionViewCell *)collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { + VLCPlaylistCollectionViewCell *cell = (VLCPlaylistCollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:VLCPlaylistCollectionViewCell.cellIdentifier forIndexPath:indexPath]; + + NSInteger row = indexPath.row; + + if (row < _searchData.count) + cell.mediaObject = _searchData[row]; + + return cell; +} + +- (NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return _searchData.count; +} + - (NSManagedObject *)objectAtIndex:(NSUInteger)index { return index < _searchData.count ? _searchData[index] : nil; diff --git a/Sources/VLCLibraryViewController.m b/Sources/VLCLibraryViewController.m index 4eef04de0..f75a0f317 100644 --- a/Sources/VLCLibraryViewController.m +++ b/Sources/VLCLibraryViewController.m @@ -140,7 +140,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; _tableView.tableHeaderView = _searchController.searchBar; } UINib *nib = [UINib nibWithNibName:@"VLCPlaylistTableViewCell" bundle:nil]; - [_tableView registerNib:nib forCellReuseIdentifier:kPlaylistCellIdentifier]; + [_tableView registerNib:nib forCellReuseIdentifier:VLCPlaylistTableViewCell.cellIdentifier]; } _tableView.frame = contentView.bounds; [_tableView reloadData]; @@ -161,7 +161,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; _collectionView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; _longPressGestureRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(_collectionViewHandleLongPressGesture:)]; [_collectionView addGestureRecognizer:_longPressGestureRecognizer]; - [_collectionView registerNib:[UINib nibWithNibName:@"VLCPlaylistCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"PlaylistCell"]; + [_collectionView registerNib:[UINib nibWithNibName:@"VLCPlaylistCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:VLCPlaylistCollectionViewCell.cellIdentifier]; } _collectionView.frame = contentView.bounds; [_collectionView reloadData]; @@ -191,7 +191,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; { [super viewDidLoad]; self.title = NSLocalizedString(@"LIBRARY_ALL_FILES", nil); - _menuButton = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(leftButtonAction:)]; self.navigationItem.leftBarButtonItem = _menuButton; self.editButtonItem.title = NSLocalizedString(@"BUTTON_EDIT", nil); @@ -486,7 +485,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; _createFolderBarButtonItem.enabled = NO; [_mediaDataSource addAllShows]; } break; - //Todo: I'm not sure if updateViewContents should be called in VLCLibraryModeFolder + //TODO: I'm not sure if updateViewContents should be called in VLCLibraryModeFolder //Here should maybe be an NSAssert to prevent this but for now due to refactoring these calls would've been made in that case case VLCLibraryModeAllFiles: case VLCLibraryModeFolder: @@ -541,9 +540,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"PlaylistCell"; - - VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[tableView dequeueReusableCellWithIdentifier:VLCPlaylistTableViewCell.cellIdentifier]; UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRightOnTableViewCellGestureAction:)]; [swipeRight setDirection:(UISwipeGestureRecognizerDirectionRight)]; @@ -656,7 +653,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; - (UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - VLCPlaylistCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"PlaylistCell" forIndexPath:indexPath]; + VLCPlaylistCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:VLCPlaylistCollectionViewCell.cellIdentifier forIndexPath:indexPath]; cell.mediaObject = [_mediaDataSource objectAtIndex:indexPath.row]; @@ -1096,8 +1093,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; - (IBAction)leftButtonAction:(id)sender { - [[VLCSidebarController sharedInstance] toggleSidebar]; - if (self.isEditing) [self setEditing:NO animated:YES]; } diff --git a/Sources/VLCMediaDataSource.m b/Sources/VLCMediaDataSource.m index 592800527..db6b53332 100644 --- a/Sources/VLCMediaDataSource.m +++ b/Sources/VLCMediaDataSource.m @@ -34,9 +34,7 @@ array = [(MLLabel *)selection sortedFolderItems]; } _currentSelection = selection; - @synchronized(_foundMedia) { - _foundMedia = [NSMutableArray arrayWithArray:array]; - } + _foundMedia = [NSMutableArray arrayWithArray:array]; } - (NSManagedObject *)currentSelection @@ -46,76 +44,58 @@ - (NSUInteger)numberOfFiles { - @synchronized (_foundMedia) { - return [_foundMedia count]; - } + return [_foundMedia count]; } - (NSManagedObject *)objectAtIndex:(NSUInteger)index { - @synchronized (_foundMedia) { - if (index < _foundMedia.count) - return _foundMedia[index]; - } + if (index < _foundMedia.count) + return _foundMedia[index]; return nil; } - (NSUInteger)indexOfObject:(NSManagedObject *)object { - @synchronized(_foundMedia) { - return [_foundMedia indexOfObject:object]; - } + return [_foundMedia indexOfObject:object]; } - (void)insertObject:(NSManagedObject *)object atIndex:(NSUInteger)index { - @synchronized(_foundMedia) { - [_foundMedia insertObject:object atIndex:index]; - } + [_foundMedia insertObject:object atIndex:index]; } - (void)removeObjectAtIndex:(NSUInteger)index { - @synchronized(_foundMedia) { - [_foundMedia removeObjectAtIndex:index]; - } + [_foundMedia removeObjectAtIndex:index]; } - (void)moveObjectFromIndex:(NSUInteger)fromIdx toIndex:(NSUInteger)toIdx { - @synchronized(_foundMedia) { - MLFile* object = _foundMedia[fromIdx]; - if (![object isKindOfClass:[MLFile class]]) - return; - [_foundMedia removeObjectAtIndex:fromIdx]; - [_foundMedia insertObject:object atIndex:toIdx]; - object.folderTrackNumber = @(toIdx - 1); - object = [_foundMedia objectAtIndex:fromIdx]; - if (![object isKindOfClass:[MLFile class]]) - return; - object.folderTrackNumber = @(fromIdx - 1); - } + MLFile* object = _foundMedia[fromIdx]; + if (![object isKindOfClass:[MLFile class]]) + return; + [_foundMedia removeObjectAtIndex:fromIdx]; + [_foundMedia insertObject:object atIndex:toIdx]; + object.folderTrackNumber = @(toIdx - 1); + object = [_foundMedia objectAtIndex:fromIdx]; + if (![object isKindOfClass:[MLFile class]]) + return; + object.folderTrackNumber = @(fromIdx - 1); } - (void)removeAllObjects { - @synchronized(_foundMedia) { - _foundMedia = [NSMutableArray new]; - } + _foundMedia = [NSMutableArray new]; } - (NSArray *)allObjects { - @synchronized(_foundMedia) { - return [_foundMedia copy]; - } + return [_foundMedia copy]; } - (void)addObject:(NSManagedObject *)object { - @synchronized (_foundMedia) { - [_foundMedia addObject:object]; - } + [_foundMedia addObject:object]; } - (void)addAlbumsInAllAlbumMode:(BOOL)isAllAlbumMode; @@ -151,10 +131,8 @@ { for (MLFile *file in [MLFile allFiles]) { if (file.labels != nil) { - @synchronized(file.labels) { - if (file.labels.count > 0) - continue; - } + if (file.labels.count > 0) + continue; } if (!file.isShowEpisode && !file.isAlbumTrack) { diff --git a/Sources/VLCMenuTableViewController.m b/Sources/VLCMenuTableViewController.m index e978ef37b..867250209 100644 --- a/Sources/VLCMenuTableViewController.m +++ b/Sources/VLCMenuTableViewController.m @@ -19,14 +19,14 @@ #import "VLCSidebarViewCell.h" #import <QuartzCore/QuartzCore.h> #import "VLCWiFiUploadTableViewCell.h" -#import "VLCAppDelegate.h" +#import "VLCDownloadViewController.h" #import "VLCServerListViewController.h" #import "VLCOpenNetworkStreamViewController.h" #import "VLCSettingsController.h" #import "VLCAboutViewController.h" -#import "VLCLibraryViewController.h" #import "VLCBugreporter.h" #import "VLCCloudServicesTableViewController.h" +#import "VLC_iOS-Swift.h" #define ROW_HEIGHT 50. #define IPAD_ROW_HEIGHT 65. @@ -40,7 +40,7 @@ static NSString *CellIdentifier = @"VLCMenuCell"; static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; -@interface VLCMenuTableViewController () <UITableViewDataSource, UITableViewDelegate> +@interface VLCMenuTableViewController () <UITableViewDataSource, UITableViewDelegate, VLCMediaViewControllerDelegate> { NSArray *_sectionHeaderTexts; NSArray *_menuItemsSectionOne; @@ -51,6 +51,7 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; NSLayoutConstraint *_heightConstraint; NSLayoutConstraint *_leftTableConstraint; VLCSettingsController *_settingsController; + VLCMediaViewController *_videoViewController; } @end @@ -104,7 +105,7 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; [self.view addConstraint:_leftTableConstraint]; [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|->=0-[_menuTableView(==menuWidth)]" options:0 metrics:metrics views:dict]]; - [_menuTableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UITableViewScrollPositionTop]; + [self selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:UITableViewScrollPositionTop]; } - (BOOL)shouldAutorotate @@ -231,10 +232,17 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; return _settingsController; } +- (VLCMediaViewController *)videoViewController +{ + if (!_videoViewController) { + _videoViewController = [[VLCMediaViewController alloc] initWithCollectionViewLayout:[UICollectionViewFlowLayout new]]; + } + return _videoViewController; +} + - (void)_revealItem:(NSUInteger)itemIndex inSection:(NSUInteger)sectionNumber { UIViewController *viewController; - VLCAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; if (sectionNumber == 1) { if (itemIndex == 0) viewController = [[VLCServerListViewController alloc] init]; @@ -252,8 +260,7 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; } else if (itemIndex == 1) viewController = [[VLCAboutViewController alloc] init]; } else { - viewController = appDelegate.libraryViewController; - [(VLCLibraryViewController *)viewController setLibraryMode:(int)itemIndex]; + viewController = self.videoViewController; } if (!viewController) { @@ -291,5 +298,14 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell"; if (motion == UIEventSubtypeMotionShake) [[VLCBugreporter sharedInstance] handleBugreportRequest]; } +#pragma mark - VLCMediaViewControllerDelegate +- (void)videoViewControllerDidSelectMediaObjectWithVLCMediaViewController:(VLCMediaViewController *)VLCMediaViewController mediaObject:(NSManagedObject *)mediaObject +{ + +} + +- (void)videoViewControllerDidSelectBackbuttonWithVLCMediaViewController:(VLCMediaViewController *)VLCMediaViewController { + [[VLCSidebarController sharedInstance] toggleSidebar]; +} @end diff --git a/Sources/VLCMiniPlaybackView.m b/Sources/VLCMiniPlaybackView.m index b91d2490c..bb2ef36a4 100644 --- a/Sources/VLCMiniPlaybackView.m +++ b/Sources/VLCMiniPlaybackView.m @@ -6,13 +6,12 @@ * $Id$ * * Author: Felix Paul Kühne <fkuehne # videolan.org> + * Carola Nitz <caro # videolan.org> * * Refer to the COPYING file of the official project for license. *****************************************************************************/ #import "VLCMiniPlaybackView.h" -#import "VLCPlaybackController.h" -#import "VLCPlayerDisplayController.h" #import "VLCMetadata.h" #import "VLC_iOS-Swift.h" @@ -38,12 +37,6 @@ self = [super initWithFrame:viewFrame]; if (self) { [self setupSubviews]; - - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(appBecameActive:) - name:UIApplicationDidBecomeActiveNotification - object:nil]; } return self; } @@ -146,14 +139,6 @@ #endif } -- (void)appBecameActive:(NSNotification *)aNotification -{ - VLCPlayerDisplayController *pdc = [VLCPlayerDisplayController sharedInstance]; - if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeMiniplayer) { - [[VLCPlaybackController sharedInstance] recoverDisplayedMetadata]; - } -} - - (void)tapRecognized { [self pushFullPlaybackView:nil]; @@ -209,6 +194,8 @@ [self updatePlayPauseButton]; controller.delegate = self; [controller recoverDisplayedMetadata]; + _videoView.hidden = false; + controller.videoOutputView = _videoView; } - (void)mediaPlayerStateChanged:(VLCMediaPlayerState)currentState @@ -228,11 +215,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom _artworkView.image = metadata.artworkImage?: [UIImage imageNamed:@"no-artwork"]; } else { _artworkView.image = nil; - VLCPlayerDisplayController *pdc = [VLCPlayerDisplayController sharedInstance]; - if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeMiniplayer) { - _videoView.hidden = false; - controller.videoOutputView = _videoView; - } } NSString *metaDataString; diff --git a/Sources/VLCMovieViewController.h b/Sources/VLCMovieViewController.h index 3928f0d8e..8978d1529 100644 --- a/Sources/VLCMovieViewController.h +++ b/Sources/VLCMovieViewController.h @@ -17,10 +17,10 @@ @class OBSlider; @class VLCStatusLabel; -@class VLCHorizontalSwipeGestureRecognizer; @class VLCVerticalSwipeGestureRecognizer; @class VLCTimeNavigationTitleView; @class VLCMovieViewControlPanelView; +@class VLCMovieViewController; typedef NS_ENUM(NSInteger, VLCMovieJumpState) { VLCMovieJumpStateDefault, @@ -28,6 +28,11 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) { VLCMovieJumpStateBackward }; +@protocol VLCMovieViewControllerDelegate +- (void)movieViewControllerDidSelectMinimize:(VLCMovieViewController *)movieViewController; +- (BOOL)movieViewControllerShouldBeDisplayed:(VLCMovieViewController *)movieViewController; +@end + @interface VLCMovieViewController : UIViewController <UIActionSheetDelegate, VLCPlaybackControllerDelegate> @property (nonatomic, strong) IBOutlet UIView *movieView; @@ -73,6 +78,8 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) { @property (nonatomic, strong) IBOutlet UIImageView *artworkImageView; @property (nonatomic, strong) IBOutlet NSLayoutConstraint *widthConstraint; +@property (nonatomic, weak) id<VLCMovieViewControllerDelegate> delegate; + - (IBAction)closePlayback:(id)sender; - (IBAction)minimizePlayback:(id)sender; diff --git a/Sources/VLCMovieViewController.m b/Sources/VLCMovieViewController.m index 1cc75ab56..7626ac65b 100644 --- a/Sources/VLCMovieViewController.m +++ b/Sources/VLCMovieViewController.m @@ -27,12 +27,11 @@ #import "VLCPlaybackController.h" #import "UIDevice+VLC.h" #import "VLCTimeNavigationTitleView.h" -#import "VLCPlayerDisplayController.h" #import "VLCAppDelegate.h" #import "VLCStatusLabel.h" #import "VLCMovieViewControlPanelView.h" #import "VLCSlider.h" -#import "VLCLibraryViewController.h" + #import "VLCTrackSelectorView.h" #import "VLCMetadata.h" #import "UIDevice+VLC.h" @@ -129,11 +128,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) { [defaults registerDefaults:appDefaults]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; @@ -857,7 +851,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) { - (IBAction)minimizePlayback:(id)sender { - [[UIApplication sharedApplication] sendAction:@selector(closeFullscreenPlayback) to:nil from:self forEvent:nil]; + [_delegate movieViewControllerDidSelectMinimize:self]; } - (IBAction)positionSliderAction:(UISlider *)sender @@ -1521,8 +1515,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom - (void)appBecameActive:(NSNotification *)aNotification { - VLCPlayerDisplayController *pdc = [VLCPlayerDisplayController sharedInstance]; - if (pdc.displayMode == VLCPlayerDisplayControllerDisplayModeFullscreen) { + if ([_delegate movieViewControllerShouldBeDisplayed:self]) { [_vpc recoverDisplayedMetadata]; if (_vpc.videoOutputView != self.movieView) { _vpc.videoOutputView = self.movieView; diff --git a/Sources/VLCOpenNetworkStreamViewController.m b/Sources/VLCOpenNetworkStreamViewController.m index 6808a2ed2..86b9ce3f4 100644 --- a/Sources/VLCOpenNetworkStreamViewController.m +++ b/Sources/VLCOpenNetworkStreamViewController.m @@ -18,6 +18,7 @@ #import "VLCMenuTableViewController.h" #import "VLCStreamingHistoryCell.h" #import "UIDevice+VLC.h" +#import "VLC_iOS-Swift.h" @interface VLCOpenNetworkStreamViewController () <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, VLCStreamingHistoryCellMenuItemProtocol> { @@ -50,11 +51,6 @@ [self.historyTableView reloadData]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { [super viewDidLoad]; @@ -65,6 +61,10 @@ name:NSUbiquitousKeyValueStoreDidChangeExternallyNotification object:[NSUbiquitousKeyValueStore defaultStore]]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateForTheme) + name:kVLCThemeDidChangeNotification + object:nil]; /* force store update */ NSUbiquitousKeyValueStore *ubiquitousKeyValueStore = [NSUbiquitousKeyValueStore defaultStore]; [ubiquitousKeyValueStore synchronize]; @@ -102,15 +102,11 @@ [scanSubModelabel setText:NSLocalizedString(@"SCAN_SUBTITLE_TOGGLE", nil)]; [scanSubModelabel setAdjustsFontSizeToFitWidth:YES]; [scanSubModelabel setNumberOfLines:0]; - self.title = NSLocalizedString(@"OPEN_NETWORK", nil); - self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)]; + [self.whatToOpenHelpLabel setText:NSLocalizedString(@"OPEN_NETWORK_HELP", nil)]; self.urlField.delegate = self; self.urlField.keyboardType = UIKeyboardTypeURL; - self.historyTableView.backgroundColor = [UIColor VLCDarkBackgroundColor]; - NSAttributedString *coloredAttributedPlaceholder = [[NSAttributedString alloc] initWithString:@"http://myserver.com/file.mkv" attributes:@{NSForegroundColorAttributeName: [UIColor VLCLightTextColor]}]; - self.urlField.attributedPlaceholder = coloredAttributedPlaceholder; self.edgesForExtendedLayout = UIRectEdgeNone; // This will be called every time this VC is opened by the side menu controller @@ -123,6 +119,22 @@ UIMenuController *sharedMenuController = [UIMenuController sharedMenuController]; [sharedMenuController setMenuItems:@[renameItem]]; [sharedMenuController update]; + [self updateForTheme]; +} + +- (void)updateForTheme +{ + self.historyTableView.backgroundColor = PresentationTheme.current.colors.background; + self.view.backgroundColor = PresentationTheme.current.colors.background; + NSAttributedString *coloredAttributedPlaceholder = [[NSAttributedString alloc] initWithString:@"http://myserver.com/file.mkv" attributes:@{NSForegroundColorAttributeName: PresentationTheme.current.colors.lightTextColor}]; + self.urlField.attributedPlaceholder = coloredAttributedPlaceholder; + self.urlField.backgroundColor = PresentationTheme.current.colors.cellBackgroundB; + self.urlField.textColor = PresentationTheme.current.colors.cellTextColor; + self.privateModeLabel.textColor = PresentationTheme.current.colors.lightTextColor; + self.ScanSubModeLabel.textColor = PresentationTheme.current.colors.lightTextColor; + self.whatToOpenHelpLabel.textColor = PresentationTheme.current.colors.lightTextColor; + self.openButton.backgroundColor = PresentationTheme.current.colors.orangeUI; + [self.historyTableView reloadData]; } - (void)updatePasteboardTextInURLField @@ -150,6 +162,7 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:self.privateToggleSwitch.on forKey:kVLCPrivateWebStreaming]; [defaults setBool:self.ScanSubToggleSwitch.on forKey:kVLChttpScanSubtitle]; + [self.view endEditing:YES]; /* force update before we leave */ [[NSUbiquitousKeyValueStore defaultStore] synchronize]; @@ -170,12 +183,6 @@ return YES; } -- (IBAction)goBack:(id)sender -{ - [self.view endEditing:YES]; - [[VLCSidebarController sharedInstance] toggleSidebar]; -} - - (IBAction)openButtonAction:(id)sender { if ([self.urlField.text length] <= 0 || [NSURL URLWithString:self.urlField.text] == nil) { @@ -276,7 +283,7 @@ NSString *possibleTitle = _recentURLTitles[[@(indexPath.row) stringValue]]; cell.detailTextLabel.text = content; - cell.textLabel.text = (possibleTitle != nil) ? possibleTitle : [content lastPathComponent]; + cell.textLabel.text = possibleTitle ?: [content lastPathComponent]; return cell; } @@ -285,7 +292,9 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor]; + cell.backgroundColor = (indexPath.row % 2 == 0)? PresentationTheme.current.colors.cellBackgroundB : PresentationTheme.current.colors.cellBackgroundA; + cell.textLabel.textColor = PresentationTheme.current.colors.cellTextColor; + cell.detailTextLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath diff --git a/Sources/VLCPlaybackController.h b/Sources/VLCPlaybackController.h index ac879cf15..49fce1ab8 100644 --- a/Sources/VLCPlaybackController.h +++ b/Sources/VLCPlaybackController.h @@ -12,7 +12,6 @@ *****************************************************************************/ #import "VLCEqualizerView.h" - extern NSString *const VLCPlaybackControllerPlaybackDidStart; extern NSString *const VLCPlaybackControllerPlaybackDidPause; extern NSString *const VLCPlaybackControllerPlaybackDidResume; diff --git a/Sources/VLCPlaybackController.m b/Sources/VLCPlaybackController.m index 8a405b5d7..d584beb95 100644 --- a/Sources/VLCPlaybackController.m +++ b/Sources/VLCPlaybackController.m @@ -92,7 +92,6 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) { - (void)dealloc { _dialogProvider = nil; - [[NSNotificationCenter defaultCenter] removeObserver:self]; } - (instancetype)init diff --git a/Sources/VLCPlayerDisplayController.h b/Sources/VLCPlayerDisplayController.h index ea54eb6e9..b03d1e80c 100644 --- a/Sources/VLCPlayerDisplayController.h +++ b/Sources/VLCPlayerDisplayController.h @@ -24,11 +24,11 @@ typedef NS_ENUM(NSUInteger, VLCPlayerDisplayControllerDisplayMode) { @end -@interface VLCPlayerDisplayController : UIViewController +@protocol VLCPlayerDisplayControllerDelegate -+ (VLCPlayerDisplayController *)sharedInstance; +@end -@property (nonatomic, strong) UIViewController *childViewController; +@interface VLCPlayerDisplayController : UIViewController @property (nonatomic, assign) VLCPlayerDisplayControllerDisplayMode displayMode; @property (nonatomic, weak) VLCPlaybackController *playbackController; diff --git a/Sources/VLCPlayerDisplayController.m b/Sources/VLCPlayerDisplayController.m index b6a04a9ae..f928dd38a 100644 --- a/Sources/VLCPlayerDisplayController.m +++ b/Sources/VLCPlayerDisplayController.m @@ -14,6 +14,7 @@ #import "VLCPlaybackController.h" #import "VLCMiniPlaybackView.h" #import "VLCPlaybackNavigationController.h" +#import "VLCPlaybackController+MediaLibrary.h" #if TARGET_OS_IOS #import "VLCMovieViewController.h" @@ -23,29 +24,26 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDisplayControllerDisplayMode"; -@interface VLCPlayerDisplayController () -@property (nonatomic, strong) UIViewController<VLCPlaybackControllerDelegate> *movieViewController; -@property (nonatomic, strong) UIView<VLCPlaybackControllerDelegate, VLCMiniPlaybackViewInterface> *miniPlaybackView; +@interface VLCUntouchableView: UIView @end -@implementation VLCPlayerDisplayController +@implementation VLCUntouchableView -+ (VLCPlayerDisplayController *)sharedInstance +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { - static VLCPlayerDisplayController *sharedInstance = nil; - static dispatch_once_t pred; + UIView *result = [super hitTest:point withEvent:event]; + return result == self ? nil : result; +} - dispatch_once(&pred, ^{ - sharedInstance = [VLCPlayerDisplayController new]; - }); +@end - return sharedInstance; -} +@interface VLCPlayerDisplayController () <VLCMovieViewControllerDelegate> +@property (nonatomic, strong) UIViewController<VLCPlaybackControllerDelegate> *movieViewController; +@property (nonatomic, strong) UIView<VLCPlaybackControllerDelegate, VLCMiniPlaybackViewInterface> *miniPlaybackView; +@property (nonatomic, strong) NSLayoutConstraint *bottomConstraint; +@end -+ (void)initialize -{ - [[NSUserDefaults standardUserDefaults] registerDefaults:@{VLCPlayerDisplayControllerDisplayModeKey : @(VLCPlayerDisplayControllerDisplayModeFullscreen)}]; -} +@implementation VLCPlayerDisplayController - (instancetype)init { @@ -55,44 +53,14 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis [notificationCenter addObserver:self selector:@selector(playbackDidStart:) name:VLCPlaybackControllerPlaybackDidStart object:nil]; [notificationCenter addObserver:self selector:@selector(playbackDidFail:) name:VLCPlaybackControllerPlaybackDidFail object:nil]; [notificationCenter addObserver:self selector:@selector(playbackDidStop:) name:VLCPlaybackControllerPlaybackDidStop object:nil]; + [[NSUserDefaults standardUserDefaults] registerDefaults:@{VLCPlayerDisplayControllerDisplayModeKey : @(VLCPlayerDisplayControllerDisplayModeFullscreen)}]; } return self; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - - (void)viewDidLoad { - [super viewDidLoad]; - [self setupChildViewController]; -} - -#pragma mark - ChildViewController - -- (void)setChildViewController:(UIViewController *)childViewController -{ - if (_childViewController) { - [_childViewController willMoveToParentViewController:nil]; - [_childViewController.view removeFromSuperview]; - [_childViewController removeFromParentViewController]; - } - _childViewController = childViewController; - if (self.isViewLoaded) { - [self setupChildViewController]; - } -} - -- (void)setupChildViewController -{ - UIViewController *childViewController = self.childViewController; - if (childViewController == nil) - return; - [self addChildViewController:childViewController]; - [self.view addSubview:childViewController.view]; - [childViewController didMoveToParentViewController:self]; + self.view = [[VLCUntouchableView alloc] initWithFrame:self.view.frame]; } #pragma mark - properties @@ -107,16 +75,6 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis [[NSUserDefaults standardUserDefaults] setInteger:displayMode forKey:VLCPlayerDisplayControllerDisplayModeKey]; } -- (void)viewSafeAreaInsetsDidChange -{ - if (@available(iOS 11.0, *)) { - [super viewSafeAreaInsetsDidChange]; - CGRect frame = _miniPlaybackView.frame; - frame.size.height = 60.0 + self.view.safeAreaInsets.bottom; - _miniPlaybackView.frame = frame; - } -} - - (VLCPlaybackController *)playbackController { if (_playbackController == nil) { _playbackController = [VLCPlaybackController sharedInstance]; @@ -129,10 +87,11 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis if (!_movieViewController) { #if TARGET_OS_IOS _movieViewController = [[VLCMovieViewController alloc] initWithNibName:nil bundle:nil]; + ((VLCMovieViewController *)_movieViewController).delegate = self; #else _movieViewController = [[VLCFullscreenMovieTVViewController alloc] initWithNibName:nil bundle:nil]; #endif - [VLCPlaybackController sharedInstance].delegate = _movieViewController; + self.playbackController.delegate = _movieViewController; } return _movieViewController; } @@ -144,8 +103,7 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; BOOL enforceFullscreen = [[defaults objectForKey:kVLCSettingVideoFullscreenPlayback] boolValue]; - VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance]; - if (vpc.fullscreenSessionRequested && enforceFullscreen) { + if (self.playbackController.fullscreenSessionRequested && enforceFullscreen) { [self showFullscreenPlayback]; return; } @@ -182,7 +140,7 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis - (void)closeFullscreenPlayback { - [self _closeFullscreenPlayback]; + [self.movieViewController dismissViewControllerAnimated:[self shouldAnimate] completion:nil]; self.displayMode = VLCPlayerDisplayControllerDisplayModeMiniplayer; [self _showHideMiniPlaybackView]; } @@ -302,15 +260,6 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis const BOOL activePlaybackSession = playbackController.isPlaying || playbackController.willPlay; const BOOL miniPlayerVisible = miniPlaybackView.visible; - const CGRect viewRect = self.view.bounds; - - CGFloat miniPlayerHeight = 60.; - if (@available(iOS 11.0, *)) { - miniPlayerHeight += self.view.safeAreaInsets.bottom; - } - const CGRect miniPlayerFrameIn = CGRectMake(0., viewRect.size.height-miniPlayerHeight, viewRect.size.width, miniPlayerHeight); - const CGRect miniPlayerFrameOut = CGRectMake(0., viewRect.size.height, viewRect.size.width, miniPlayerHeight); - BOOL needsShow = activePlaybackSession && !miniPlayerVisible; BOOL needsHide = !activePlaybackSession && miniPlayerVisible; @@ -322,9 +271,18 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis void (^completionBlock)(BOOL) = nil; if (needsShow) { if (!miniPlaybackView) { - self.miniPlaybackView = miniPlaybackView = [[VLCMiniPlaybackView alloc] initWithFrame:miniPlayerFrameOut]; - miniPlaybackView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; + self.miniPlaybackView = miniPlaybackView = [[VLCMiniPlaybackView alloc] initWithFrame:CGRectZero]; + miniPlaybackView.translatesAutoresizingMaskIntoConstraints = NO; + miniPlaybackView.userInteractionEnabled = YES; [self.view addSubview:miniPlaybackView]; + _bottomConstraint = [miniPlaybackView.topAnchor constraintEqualToAnchor:self.view.bottomAnchor]; + [NSLayoutConstraint activateConstraints: + @[_bottomConstraint, + [miniPlaybackView.heightAnchor constraintEqualToConstant:60.0], + [miniPlaybackView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor], + [miniPlaybackView.rightAnchor constraintEqualToAnchor:self.view.rightAnchor], + ]]; + [self.view layoutIfNeeded]; } miniPlaybackView.visible = YES; } else if (needsHide) { @@ -345,22 +303,27 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis [miniPlaybackView prepareForMediaPlayback:playbackController]; if (needsShow || needsHide) { - UIViewController *childViewController = self.childViewController; - - const CGRect newMiniPlayerFrame = needsHide ? miniPlayerFrameOut : miniPlayerFrameIn; - CGRect newChildViewFrame = childViewController.view.frame; - newChildViewFrame.size.height = CGRectGetMinY(newMiniPlayerFrame)-CGRectGetMinY(newChildViewFrame); - [UIView animateWithDuration:animationDuration delay:animationDuration options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction animations:^{ - miniPlaybackView.frame = newMiniPlayerFrame; - childViewController.view.frame = newChildViewFrame; + self.bottomConstraint.constant = needsHide ? 0 : -_miniPlaybackView.frame.size.height -self.view.layoutMargins.bottom; + [self.view layoutIfNeeded]; } completion:completionBlock]; } #endif } +#pragma mark - MovieViewControllerDelegate + +- (void)movieViewControllerDidSelectMinimize:(VLCMovieViewController *)movieViewController +{ + [self closeFullscreenPlayback]; +} + +- (BOOL)movieViewControllerShouldBeDisplayed:(VLCMovieViewController *)movieViewController +{ + return self.displayMode == VLCPlayerDisplayControllerDisplayModeFullscreen; +} @end diff --git a/Sources/VLCPlaylistCollectionViewCell.h b/Sources/VLCPlaylistCollectionViewCell.h index 7f24c597d..fdaf8621f 100644 --- a/Sources/VLCPlaylistCollectionViewCell.h +++ b/Sources/VLCPlaylistCollectionViewCell.h @@ -2,12 +2,13 @@ * VLCPlaylistCollectionViewCell.h * VLC for iOS ***************************************************************************** - * Copyright (c) 2013-2015 VideoLAN. All rights reserved. + * Copyright (c) 2013-2018 VideoLAN. All rights reserved. * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan.org> * Tamas Timar <ttimar.vlc # gmail.com> * Gleb Pinigin <gpinigin # gmail.com> + * Carola Nitz <nitz.carola # gmail.com> * * Refer to the COPYING file of the official project for license. *****************************************************************************/ @@ -33,7 +34,7 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated; - (void)selectionUpdate; -- (void)shake:(BOOL)shake; - (void)showMetadata:(BOOL)showMeta; ++ (NSString *)cellIdentifier; @end diff --git a/Sources/VLCPlaylistCollectionViewCell.m b/Sources/VLCPlaylistCollectionViewCell.m index 815f282dd..df9d665b3 100644 --- a/Sources/VLCPlaylistCollectionViewCell.m +++ b/Sources/VLCPlaylistCollectionViewCell.m @@ -2,7 +2,7 @@ * VLCPlaylistCollectionViewCell.m * VLC for iOS ***************************************************************************** - * Copyright (c) 2013-2015 VideoLAN. All rights reserved. + * Copyright (c) 2013-2018 VideoLAN. All rights reserved. * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan.org> @@ -14,7 +14,6 @@ *****************************************************************************/ #import "VLCPlaylistCollectionViewCell.h" -#import "VLCLibraryViewController.h" #import "VLCThumbnailsCache.h" #import "NSString+SupportedMedia.h" @@ -22,6 +21,7 @@ { UIImage *_checkboxEmptyImage; UIImage *_checkboxImage; + BOOL _editing; } @end @@ -41,11 +41,17 @@ [super awakeFromNib]; } ++ (NSString *)cellIdentifier +{ + return @"VLCPlaylistCollectionViewCell"; +} + - (void)setEditing:(BOOL)editing animated:(BOOL)animated { - self.isSelectedView.hidden = !editing; + _editing = editing; + self.isSelectedView.hidden = !_editing; - [self shake:editing]; + [self shake]; [self selectionUpdate]; [self _updatedDisplayedInformationForKeyPath:@"editing"]; } @@ -58,9 +64,9 @@ self.isSelectedView.image = _checkboxEmptyImage; } -- (void)shake:(BOOL)shake +- (void)shake { - if (shake) { + if (_editing) { [UIView animateWithDuration:0.3 animations:^{ self.contentView.transform = CGAffineTransformMakeScale(0.9f, 0.9f); }]; @@ -125,7 +131,6 @@ [_mediaObject removeObserver:self forKeyPath:@"album"]; [_mediaObject removeObserver:self forKeyPath:@"artist"]; [_mediaObject removeObserver:self forKeyPath:@"genre"]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; [(MLFile*)_mediaObject didHide]; } } @@ -306,9 +311,7 @@ } else self.titleLabel.text = mediaFile.title; - VLCLibraryViewController *delegate = (VLCLibraryViewController*)self.collectionView.delegate; - - if (delegate.isEditing) + if (_editing) self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %@", [VLCTime timeWithNumber:[mediaFile duration]], [NSByteCountFormatter stringFromByteCount:[mediaFile fileSizeInBytes] countStyle:NSByteCountFormatterCountStyleFile]]; else { self.subtitleLabel.text = [NSString stringWithFormat:@"%@", [VLCTime timeWithNumber:[mediaFile duration]]]; diff --git a/Sources/VLCPlaylistTableViewCell.h b/Sources/VLCPlaylistTableViewCell.h index f7cbfc7e7..5c38d1c2a 100644 --- a/Sources/VLCPlaylistTableViewCell.h +++ b/Sources/VLCPlaylistTableViewCell.h @@ -12,8 +12,6 @@ *****************************************************************************/ #import <UIKit/UIKit.h> -static NSString *kPlaylistCellIdentifier = @"PlaylistCell"; - @class VLCLinearProgressIndicator; @interface VLCPlaylistTableViewCell : UITableViewCell @@ -30,6 +28,7 @@ static NSString *kPlaylistCellIdentifier = @"PlaylistCell"; @property (nonatomic, strong) NSManagedObject *mediaObject; + (CGFloat)heightOfCell; ++ (NSString *)cellIdentifier; - (void)collapsWithAnimation:(BOOL)animate; diff --git a/Sources/VLCPlaylistTableViewCell.m b/Sources/VLCPlaylistTableViewCell.m index 9b47fbb2f..506471aed 100644 --- a/Sources/VLCPlaylistTableViewCell.m +++ b/Sources/VLCPlaylistTableViewCell.m @@ -34,6 +34,11 @@ [self setSelectedBackgroundView:bgColorView]; } ++ (NSString *)cellIdentifier +{ + return @"VLCPlaylistTableViewCell"; +} + - (void)dealloc { [self _removeObserver]; @@ -92,7 +97,6 @@ [_mediaObject removeObserver:self forKeyPath:@"album"]; [_mediaObject removeObserver:self forKeyPath:@"artist"]; [_mediaObject removeObserver:self forKeyPath:@"genre"]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; [(MLFile*)_mediaObject didHide]; } } diff --git a/Sources/VLCSettingsController.m b/Sources/VLCSettingsController.m index abfef9457..c060d1ee3 100644 --- a/Sources/VLCSettingsController.m +++ b/Sources/VLCSettingsController.m @@ -13,7 +13,6 @@ *****************************************************************************/ #import "VLCSettingsController.h" -#import "VLCLibraryViewController.h" #import "IASKSettingsReader.h" #import "PAPasscodeViewController.h" #import <LocalAuthentication/LocalAuthentication.h> @@ -37,11 +36,18 @@ - (void)viewDidLoad { - self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(dismiss:)]; self.modalPresentationStyle = UIModalPresentationFormSheet; self.delegate = self; self.showDoneButton = NO; self.showCreditsFooter = NO; + [self themeDidChange]; +} + +- (void)themeDidChange +{ + self.view.backgroundColor = PresentationTheme.current.colors.settingsBackground; + self.tableView.separatorColor = PresentationTheme.current.colors.settingsSeparatorColor; + [self.tableView reloadData]; } - (void)viewWillAppear:(BOOL)animated @@ -94,6 +100,11 @@ [self updateForPasscode:nil]; } } + if ([notification.object isEqual:kVLCSettingAppTheme]) { + BOOL darkTheme = [[notification.userInfo objectForKey:kVLCSettingAppTheme] boolValue]; + PresentationTheme.current = darkTheme ? PresentationTheme.darkTheme : PresentationTheme.brightTheme; + [self themeDidChange]; + } } - (void)updateUIAndCoreSpotlightForPasscodeSetting:(BOOL)passcodeOn @@ -126,6 +137,15 @@ [self updateForPasscode:controller.passcode]; } +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; + cell.backgroundColor = PresentationTheme.current.colors.settingsCellBackground; + cell.textLabel.textColor = PresentationTheme.current.colors.cellTextColor; + cell.detailTextLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor; + return cell; +} + - (void)updateForPasscode:(NSString *)passcode { NSError *error = nil; diff --git a/Sources/VLCTabBarCoordinator.swift b/Sources/VLCTabBarCoordinator.swift new file mode 100644 index 000000000..ee619de00 --- /dev/null +++ b/Sources/VLCTabBarCoordinator.swift @@ -0,0 +1,172 @@ +/***************************************************************************** + * VLCTabbarCooordinator.swift + * VLC for iOS + ***************************************************************************** + * Copyright (c) 2018 VideoLAN. All rights reserved. + * $Id$ + * + * Authors: Carola Nitz <nitz.carola # gmail.com> + * + * Refer to the COPYING file of the official project for license. + *****************************************************************************/ + +import Foundation + +class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarControllerDelegate { + + private var childCoordinators: [NSObject] = [] + private var tabBarController:UITabBarController + private var services:Services + private let displayController = VLCPlayerDisplayController() + + public init(tabBarController: UITabBarController, services:Services) { + self.tabBarController = tabBarController + self.services = services + super.init() + self.tabBarController.delegate = self + NotificationCenter.default.addObserver(self, selector: #selector(updateTheme), name: .VLCThemeDidChangeNotification, object: nil) + } + + @objc public func start() { + setupViewControllers() + updateTheme() + } + + @objc func updateTheme() { + tabBarController.tabBar.barTintColor = PresentationTheme.current.colors.tabBarColor + customizeMoreViewController() + } + + func customizeMoreViewController() { + if let UITabBarCustomizeViewClass = NSClassFromString("UITabBarCustomizeView") { + for subview in tabBarController.view.subviews where subview.isKind(of: UITabBarCustomizeViewClass) { + subview.backgroundColor = PresentationTheme.current.colors.background + subview.tintColor = PresentationTheme.current.colors.orangeUI + } + } + } + + func tabBarController(_ tabBarController: UITabBarController, willBeginCustomizing viewControllers: [UIViewController]) { + customizeMoreViewController() + } + + func setupViewControllers() { + + tabBarController.addChildViewController(displayController) + tabBarController.view.addSubview(displayController.view) + displayController.view.layoutMargins = UIEdgeInsets(top:0, left:0, bottom:tabBarController.tabBar.frame.size.height, right:0) + displayController.didMove(toParentViewController: tabBarController) + + let videoVC = VLCMediaViewController(services: services) + //this should probably not be the delegate + videoVC.delegate = self + videoVC.title = NSLocalizedString("Video",comment: "") + videoVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("Video",comment: ""), + image: UIImage(named: "TVShowsIcon"), + selectedImage: UIImage(named: "TVShowsIcon")) + + // Audio + let audioVC = VLCMediaViewController(services: services) + //this should probably not be the delegate + audioVC.delegate = self + audioVC.title = NSLocalizedString("Audio",comment: "") + audioVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("Audio",comment: ""), + image: UIImage(named: "MusicAlbums"), + selectedImage:UIImage(named: "MusicAlbums")) + + //Serverlist + let serverVC = VLCServerListViewController(nibName: nil, bundle: nil) + serverVC.title = NSLocalizedString("LOCAL_NETWORK", comment: "") + serverVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("LOCAL_NETWORK",comment: ""), + image: UIImage(named: "Local"), + selectedImage: UIImage(named: "Local")) + + //CloudServices + let cloudVC = VLCCloudServicesTableViewController(nibName: "VLCCloudServicesTableViewController", bundle: Bundle.main) + cloudVC.title = NSLocalizedString("CLOUD_SERVICES",comment: "") + cloudVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("CLOUD_SERVICES",comment: ""), + image: UIImage(named: "iCloudIcon"), + selectedImage: UIImage(named: "iCloudIcon")) + + //Settings + let settingsVC = VLCSettingsController() + settingsVC.title = NSLocalizedString("Settings",comment: "") + settingsVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("Settings",comment: ""), + image: UIImage(named: "Settings"), + selectedImage: UIImage(named: "Settings")) + + //Download + let downloadVC = VLCDownloadViewController() + downloadVC.title = NSLocalizedString("DOWNLOAD_FROM_HTTP", comment:"") + downloadVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("DOWNLOAD_FROM_HTTP",comment: ""), + image: UIImage(named: "Downloads"), + selectedImage: UIImage(named: "Downloads")) + + //Streaming + let streamVC = VLCOpenNetworkStreamViewController(nibName: "VLCOpenNetworkStreamViewController", bundle: Bundle.main) + streamVC.title = NSLocalizedString("OPEN_NETWORK", comment: "") + streamVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("OPEN_NETWORK", comment: ""), + image: UIImage(named: "OpenNetStream"), + selectedImage: UIImage(named: "OpenNetStream")) + + //About + let aboutVC = VLCAboutViewController() + aboutVC.title = NSLocalizedString("ABOUT_APP",comment: "") + + aboutVC.tabBarItem = UITabBarItem( + title: NSLocalizedString("ABOUT_APP",comment: ""), + image: coneIcon(), + selectedImage: coneIcon()) + + let controllers = [audioVC, serverVC, videoVC, settingsVC, cloudVC, downloadVC, streamVC, aboutVC] + tabBarController.viewControllers = controllers.map { UINavigationController(rootViewController: $0)} + } + + func coneIcon() -> UIImage? { + let calendar = NSCalendar(calendarIdentifier: .gregorian) + if let dayOfYear = calendar?.ordinality(of: .day, in: .year, for: Date()) { + return dayOfYear >= 354 ? UIImage(named: "vlc-xmas") : UIImage(named: "menuCone") + } + return nil + } + + //MARK - VLCMediaViewControllerDelegate + func mediaViewControllerDidSelectMediaObject(_ VLCMediaViewController: VLCMediaViewController, mediaObject: NSManagedObject) { + playMedia(media:mediaObject) + } + + func mediaViewControllerDidSelectSort(_ VLCMediaViewController: VLCMediaViewController) { + showSortOptions() + } + + func playMedia(media: NSManagedObject) { + //that should go into a Coordinator itself + let vpc = VLCPlaybackController.sharedInstance() + vpc?.playMediaLibraryObject(media) + } + + func showSortOptions() { + //This should be in a subclass + let sortOptionsAlertController = UIAlertController(title: NSLocalizedString("Sort by",comment: ""), message: nil, preferredStyle: .actionSheet) + let sortByNameAction = UIAlertAction(title: SortOption.alphabetically.localizedDescription, style: .default) { action in + } + let sortBySizeAction = UIAlertAction(title: SortOption.size.localizedDescription, style: .default) { action in + } + let sortbyDateAction = UIAlertAction(title: SortOption.insertonDate.localizedDescription, style: .default) { action in + } + let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel",comment:""), style: .cancel, handler: nil) + sortOptionsAlertController.addAction(sortByNameAction) + sortOptionsAlertController.addAction(sortbyDateAction) + sortOptionsAlertController.addAction(sortBySizeAction) + sortOptionsAlertController.addAction(cancelAction) + sortOptionsAlertController.view.tintColor = UIColor.vlcOrangeTint() + tabBarController.present(sortOptionsAlertController, animated: true) + } +} diff --git a/Sources/VLCWiFiUploadTableViewCell.h b/Sources/VLCWiFiUploadTableViewCell.h index 9d9cb2c73..31958e5ec 100644 --- a/Sources/VLCWiFiUploadTableViewCell.h +++ b/Sources/VLCWiFiUploadTableViewCell.h @@ -15,5 +15,6 @@ @interface VLCWiFiUploadTableViewCell : UITableViewCell - (void)toggleHTTPServer; ++ (NSString *)cellIdentifier; @end diff --git a/Sources/VLCWiFiUploadTableViewCell.m b/Sources/VLCWiFiUploadTableViewCell.m index 200492b29..49b3e4dd7 100644 --- a/Sources/VLCWiFiUploadTableViewCell.m +++ b/Sources/VLCWiFiUploadTableViewCell.m @@ -40,7 +40,11 @@ - (void)dealloc { [self.reachability stopNotifier]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + ++ (NSString *)cellIdentifier +{ + return @"VLCWiFiUploadTableViewCell"; } - (void)setupCell diff --git a/VLC-iOS-Bridging-Header.h b/VLC-iOS-Bridging-Header.h index a9ab5316e..18f59557f 100644 --- a/VLC-iOS-Bridging-Header.h +++ b/VLC-iOS-Bridging-Header.h @@ -1,11 +1,21 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// - #import <MediaLibraryKit/MediaLibraryKit.h> -#import "VLCPlaylistTableViewCell.h" -#import "VLCMediaDataSource.h" -#import "VLCLibraryViewController.h" +#import <MobileVLCKit/MobileVLCKit.h> #import <PAPasscode/PAPasscodeViewController.h> #import <XKKeychain/XKKeychain.h> + +#import "UIColor+Presets.h" +#import "VLCAboutViewController.h" +#import "VLCCloudServicesTableViewController.h" #import "VLCConstants.h" +#import "VLCDownloadViewController.h" +#import "VLCLibrarySearchDisplayDataSource.h" +#import "VLCMediaDataSource.h" +#import "VLCOpenNetworkStreamViewController.h" +#import "VLCPlaybackController+MediaLibrary.h" +#import "VLCPlaybackNavigationController.h" +#import "VLCPlayerDisplayController.h" +#import "VLCPlaylistTableViewCell.h" +#import "VLCPlaylistCollectionViewCell.h" +#import "VLCServerListViewController.h" +#import "VLCSettingsController.h" +#import "VLCWiFiUploadTableViewCell.h" diff --git a/VLC.xcodeproj/project.pbxproj b/VLC.xcodeproj/project.pbxproj index c5cf861b5..07c7eed08 100644 --- a/VLC.xcodeproj/project.pbxproj +++ b/VLC.xcodeproj/project.pbxproj @@ -11,12 +11,14 @@ 26F1BFD01A770408001DF30C /* libMediaVLC.xml in Resources */ = {isa = PBXBuildFile; fileRef = 26F1BFCF1A770408001DF30C /* libMediaVLC.xml */; }; 29125E5617492219003F03E5 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 29125E5417492219003F03E5 /* index.html */; }; 2915544317490D4A00B86CAD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2915544217490D4A00B86CAD /* Security.framework */; }; + 41251ED01FD0CF7900099110 /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41251ECE1FD0CF7900099110 /* AppCoordinator.swift */; }; 41273A3C1A955C4100A2EF77 /* VLCMigrationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41273A3A1A955C4100A2EF77 /* VLCMigrationViewController.m */; }; 41273A3D1A955C4100A2EF77 /* VLCMigrationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 41273A3B1A955C4100A2EF77 /* VLCMigrationViewController.xib */; }; - 412BE7531FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412BE7521FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift */; }; + 413EC987201A329D00BF412F /* SortOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413EC986201A329D00BF412F /* SortOption.swift */; }; + 413EC98B201B4F2C00BF412F /* PresentationTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413EC98A201B4F2B00BF412F /* PresentationTheme.swift */; }; + 414396C22023316C005E3FAF /* AppearanceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 414396C12023316C005E3FAF /* AppearanceManager.swift */; }; 4144C4661A0ED6C700918C89 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784E6183A99E1009EE944 /* Reachability.m */; }; 4152F1621FEF19BD00F1908B /* KeychainCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4152F1611FEF19BD00F1908B /* KeychainCoordinator.swift */; }; - 416DEFF61FEEA76A00F4FC59 /* LayoutAnchorContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */; }; 4171D35018A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4171D34F18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m */; }; 417CDA231A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 417CDA211A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m */; }; 417CDA241A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */; }; @@ -28,6 +30,13 @@ 417E68B91F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m in Sources */ = {isa = PBXBuildFile; fileRef = 417E68B81F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m */; }; 4184AA151A5492070063DF5A /* VLCCloudStorageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4184AA141A5492070063DF5A /* VLCCloudStorageController.m */; }; 4187112B1F78F87200317B1A /* VLC_for_iOSTestVideoCodecs.m in Sources */ = {isa = PBXBuildFile; fileRef = 4187112A1F78F87200317B1A /* VLC_for_iOSTestVideoCodecs.m */; }; + 418B144720179C00000447AA /* MediaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144620179C00000447AA /* MediaViewController.swift */; }; + 418B144D20179C75000447AA /* VLCTabBarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144C20179C74000447AA /* VLCTabBarCoordinator.swift */; }; + 418B145020179CB9000447AA /* LayoutAnchorContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */; }; + 418B145620179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B145520179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift */; }; + 418B145920179E50000447AA /* VLCDragAndDropManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B145820179E50000447AA /* VLCDragAndDropManager.swift */; }; + 4195747D206A92ED00393A42 /* RemoteNetworkDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4195747C206A92ED00393A42 /* RemoteNetworkDataSource.swift */; }; + 419794C3206B9E7A009E081A /* MediaDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 419794C2206B9E7A009E081A /* MediaDataSource.swift */; }; 419A2C661F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; }; 419A2C671F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; }; 419A2C681F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; }; @@ -36,7 +45,6 @@ 41B93C011A53833B00102E8B /* VLCProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 41B93C001A53833B00102E8B /* VLCProgressView.m */; }; 41B93C051A53835300102E8B /* VLCCloudServiceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 41B93C031A53835300102E8B /* VLCCloudServiceCell.m */; }; 41B93C081A53853B00102E8B /* VLCCloudServiceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 41B93C071A53853B00102E8B /* VLCCloudServiceCell.xib */; }; - 41BBF9101FC31A8E003A72CB /* VLCDragAndDropManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41BBF90F1FC31A8E003A72CB /* VLCDragAndDropManager.swift */; }; 41CD695C1A29D72600E60BCE /* VLCBoxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD69591A29D72600E60BCE /* VLCBoxController.m */; }; 41CD695D1A29D72600E60BCE /* VLCBoxTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD695B1A29D72600E60BCE /* VLCBoxTableViewController.m */; }; 41EB91D71F7BE6F500821AA5 /* VLCRemoteControlService.m in Sources */ = {isa = PBXBuildFile; fileRef = 417D7F5F1F7BA26200DDF36A /* VLCRemoteControlService.m */; }; @@ -138,7 +146,7 @@ 7D3CF7C42050265B00FA0C1F /* VLCFirstStepsFifthPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DC19B031868D1C400810BF7 /* VLCFirstStepsFifthPageViewController.m */; }; 7D3CF7C52050265B00FA0C1F /* VLCNetworkServerBrowserFTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEF61BDEBCE500B68579 /* VLCNetworkServerBrowserFTP.m */; }; 7D3CF7C62050265B00FA0C1F /* VLCFrostedGlasView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BADAF44185FBD9D00108BD8 /* VLCFrostedGlasView.m */; }; - 7D3CF7C72050265B00FA0C1F /* VLCDragAndDropManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41BBF90F1FC31A8E003A72CB /* VLCDragAndDropManager.swift */; }; + 7D3CF7C72050265B00FA0C1F /* (null) in Sources */ = {isa = PBXBuildFile; }; 7D3CF7C82050265B00FA0C1F /* VLCTimeNavigationTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDC10BE31AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m */; }; 7D3CF7C92050265B00FA0C1F /* VLCNetworkLoginViewFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DD870E991CEF929A00BBD4FE /* VLCNetworkLoginViewFieldCell.m */; }; 7D3CF7CA2050265B00FA0C1F /* VLCNetworkImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EAC031BE153B4003668DA /* VLCNetworkImageView.m */; }; @@ -460,7 +468,6 @@ 9BADAF45185FBD9D00108BD8 /* VLCFrostedGlasView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BADAF44185FBD9D00108BD8 /* VLCFrostedGlasView.m */; }; 9BE4D1CE183D76950006346C /* VLCCloudStorageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784B0183A990F009EE944 /* VLCCloudStorageTableViewCell.m */; }; A79246C8170F11DF0036AAF2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A79246C6170F11DF0036AAF2 /* Localizable.strings */; }; - B262D8FBA3AAD4441B38B401 /* libPods-VLC-iOS-no-watch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DD533B1D45EEA70099433D8 /* libPods-VLC-iOS-no-watch.a */; }; CC1BBC461704938300A20CBF /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1BBC451704938300A20CBF /* libiconv.dylib */; }; CC1BBC4C1704939B00A20CBF /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1BBC4B1704939B00A20CBF /* libsqlite3.dylib */; }; CC1BBC4E170493A300A20CBF /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1BBC4D170493A300A20CBF /* libbz2.dylib */; }; @@ -589,6 +596,7 @@ DDF908E01CF4E04A00108B70 /* VLCNetworkLoginDataSourceSavedLogins.m in Sources */ = {isa = PBXBuildFile; fileRef = DDF908DF1CF4E04A00108B70 /* VLCNetworkLoginDataSourceSavedLogins.m */; }; DDF908E41CFCD97400108B70 /* VLCNetworkLoginDataSourceProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = DDF908E31CFCD97400108B70 /* VLCNetworkLoginDataSourceProtocol.m */; }; E0C04F951A25B4410080331A /* VLCDocumentPickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E0C04F941A25B4410080331A /* VLCDocumentPickerController.m */; }; + F05B5506E9C799574711E71B /* libPods-VLC-iOS-no-watch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DD533B1D45EEA70099433D8 /* libPods-VLC-iOS-no-watch.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -737,10 +745,15 @@ 3C12F87F27BDCE3D0A58354E /* Pods-VLC-iOS-no-watch-Debug.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-iOS-no-watch-Debug.debug.xcconfig"; path = "Pods/Target Support Files/Pods-VLC-iOS-no-watch-Debug/Pods-VLC-iOS-no-watch-Debug.debug.xcconfig"; sourceTree = "<group>"; }; 3DD533B1D45EEA70099433D8 /* libPods-VLC-iOS-no-watch.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VLC-iOS-no-watch.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 402E6F0E5362B530B7909338 /* libPods-VLC-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VLC-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 41251ECB1FD0C5C100099110 /* VLC-iOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VLC-iOS-Bridging-Header.h"; sourceTree = SOURCE_ROOT; }; + 41251ECE1FD0CF7900099110 /* AppCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppCoordinator.swift; path = SharedSources/Coordinators/AppCoordinator.swift; sourceTree = SOURCE_ROOT; }; 41273A391A955C4100A2EF77 /* VLCMigrationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCMigrationViewController.h; path = Sources/VLCMigrationViewController.h; sourceTree = SOURCE_ROOT; }; 41273A3A1A955C4100A2EF77 /* VLCMigrationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCMigrationViewController.m; path = Sources/VLCMigrationViewController.m; sourceTree = SOURCE_ROOT; }; 41273A3B1A955C4100A2EF77 /* VLCMigrationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCMigrationViewController.xib; path = Sources/VLCMigrationViewController.xib; sourceTree = SOURCE_ROOT; }; 412BE7521FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "VLCMediaData+VLCDragAndDrop.swift"; path = "Sources/VLCMediaData+VLCDragAndDrop.swift"; sourceTree = SOURCE_ROOT; }; + 413EC986201A329D00BF412F /* SortOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SortOption.swift; path = SharedSources/Coordinators/SortOption.swift; sourceTree = SOURCE_ROOT; }; + 413EC98A201B4F2B00BF412F /* PresentationTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresentationTheme.swift; sourceTree = "<group>"; }; + 414396C12023316C005E3FAF /* AppearanceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppearanceManager.swift; path = Sources/AppearanceManager.swift; sourceTree = SOURCE_ROOT; }; 4152F1611FEF19BD00F1908B /* KeychainCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = KeychainCoordinator.swift; path = Sources/KeychainCoordinator.swift; sourceTree = "<group>"; }; 416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; }; 4171D34E18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCFolderCollectionViewFlowLayout.h; path = Sources/VLCFolderCollectionViewFlowLayout.h; sourceTree = SOURCE_ROOT; }; @@ -800,6 +813,13 @@ 4184AA131A5492070063DF5A /* VLCCloudStorageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCCloudStorageController.h; path = Sources/VLCCloudStorageController.h; sourceTree = SOURCE_ROOT; }; 4184AA141A5492070063DF5A /* VLCCloudStorageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCCloudStorageController.m; path = Sources/VLCCloudStorageController.m; sourceTree = SOURCE_ROOT; }; 4187112A1F78F87200317B1A /* VLC_for_iOSTestVideoCodecs.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLC_for_iOSTestVideoCodecs.m; sourceTree = "<group>"; }; + 418B144620179C00000447AA /* MediaViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaViewController.swift; path = Sources/MediaViewController.swift; sourceTree = SOURCE_ROOT; }; + 418B144C20179C74000447AA /* VLCTabBarCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VLCTabBarCoordinator.swift; path = Sources/VLCTabBarCoordinator.swift; sourceTree = SOURCE_ROOT; }; + 418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; }; + 418B145520179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "VLCMediaData+VLCDragAndDrop.swift"; path = "Sources/VLCMediaData+VLCDragAndDrop.swift"; sourceTree = "<group>"; }; + 418B145820179E50000447AA /* VLCDragAndDropManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VLCDragAndDropManager.swift; path = Sources/VLCDragAndDropManager.swift; sourceTree = "<group>"; }; + 4195747C206A92ED00393A42 /* RemoteNetworkDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteNetworkDataSource.swift; sourceTree = "<group>"; }; + 419794C2206B9E7A009E081A /* MediaDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaDataSource.swift; sourceTree = "<group>"; }; 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCStringsForLocalization.m; sourceTree = "<group>"; }; 419D7F041F54176900AF69A2 /* VLCTimeNavigationTitleView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = VLCTimeNavigationTitleView.xib; path = Resources/VLCTimeNavigationTitleView.xib; sourceTree = SOURCE_ROOT; }; 41B0BC861F73ED7D0063BA26 /* VLC for iOSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "VLC for iOSUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -811,8 +831,6 @@ 41B93C031A53835300102E8B /* VLCCloudServiceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCCloudServiceCell.m; path = Sources/VLCCloudServiceCell.m; sourceTree = SOURCE_ROOT; }; 41B93C071A53853B00102E8B /* VLCCloudServiceCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCCloudServiceCell.xib; path = Resources/VLCCloudServiceCell.xib; sourceTree = SOURCE_ROOT; }; 41BBDCBC1F3BAD2E00B89A9C /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; }; - 41BBF90E1FC31A8E003A72CB /* VLC-iOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VLC-iOS-Bridging-Header.h"; sourceTree = "<group>"; }; - 41BBF90F1FC31A8E003A72CB /* VLCDragAndDropManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = VLCDragAndDropManager.swift; path = SharedSources/VLCDragAndDropManager.swift; sourceTree = SOURCE_ROOT; }; 41CD69571A29D72600E60BCE /* VLCBoxConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCBoxConstants.h; path = Sources/VLCBoxConstants.h; sourceTree = SOURCE_ROOT; }; 41CD69581A29D72600E60BCE /* VLCBoxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCBoxController.h; path = Sources/VLCBoxController.h; sourceTree = SOURCE_ROOT; }; 41CD69591A29D72600E60BCE /* VLCBoxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCBoxController.m; path = Sources/VLCBoxController.m; sourceTree = SOURCE_ROOT; }; @@ -1496,7 +1514,7 @@ 7D3CF84A2050265B00FA0C1F /* Foundation.framework in Frameworks */, 7D3CF84B2050265B00FA0C1F /* CoreGraphics.framework in Frameworks */, 7D3CF84C2050265B00FA0C1F /* libPods-VLC-iOS.a in Frameworks */, - B262D8FBA3AAD4441B38B401 /* libPods-VLC-iOS-no-watch.a in Frameworks */, + F05B5506E9C799574711E71B /* libPods-VLC-iOS-no-watch.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1585,10 +1603,23 @@ DD35678F1B6761CD00338947 /* WatchConnectivity.framework */, DD35678B1B67619700338947 /* WatchKit.framework */, DD3567891B67618F00338947 /* CoreData.framework */, + 416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */, + 412BE7521FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift */, ); name = "Recovered References"; sourceTree = "<group>"; }; + 415163B01FD0AEC700161354 /* Coordinators */ = { + isa = PBXGroup; + children = ( + 41251ECE1FD0CF7900099110 /* AppCoordinator.swift */, + 418B144C20179C74000447AA /* VLCTabBarCoordinator.swift */, + 413EC986201A329D00BF412F /* SortOption.swift */, + 414396C12023316C005E3FAF /* AppearanceManager.swift */, + ); + path = Coordinators; + sourceTree = "<group>"; + }; 41B0BC871F73ED7D0063BA26 /* VLC for iOSUITests */ = { isa = PBXGroup; children = ( @@ -1751,6 +1782,7 @@ DD3EFEEA1BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.m */, DD3EFEEB1BDEBA3800B68579 /* VLCServerListViewController.h */, DD3EFEEC1BDEBA3800B68579 /* VLCServerListViewController.m */, + 4195747C206A92ED00393A42 /* RemoteNetworkDataSource.swift */, ); name = "Local Network Connectivity"; path = Sources/LocalNetworkConnectivity; @@ -1864,6 +1896,9 @@ 7D5F7AB81752658E006CCCFA /* Everything Playlist */ = { isa = PBXGroup; children = ( + 418B145520179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift */, + 418B145820179E50000447AA /* VLCDragAndDropManager.swift */, + 41251ECB1FD0C5C100099110 /* VLC-iOS-Bridging-Header.h */, 4171D34E18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.h */, 4171D34F18A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m */, 7D378493183A98D1009EE944 /* VLCPlaylistCollectionViewCell.h */, @@ -1878,9 +1913,6 @@ 41F5C0771F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m */, 41F5C0791F42E567005EB9CB /* VLCMediaDataSource.h */, 41F5C07A1F42E567005EB9CB /* VLCMediaDataSource.m */, - 41BBF90F1FC31A8E003A72CB /* VLCDragAndDropManager.swift */, - 41BBF90E1FC31A8E003A72CB /* VLC-iOS-Bridging-Header.h */, - 412BE7521FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift */, ); name = "Everything Playlist"; sourceTree = "<group>"; @@ -2072,6 +2104,7 @@ 7D94FCE416DE7D1000F2623B /* iOS specific classes */ = { isa = PBXGroup; children = ( + 415163B01FD0AEC700161354 /* Coordinators */, 41273A391A955C4100A2EF77 /* VLCMigrationViewController.h */, 41273A3A1A955C4100A2EF77 /* VLCMigrationViewController.m */, 7D6B08BB174A72A900A05173 /* VLCConstants.h */, @@ -2265,10 +2298,12 @@ 7DEC8BE11BD686FA006E1093 /* Library */ = { isa = PBXGroup; children = ( + 418B144620179C00000447AA /* MediaViewController.swift */, 7D37849C183A98DD009EE944 /* VLCThumbnailsCache.h */, 7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */, DD7110EE1AF38B2B00854776 /* MLMediaLibrary+playlist.h */, DD7110EF1AF38B2B00854776 /* MLMediaLibrary+playlist.m */, + 419794C2206B9E7A009E081A /* MediaDataSource.swift */, ); name = Library; sourceTree = "<group>"; @@ -2284,6 +2319,7 @@ DD13A37A1BEE2FAA00A35554 /* VLCMaskView.m */, DD4089F31BF6556F0022745E /* VLCFullWidthCollectionViewFlowLayout.h */, DD4089F41BF6556F0022745E /* VLCFullWidthCollectionViewFlowLayout.m */, + 413EC98A201B4F2B00BF412F /* PresentationTheme.swift */, ); name = "UI Elements"; sourceTree = "<group>"; @@ -2493,6 +2529,7 @@ A7C3025A175A538700AD4388 /* Extensions */ = { isa = PBXGroup; children = ( + 418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */, 7D3784C4183A9972009EE944 /* NSString+SupportedMedia.h */, 7D3784C5183A9972009EE944 /* NSString+SupportedMedia.m */, 7D3784C6183A9972009EE944 /* UIDevice+VLC.h */, @@ -2503,7 +2540,6 @@ 7DF9352E1958AB0600E60FD4 /* UIColor+Presets.m */, 7DEBF37D1C076ECE007A4043 /* NSString+Locale.h */, 7DEBF37E1C076EE8007A4043 /* NSString+Locale.m */, - 416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */, ); name = Extensions; sourceTree = "<group>"; @@ -2951,6 +2987,7 @@ 7D13293C1BA1F10100BE647E = { CreatedOnToolsVersion = 7.1; DevelopmentTeam = 75GAHG3SZQ; + LastSwiftMigration = 0920; SystemCapabilities = { com.apple.BackgroundModes.appletvos = { enabled = 1; @@ -2969,7 +3006,6 @@ 7D94FCDA16DE7D1000F2623B = { DevelopmentTeam = 75GAHG3SZQ; LastSwiftMigration = 0920; - ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { enabled = 1; @@ -2985,6 +3021,7 @@ DD3567631B6760BF00338947 = { CreatedOnToolsVersion = 7.0; DevelopmentTeam = 75GAHG3SZQ; + LastSwiftMigration = 0920; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { enabled = 1; @@ -3799,7 +3836,7 @@ 7D3CF7C42050265B00FA0C1F /* VLCFirstStepsFifthPageViewController.m in Sources */, 7D3CF7C52050265B00FA0C1F /* VLCNetworkServerBrowserFTP.m in Sources */, 7D3CF7C62050265B00FA0C1F /* VLCFrostedGlasView.m in Sources */, - 7D3CF7C72050265B00FA0C1F /* VLCDragAndDropManager.swift in Sources */, + 7D3CF7C72050265B00FA0C1F /* (null) in Sources */, 7D3CF7C82050265B00FA0C1F /* VLCTimeNavigationTitleView.m in Sources */, 7D3CF7C92050265B00FA0C1F /* VLCNetworkLoginViewFieldCell.m in Sources */, 7D3CF7CA2050265B00FA0C1F /* VLCNetworkImageView.m in Sources */, @@ -3912,8 +3949,10 @@ files = ( 4144C4661A0ED6C700918C89 /* Reachability.m in Sources */, DD846BDF1D1FCCCD00699D17 /* VLCNetworkLoginDataSource.m in Sources */, + 41251ED01FD0CF7900099110 /* AppCoordinator.swift in Sources */, 4184AA151A5492070063DF5A /* VLCCloudStorageController.m in Sources */, 9BE4D1CE183D76950006346C /* VLCCloudStorageTableViewCell.m in Sources */, + 413EC98B201B4F2C00BF412F /* PresentationTheme.swift in Sources */, 41F5C07B1F42E567005EB9CB /* VLCMediaDataSource.m in Sources */, DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelView.m in Sources */, DDF908D01CF4CCAA00108B70 /* VLCNetworkLoginViewButtonCell.m in Sources */, @@ -3932,16 +3971,19 @@ 7DC19B051868D1C400810BF7 /* VLCFirstStepsFifthPageViewController.m in Sources */, DD3EFF311BDEBCE500B68579 /* VLCNetworkServerBrowserFTP.m in Sources */, 9BADAF45185FBD9D00108BD8 /* VLCFrostedGlasView.m in Sources */, - 41BBF9101FC31A8E003A72CB /* VLCDragAndDropManager.swift in Sources */, DDC10BE41AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m in Sources */, DD870E9A1CEF929A00BBD4FE /* VLCNetworkLoginViewFieldCell.m in Sources */, + 418B145620179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift in Sources */, + 4195747D206A92ED00393A42 /* RemoteNetworkDataSource.swift in Sources */, DD3EAC041BE153B4003668DA /* VLCNetworkImageView.m in Sources */, E0C04F951A25B4410080331A /* VLCDocumentPickerController.m in Sources */, DD2789E21B67A7BE00CED769 /* VLCWatchCommunication.m in Sources */, DDF908E01CF4E04A00108B70 /* VLCNetworkLoginDataSourceSavedLogins.m in Sources */, DD3EFF351BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserNetService.m in Sources */, + 413EC987201A329D00BF412F /* SortOption.swift in Sources */, 41B93C011A53833B00102E8B /* VLCProgressView.m in Sources */, 417CDA231A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m in Sources */, + 418B145920179E50000447AA /* VLCDragAndDropManager.swift in Sources */, 7D168F7418D4A33F003FAF59 /* UIImage+Blur.m in Sources */, 7DC19ADF1868C7BB00810BF7 /* VLCFirstStepsViewController.m in Sources */, DD3EFF331BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserMediaDiscoverer.m in Sources */, @@ -3958,6 +4000,7 @@ 41F9BC7C1F4F20E400268461 /* VLCTrackSelectorView.m in Sources */, 7D378499183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m in Sources */, DD8F84311B00EB3B0009138A /* VLCPlaybackController+MediaLibrary.m in Sources */, + 418B144720179C00000447AA /* MediaViewController.swift in Sources */, 41EB91DD1F7BFF8500821AA5 /* VLCMetadata.m in Sources */, DD3EFF551BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserDSM.m in Sources */, 7D37849A183A98D1009EE944 /* VLCPlaylistTableViewCell.m in Sources */, @@ -3978,6 +4021,7 @@ 41F5C0781F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m in Sources */, 7D50903218F41C7900180139 /* VLCAlertView.m in Sources */, 7DBBF182183AB3B80009A339 /* VLCAppDelegate.m in Sources */, + 418B145020179CB9000447AA /* LayoutAnchorContainer.swift in Sources */, 7D3784C0183A9938009EE944 /* VLCLinearProgressIndicator.m in Sources */, DD3EA6311AF50CFE007FF096 /* VLCWatchMessage.m in Sources */, 41CD695D1A29D72600E60BCE /* VLCBoxTableViewController.m in Sources */, @@ -3990,12 +4034,13 @@ 7D3784C8183A9972009EE944 /* NSString+SupportedMedia.m in Sources */, 417E68B91F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m in Sources */, DD3EFF5B1BDEBCE500B68579 /* VLCNetworkServerBrowserUPnP.m in Sources */, + 419794C3206B9E7A009E081A /* MediaDataSource.swift in Sources */, + 418B144D20179C75000447AA /* VLCTabBarCoordinator.swift in Sources */, DD3EABF81BE14BD6003668DA /* BasicUPnPDevice+VLC.m in Sources */, DD3EAC091BE2192A003668DA /* VLCServerBrowsingController.m in Sources */, 7D3784C9183A9972009EE944 /* UIDevice+VLC.m in Sources */, DDEAECCD1BDECCB800756C83 /* VLCNetworkListViewController.m in Sources */, 7D3784E9183A9A15009EE944 /* main.m in Sources */, - 416DEFF61FEEA76A00F4FC59 /* LayoutAnchorContainer.swift in Sources */, 7D30F3C2183AB24C00FFC021 /* VLCHTTPConnection.m in Sources */, DD3EFF371BDEBCE500B68579 /* VLCLocalNetworkServiceNetService.m in Sources */, DD3EFF511BDEBCE500B68579 /* VLCPlexWebAPI.m in Sources */, @@ -4012,7 +4057,6 @@ 7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */, DDEAECC61BDEC79D00756C83 /* VLCLocalNetworkServiceBrowserSAP.m in Sources */, DD3EFF491BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserPlex.m in Sources */, - 412BE7531FC4947400ACCC42 /* VLCMediaData+VLCDragAndDrop.swift in Sources */, 7D30F3CD183AB29300FFC021 /* VLCMenuTableViewController.m in Sources */, DD3EFF571BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserUPnP.m in Sources */, 7D9CB9DC1A4C55EF00BB74B4 /* VLCPlaybackNavigationController.m in Sources */, @@ -4024,6 +4068,7 @@ DD3EFF591BDEBCE500B68579 /* VLCLocalNetworkServiceUPnP.m in Sources */, 7D30F3D7183AB2F100FFC021 /* VLCNetworkListCell.m in Sources */, 7D1052EE1A4DCD1E00295F08 /* VLCOneDriveController.m in Sources */, + 414396C22023316C005E3FAF /* AppearanceManager.swift in Sources */, 7DAE0C371B2EF85B00C53996 /* VLCSidebarController.m in Sources */, 7D30F3DC183AB2F900FFC021 /* VLCNetworkLoginViewController.m in Sources */, 419A2C661F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */, @@ -4404,6 +4449,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.2; }; @@ -4445,6 +4492,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = appletvos; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.2; }; @@ -4486,6 +4534,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = appletvos; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.2; }; @@ -4533,6 +4582,7 @@ PROVISIONING_PROFILE = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "VLC-iOS-Bridging-Header.h"; + SWIFT_VERSION = 4.0; VALID_ARCHS = "arm64 armv7 armv7s"; }; name = Debug; @@ -4579,6 +4629,7 @@ "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "VLC-iOS-Bridging-Header.h"; + SWIFT_VERSION = 4.0; VALID_ARCHS = "arm64 armv7 armv7s"; }; name = Release; @@ -4662,7 +4713,6 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_MODULE_NAME = VLC_iOS; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s"; @@ -4725,7 +4775,6 @@ EXCLUDED_SOURCE_FILE_NAMES = ""; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_ENABLE_CPP_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Sources/VLC for iOS-Prefix.pch"; INFOPLIST_FILE = "Sources/VLC for iOS-Info.plist"; @@ -4742,6 +4791,7 @@ PROVISIONING_PROFILE = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "VLC-iOS-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; VALID_ARCHS = "arm64 armv7 armv7s"; }; name = Debug; @@ -4787,6 +4837,7 @@ "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "VLC-iOS-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; VALID_ARCHS = "arm64 armv7 armv7s"; }; name = Release; @@ -4864,6 +4915,8 @@ "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SKIP_INSTALL = NO; SWIFT_OBJC_BRIDGING_HEADER = "VLC-iOS-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; VALID_ARCHS = "arm64 armv7 armv7s"; }; name = Distribution; @@ -4893,12 +4946,15 @@ GCC_WARN_UNUSED_FUNCTION = YES; IBSC_MODULE = watchkitapp_Extension; INFOPLIST_FILE = "VLC WatchKit Native/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER_PREFIX}.vlc-ios.watchkitapp"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -4930,12 +4986,14 @@ GCC_WARN_UNUSED_FUNCTION = YES; IBSC_MODULE = watchkitapp_Extension; INFOPLIST_FILE = "VLC WatchKit Native/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER_PREFIX}.vlc-ios.watchkitapp"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -4967,12 +5025,14 @@ GCC_WARN_UNUSED_FUNCTION = YES; IBSC_MODULE = watchkitapp_Extension; INFOPLIST_FILE = "VLC WatchKit Native/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER_PREFIX}.vlc-ios.watchkitapp"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; diff --git a/vlc-ios/Images.xcassets/cloudServices/Box.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/Box.imageset/Contents.json index 4cc679d14..f108647b8 100644 --- a/vlc-ios/Images.xcassets/cloudServices/Box.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/Box.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "Box.png" + "filename" : "Box.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "Box@2x.png" + "filename" : "Box@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "Box@3x.png" + "filename" : "Box@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/Drive.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/Drive.imageset/Contents.json index 11647bc26..a26fa9211 100644 --- a/vlc-ios/Images.xcassets/cloudServices/Drive.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/Drive.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "Drive.png" + "filename" : "Drive.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "Drive@2x.png" + "filename" : "Drive@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "Drive@3x.png" + "filename" : "Drive@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/DriveWhite.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/DriveWhite.imageset/Contents.json index 9756505a3..bf7433c40 100644 --- a/vlc-ios/Images.xcassets/cloudServices/DriveWhite.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/DriveWhite.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "DriveWhite.png" + "filename" : "DriveWhite.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "DriveWhite@2x.png" + "filename" : "DriveWhite@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "DriveWhite@3x.png" + "filename" : "DriveWhite@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/Dropbox.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/Dropbox.imageset/Contents.json index 711ac31fb..bc72bc218 100644 --- a/vlc-ios/Images.xcassets/cloudServices/Dropbox.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/Dropbox.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "Dropbox.png" + "filename" : "Dropbox.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "Dropbox@2x.png" + "filename" : "Dropbox@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "Dropbox@3x.png" + "filename" : "Dropbox@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/OneDrive.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/OneDrive.imageset/Contents.json index 209fa0588..c9ab98cc0 100644 --- a/vlc-ios/Images.xcassets/cloudServices/OneDrive.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/OneDrive.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "OneDrive.png" + "filename" : "OneDrive.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "OneDrive@2x.png" + "filename" : "OneDrive@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "OneDrive@3x.png" + "filename" : "OneDrive@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/OneDriveWhite.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/OneDriveWhite.imageset/Contents.json index 37ba992a5..361ecaeab 100644 --- a/vlc-ios/Images.xcassets/cloudServices/OneDriveWhite.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/OneDriveWhite.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "OneDriveWhite.png" + "filename" : "OneDriveWhite.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "OneDriveWhite@2x.png" + "filename" : "OneDriveWhite@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "OneDriveWhite@3x.png" + "filename" : "OneDriveWhite@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/dropbox-white.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/dropbox-white.imageset/Contents.json index 793510bd1..1cd5187a9 100644 --- a/vlc-ios/Images.xcassets/cloudServices/dropbox-white.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/dropbox-white.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "dropbox-white.png" + "filename" : "dropbox-white.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "dropbox-white@2x.png" + "filename" : "dropbox-white@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "dropbox-white@3x.png" + "filename" : "dropbox-white@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/iCloud.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/iCloud.imageset/Contents.json index 52bc133b9..76e24eb69 100644 --- a/vlc-ios/Images.xcassets/cloudServices/iCloud.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/iCloud.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "iCloud.png" + "filename" : "iCloud.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "iCloud@2x.png" + "filename" : "iCloud@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "iCloud@3x.png" + "filename" : "iCloud@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/vlc-ios/Images.xcassets/cloudServices/iCloudIcon.imageset/Contents.json b/vlc-ios/Images.xcassets/cloudServices/iCloudIcon.imageset/Contents.json index 280cbd82c..86b2425ac 100644 --- a/vlc-ios/Images.xcassets/cloudServices/iCloudIcon.imageset/Contents.json +++ b/vlc-ios/Images.xcassets/cloudServices/iCloudIcon.imageset/Contents.json @@ -2,22 +2,25 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x", - "filename" : "iCloudIcon.png" + "filename" : "iCloudIcon.png", + "scale" : "1x" }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "iCloudIcon@2x.png" + "filename" : "iCloudIcon@2x.png", + "scale" : "2x" }, { "idiom" : "universal", - "scale" : "3x", - "filename" : "iCloudIcon@3x.png" + "filename" : "iCloudIcon@3x.png", + "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file -- GitLab