ソースを参照

VLCMovieViewcontroller: move navigationbar into Movieviewcontroller to use autolayoutconstraints and use the presenting navigationbar instead of creating a new one. This removes a lot of unnecessary code and fixes an issue where the navigation bar was colliding with the statusbar (closes #34)

Carola Nitz 7 年 前
コミット
857f410d49

+ 2 - 102
Resources/VLCMovieViewController~ipad.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="13178.6" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13156.2"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -17,7 +17,6 @@
                 <outlet property="audioDelayIndicator" destination="FYO-Rd-Vjg" id="FVE-DI-BJ2"/>
                 <outlet property="audioDelayLabel" destination="bQc-dz-mB8" id="69P-Q3-3l3"/>
                 <outlet property="audioDelaySlider" destination="ahb-li-nqH" id="tQp-Zu-Sqd"/>
-                <outlet property="backButton" destination="102" id="111"/>
                 <outlet property="brightnessLabel" destination="148" id="165"/>
                 <outlet property="brightnessSlider" destination="147" id="163"/>
                 <outlet property="contrastLabel" destination="146" id="160"/>
@@ -45,97 +44,12 @@
                 <outlet property="spuDelayLabel" destination="NX8-Zc-K6Y" id="WLd-cA-fUn"/>
                 <outlet property="spuDelaySlider" destination="juX-HR-PqD" id="x4D-ki-Lwk"/>
                 <outlet property="statusLabel" destination="205" id="206"/>
-                <outlet property="timeNavigationTitleView" destination="248" id="Ghx-eD-EQA"/>
-                <outlet property="toolbar" destination="256" id="260"/>
                 <outlet property="trackNameLabel" destination="304" id="307"/>
                 <outlet property="videoFilterView" destination="141" id="156"/>
                 <outlet property="view" destination="8" id="120"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <barButtonItem systemItem="done" id="102">
-            <connections>
-                <action selector="closePlayback:" destination="-1" id="134"/>
-            </connections>
-        </barButtonItem>
-        <view contentMode="scaleToFill" id="248" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
-            <rect key="frame" x="0.0" y="0.0" width="700" height="40"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-            <subviews>
-                <slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" id="249" userLabel="Position Slider" customClass="VLCOBSlider">
-                    <rect key="frame" x="60" y="6" width="509" height="29"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                    <accessibility key="accessibilityConfiguration">
-                        <accessibilityTraits key="traits" updatesFrequently="YES"/>
-                    </accessibility>
-                    <connections>
-                        <action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="255"/>
-                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="252"/>
-                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="253"/>
-                        <action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="250"/>
-                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="251"/>
-                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="254"/>
-                    </connections>
-                </slider>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="198">
-                    <rect key="frame" x="642" y="6" width="50" height="29"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" image="ratioIcon.png">
-                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="203"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="300">
-                    <rect key="frame" x="571" y="6" width="66" height="30"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" title="--:--">
-                        <color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" 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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="301"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Fcw-5o-IdE">
-                    <rect key="frame" x="10" y="11" width="30" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" image="minimizePlayback">
-                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="jj8-Gc-Fqn"/>
-                    </connections>
-                </button>
-            </subviews>
-            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-            <nil key="simulatedStatusBarMetrics"/>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="aspectRatioButton" destination="198" id="4dl-xe-M16"/>
-                <outlet property="minimizePlaybackButton" destination="Fcw-5o-IdE" id="s26-45-f9b"/>
-                <outlet property="positionSlider" destination="249" id="rvZ-Lz-yG8"/>
-                <outlet property="timeDisplayButton" destination="300" id="t3c-hv-XjU"/>
-            </connections>
-        </view>
         <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="8">
             <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -175,18 +89,6 @@
                         <bool key="isElement" value="YES"/>
                     </accessibility>
                 </view>
-                <navigationBar contentMode="scaleToFill" barStyle="blackTranslucent" id="256">
-                    <rect key="frame" x="0.0" y="18" width="768" height="44"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                    <items>
-                        <navigationItem title="Title" id="257">
-                            <connections>
-                                <outlet property="leftBarButtonItem" destination="102" id="258"/>
-                                <outlet property="titleView" destination="248" id="259"/>
-                            </connections>
-                        </navigationItem>
-                    </items>
-                </navigationBar>
                 <view hidden="YES" contentMode="scaleToFill" id="242" userLabel="Scrubbing info" customClass="VLCFrostedGlasView">
                     <rect key="frame" x="0.0" y="63" width="768" height="46"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
@@ -439,8 +341,6 @@
     </objects>
     <resources>
         <image name="PlayingExternally.png" width="261" height="195"/>
-        <image name="minimizePlayback" width="15" height="5"/>
-        <image name="ratioIcon.png" width="15" height="15"/>
         <image name="resetIcon.png" width="24" height="30"/>
     </resources>
 </document>

+ 2 - 102
Resources/VLCMovieViewController~iphone.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13178.6" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13156.2"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -17,7 +17,6 @@
                 <outlet property="audioDelayIndicator" destination="SDv-JW-DMi" id="Krq-0k-T6o"/>
                 <outlet property="audioDelayLabel" destination="8cb-fw-YeF" id="KWQ-n9-3mr"/>
                 <outlet property="audioDelaySlider" destination="oQe-Uu-1HY" id="6Me-OE-Dpl"/>
-                <outlet property="backButton" destination="85" id="96"/>
                 <outlet property="brightnessLabel" destination="130" id="233"/>
                 <outlet property="brightnessSlider" destination="128" id="232"/>
                 <outlet property="contrastLabel" destination="132" id="141"/>
@@ -45,97 +44,12 @@
                 <outlet property="spuDelayLabel" destination="KeW-Xp-9I6" id="LMS-pz-Ajj"/>
                 <outlet property="spuDelaySlider" destination="JRI-0m-C0M" id="f8j-Iq-sH3"/>
                 <outlet property="statusLabel" destination="210" id="211"/>
-                <outlet property="timeNavigationTitleView" destination="260" id="gcy-M6-dw8"/>
-                <outlet property="toolbar" destination="250" id="272"/>
                 <outlet property="trackNameLabel" destination="282" id="284"/>
                 <outlet property="videoFilterView" destination="117" id="147"/>
                 <outlet property="view" destination="1" id="105"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="260" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
-            <rect key="frame" x="0.0" y="0.0" width="300" height="40"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-            <subviews>
-                <slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" id="262" userLabel="Position Slider" customClass="VLCOBSlider">
-                    <rect key="frame" x="44" y="7" width="148" height="29"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                    <accessibility key="accessibilityConfiguration">
-                        <accessibilityTraits key="traits" updatesFrequently="YES"/>
-                    </accessibility>
-                    <connections>
-                        <action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="263"/>
-                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="266"/>
-                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="268"/>
-                        <action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="267"/>
-                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="264"/>
-                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="265"/>
-                    </connections>
-                </slider>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="202">
-                    <rect key="frame" x="241" y="6" width="59" height="29"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" image="ratioIcon.png">
-                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="221"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="276">
-                    <rect key="frame" x="195" y="7" width="52" height="28"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" title="--:--">
-                        <color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" 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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="278"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="1XT-gb-oGz">
-                    <rect key="frame" x="8" y="11" width="30" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
-                    <state key="normal" image="minimizePlayback">
-                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    </state>
-                    <connections>
-                        <action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="LBk-8c-yjG"/>
-                    </connections>
-                </button>
-            </subviews>
-            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-            <nil key="simulatedStatusBarMetrics"/>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <connections>
-                <outlet property="aspectRatioButton" destination="202" id="IWW-5X-Bf0"/>
-                <outlet property="minimizePlaybackButton" destination="1XT-gb-oGz" id="BAx-Rb-ayD"/>
-                <outlet property="positionSlider" destination="262" id="UPM-uz-5Ix"/>
-                <outlet property="timeDisplayButton" destination="276" id="xvv-Ga-gWA"/>
-            </connections>
-        </view>
-        <barButtonItem systemItem="done" id="85">
-            <connections>
-                <action selector="closePlayback:" destination="-1" id="89"/>
-            </connections>
-        </barButtonItem>
         <view contentMode="scaleToFill" id="1">
             <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -231,18 +145,6 @@
                     </subviews>
                     <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
                 </view>
-                <navigationBar contentMode="scaleToFill" barStyle="blackTranslucent" id="250">
-                    <rect key="frame" x="0.0" y="18" width="320" height="44"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                    <items>
-                        <navigationItem title="Title" id="261">
-                            <connections>
-                                <outlet property="leftBarButtonItem" destination="85" id="270"/>
-                                <outlet property="titleView" destination="260" id="271"/>
-                            </connections>
-                        </navigationItem>
-                    </items>
-                </navigationBar>
                 <view hidden="YES" contentMode="scaleToFill" id="117" userLabel="video filters view" customClass="VLCFrostedGlasView">
                     <rect key="frame" x="0.0" y="342" width="320" height="198"/>
                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -440,8 +342,6 @@
     </objects>
     <resources>
         <image name="PlayingExternally.png" width="122" height="91"/>
-        <image name="minimizePlayback" width="15" height="5"/>
-        <image name="ratioIcon.png" width="15" height="15"/>
         <image name="resetIcon.png" width="24" height="30"/>
     </resources>
 </document>

+ 120 - 0
Resources/VLCTimeNavigationTitleView.xib

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewController">
+            <connections>
+                <outlet property="timeNavigationTitleView" destination="SbC-6V-aXT" id="6H3-z2-IYF"/>
+                <outlet property="widthConstraint" destination="dEx-l7-vH3" id="XHq-1C-HCh"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="SbC-6V-aXT" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
+            <rect key="frame" x="0.0" y="0.0" width="700" height="40"/>
+            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+            <subviews>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sdb-a5-RTT">
+                    <rect key="frame" x="662" y="5" width="30" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="30" id="Ap6-VL-6UH"/>
+                        <constraint firstAttribute="width" constant="30" id="dEx-l7-vH3"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
+                    <state key="normal" image="ratioIcon.png">
+                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <connections>
+                        <action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="evk-ak-iUc"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x1t-3m-s0G">
+                    <rect key="frame" x="618" y="5" width="44" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="30" id="fv5-Cp-MOv"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
+                    <state key="normal" title="--:--">
+                        <color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" 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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <connections>
+                        <action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="EMV-R7-M8p"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SBq-Am-6MD">
+                    <rect key="frame" x="0.0" y="11" width="30" height="18"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="30" id="kLC-QM-zcI"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
+                    <state key="normal" image="minimizePlayback">
+                        <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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <connections>
+                        <action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="wmf-OK-ep3"/>
+                    </connections>
+                </button>
+                <slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="axb-6M-lSX" userLabel="Position Slider" customClass="VLCOBSlider">
+                    <rect key="frame" x="28" y="5" width="584" height="31"/>
+                    <accessibility key="accessibilityConfiguration">
+                        <accessibilityTraits key="traits" updatesFrequently="YES"/>
+                    </accessibility>
+                    <connections>
+                        <action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="7eD-p7-L4J"/>
+                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="MjW-el-bCi"/>
+                        <action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="XGm-Pc-lSQ"/>
+                        <action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="Uv4-iS-P3y"/>
+                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="dhA-x8-HoE"/>
+                        <action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="f6i-U3-Qv6"/>
+                    </connections>
+                </slider>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="Sdb-a5-RTT" firstAttribute="leading" secondItem="x1t-3m-s0G" secondAttribute="trailing" id="1fD-hg-Y99"/>
+                <constraint firstItem="Sdb-a5-RTT" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="9Tz-Di-uIS"/>
+                <constraint firstItem="axb-6M-lSX" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="dZG-UA-csl"/>
+                <constraint firstItem="SBq-Am-6MD" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="eoy-59-SkO"/>
+                <constraint firstItem="axb-6M-lSX" firstAttribute="trailing" secondItem="x1t-3m-s0G" secondAttribute="leading" constant="-8" id="l05-q4-Dha"/>
+                <constraint firstItem="x1t-3m-s0G" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="mIZ-5x-1r6"/>
+                <constraint firstItem="SBq-Am-6MD" firstAttribute="leading" secondItem="SbC-6V-aXT" secondAttribute="leading" id="mf3-NF-cwy"/>
+                <constraint firstAttribute="trailing" secondItem="Sdb-a5-RTT" secondAttribute="trailing" constant="8" id="uI1-3o-gyT"/>
+                <constraint firstItem="axb-6M-lSX" firstAttribute="leading" secondItem="SBq-Am-6MD" secondAttribute="trailing" id="zQP-Wv-QPC"/>
+            </constraints>
+            <nil key="simulatedStatusBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="aspectRatioButton" destination="Sdb-a5-RTT" id="H3u-Yv-6na"/>
+                <outlet property="minimizePlaybackButton" destination="SBq-Am-6MD" id="LsO-JQ-mjt"/>
+                <outlet property="positionSlider" destination="axb-6M-lSX" id="UIA-jE-MfS"/>
+                <outlet property="timeDisplayButton" destination="x1t-3m-s0G" id="82s-l3-eg0"/>
+            </connections>
+            <point key="canvasLocation" x="-334" y="284"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="minimizePlayback" width="15" height="5"/>
+        <image name="ratioIcon.png" width="16" height="16"/>
+    </resources>
+</document>

+ 1 - 3
Sources/VLCMovieViewController.h

@@ -31,11 +31,8 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
 @interface VLCMovieViewController : UIViewController <UIActionSheetDelegate, VLCPlaybackControllerDelegate>
 
 @property (nonatomic, strong) IBOutlet UIView *movieView;
-@property (nonatomic, strong) IBOutlet UIBarButtonItem *backButton;
 @property (nonatomic, strong) IBOutlet VLCTimeNavigationTitleView *timeNavigationTitleView;
 @property (nonatomic, strong) IBOutlet UIButton *sleepTimerButton;
-@property (nonatomic, strong) IBOutlet UINavigationBar *toolbar;
-@property (nonatomic, strong) IBOutlet VLCMovieViewControlPanelView *controllerPanel;
 @property (nonatomic, strong) IBOutlet VLCStatusLabel *statusLabel;
 
 @property (nonatomic, strong) IBOutlet UIView *playingExternallyView;
@@ -74,6 +71,7 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
 @property (nonatomic, strong) IBOutlet UILabel *albumNameLabel;
 @property (nonatomic, strong) IBOutlet UILabel *trackNameLabel;
 @property (nonatomic, strong) IBOutlet UIImageView *artworkImageView;
+@property (nonatomic, strong) IBOutlet NSLayoutConstraint *widthConstraint;
 
 - (IBAction)closePlayback:(id)sender;
 - (IBAction)minimizePlayback:(id)sender;

+ 47 - 24
Sources/VLCMovieViewController.m

@@ -115,7 +115,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     CGPoint _saveLocation;
     CGSize _screenSizePixel;
 }
-
+@property (nonatomic, strong) VLCMovieViewControlPanelView *controllerPanel;
 @property (nonatomic, strong) UIPopoverController *masterPopoverController;
 @property (nonatomic, strong) UIWindow *externalWindow;
 @end
@@ -177,7 +177,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     self.playbackSpeedView.hidden = YES;
     _playbackSpeedViewHidden = YES;
-
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
     [center addObserver:self selector:@selector(handleExternalScreenDidConnect:)
                    name:UIScreenDidConnectNotification object:nil];
@@ -209,17 +208,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     _previousJumpState = VLCMovieJumpStateDefault;
     _numberOfTapSeek = 0;
 
-    self.backButton.tintColor = [UIColor colorWithRed:(190.0f/255.0f) green:(190.0f/255.0f) blue:(190.0f/255.0f) alpha:1.];
-    self.toolbar.tintColor = [UIColor whiteColor];
-    self.toolbar.barStyle = UIBarStyleBlack;
-
     rect = self.resetVideoFilterButton.frame;
     rect.origin.y = rect.origin.y + 5.;
     self.resetVideoFilterButton.frame = rect;
-    rect = self.toolbar.frame;
-    rect.size.height = rect.size.height + rect.origin.y;
-    rect.origin.y = 0;
-    self.toolbar.frame = rect;
 
     _playerIsSetup = NO;
 
@@ -254,6 +245,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     _saveLocation = CGPointMake(-1.f, -1.f);
 
     [self setupConstraints];
+
 }
 
 - (void)setupGestureRecognizers
@@ -361,20 +353,45 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
                              [NSLayoutConstraint constraintWithItem:_trackSelectorContainer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationLessThanOrEqual toItem:self.view attribute:NSLayoutAttributeHeight multiplier:2.0/3.0 constant:0],
                              ];
     [NSLayoutConstraint activateConstraints:constraints];
+
+}
+
+- (void)setupNavigationbar
+{
+    UIButton *doneButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [doneButton addTarget:self action:@selector(closePlayback:) forControlEvents:UIControlEventTouchUpInside];
+    [doneButton setTitle:NSLocalizedString(@"BUTTON_DONE", nil) forState:UIControlStateNormal];
+    doneButton.translatesAutoresizingMaskIntoConstraints = NO;
+
+    self.timeNavigationTitleView = [[[NSBundle mainBundle] loadNibNamed:@"VLCTimeNavigationTitleView" owner:self options:nil] objectAtIndex:0];
+    self.timeNavigationTitleView.translatesAutoresizingMaskIntoConstraints = NO;
+
+    [self.navigationController.navigationBar addSubview:self.timeNavigationTitleView];
+    [self.navigationController.navigationBar addSubview:doneButton];
+
+    [NSLayoutConstraint activateConstraints: @[
+                                               [NSLayoutConstraint constraintWithItem:doneButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeLeft multiplier:1 constant:8],
+                                               [NSLayoutConstraint constraintWithItem:doneButton attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0],
+                                               [NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:doneButton attribute:NSLayoutAttributeRight multiplier:1 constant:0],
+                                               [NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeRight multiplier:1 constant:0],
+                                               [NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeTop multiplier:1 constant:0],
+                                               [NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0],
+                                               ]];
 }
 
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
 
+    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
+    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
+    [self setupNavigationbar];
     /* reset audio meta data views */
     self.artworkImageView.image = nil;
     self.trackNameLabel.text = nil;
     self.artistNameLabel.text = nil;
     self.albumNameLabel.text = nil;
 
-    [self.navigationController setNavigationBarHidden:YES animated:animated];
-
     _vpc = [VLCPlaybackController sharedInstance];
     _vpc.delegate = self;
     [_vpc recoverPlaybackState];
@@ -383,7 +400,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     [self setControlsHidden:NO animated:animated];
 
     [self updateDefaults];
-    [NSUserDefaults standardUserDefaults];
 
     //Disabling video gestures, media not init in the player yet.
     [self enableNormalVideoGestures:NO];
@@ -411,6 +427,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     }
 
     [self enableNormalVideoGestures:!_mediaHasProjection];
+
 }
 
 - (void)viewDidLayoutSubviews
@@ -457,7 +474,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         [_idleTimer invalidate];
         _idleTimer = nil;
     }
-    [self.navigationController setNavigationBarHidden:NO animated:YES];
+
     [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
     [super viewWillDisappear:animated];
 
@@ -625,10 +642,10 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     CGFloat alpha = _controlsHidden? 0.0f: 1.0f;
 
     if (!_controlsHidden) {
+        self.navigationController.navigationBar.alpha = 0.0;
+        self.navigationController.navigationBar.hidden = NO;
         _controllerPanel.alpha = 0.0f;
         _controllerPanel.hidden = !_videoFiltersHidden;
-        _toolbar.alpha = 0.0f;
-        _toolbar.hidden = NO;
         _videoFilterView.alpha = 0.0f;
         _videoFilterView.hidden = _videoFiltersHidden;
         _playbackSpeedView.alpha = 0.0f;
@@ -650,8 +667,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     }
 
     void (^animationBlock)() = ^() {
+        self.navigationController.navigationBar.alpha = alpha;
         _controllerPanel.alpha = alpha;
-        _toolbar.alpha = alpha;
         _videoFilterView.alpha = alpha;
         _playbackSpeedView.alpha = alpha;
         _trackSelectorContainer.alpha = alpha;
@@ -668,9 +685,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     void (^completionBlock)(BOOL finished) = ^(BOOL finished) {
         _controllerPanel.hidden = _videoFiltersHidden ? _controlsHidden : NO;
-        _toolbar.hidden = _controlsHidden;
         _videoFilterView.hidden = _videoFiltersHidden;
         _playbackSpeedView.hidden = _playbackSpeedViewHidden;
+        self.navigationController.navigationBar.hidden = _controlsHidden;
         _trackSelectorContainer.hidden = YES;
         _equalizerView.hidden = YES;
         if (_sleepTimerContainer)
@@ -972,6 +989,15 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     [self.statusLabel showStatusMessage:statusMessage];
 }
 
+- (void)hideShowAspectratioButton:(BOOL)hide
+{
+    [UIView animateWithDuration:.3
+                     animations:^{
+                         self.widthConstraint.constant = hide ? 0 : 30;
+                         self.timeNavigationTitleView.aspectRatioButton.hidden = hide;
+                     }];
+}
+
 - (void)displayMetadataForPlaybackController:(VLCPlaybackController *)controller
                                        title:(NSString *)title
                                      artwork:(UIImage *)artwork
@@ -990,9 +1016,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     } else
         self.artistNameLabel.text = self.albumNameLabel.text = nil;
 
-    self.timeNavigationTitleView.hideAspectRatio = audioOnly;
-    self.timeNavigationTitleView.positionSlider.hidden = NO;
-
+    [self hideShowAspectratioButton:audioOnly];
     [_controllerPanel updateButtons];
     
     _audioOnly = audioOnly;
@@ -1039,7 +1063,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
             if (!_controlsHidden) {
                 self.controllerPanel.hidden = _controlsHidden = YES;
-                self.toolbar.hidden = YES;
+                self.navigationController.navigationBar.hidden = YES;
             }
         }
 
@@ -1156,7 +1180,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     _interfaceIsLocked = !_interfaceIsLocked;
 
     _multiSelectionView.displayLock = _interfaceIsLocked;
-    self.backButton.enabled = !_interfaceIsLocked;
 }
 
 - (void)toggleEqualizer
@@ -1170,7 +1193,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
             if (!_controlsHidden) {
                 self.controllerPanel.hidden = _controlsHidden = YES;
-                self.toolbar.hidden = YES;
+                self.navigationController.navigationBar.hidden = YES;
             }
         }
 

+ 1 - 1
Sources/VLCPlaybackController.m

@@ -938,7 +938,7 @@ VLCMediaDelegate>
 {
     if (_needsMetadataUpdate == NO) {
         _needsMetadataUpdate = YES;
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        dispatch_async(dispatch_get_main_queue(), ^{
             [self _updateDisplayedMetadata];
         });
     }

+ 0 - 4
Sources/VLCPlaybackNavigationController.m

@@ -15,10 +15,6 @@
 #import "VLCMovieViewController.h"
 #endif
 
-@interface VLCPlaybackNavigationController ()
-
-@end
-
 @implementation VLCPlaybackNavigationController
 
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations

+ 10 - 15
Sources/VLCPlayerDisplayController.m

@@ -248,24 +248,20 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
 
 - (void)_presentFullscreenPlaybackViewIfNeeded
 {
-    if (![NSThread isMainThread]) {
-        [self performSelectorOnMainThread:@selector(_presentFullscreenPlaybackViewIfNeeded) withObject:nil waitUntilDone:NO];
-        return;
-    }
-    if (!self.movieViewController.presentingViewController) {
-        [self _presentMovieViewControllerAnimated:[self shouldAnimate]];
-    }
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (!self.movieViewController.presentingViewController) {
+            [self _presentMovieViewControllerAnimated:[self shouldAnimate]];
+        }
+    });
 }
 
 - (void)_closeFullscreenPlayback
 {
-    if (![NSThread isMainThread]) {
-        [self performSelectorOnMainThread:@selector(_closeFullscreenPlayback) withObject:nil waitUntilDone:NO];
-        return;
-    }
-    BOOL animated = [self shouldAnimate];
-    [self.movieViewController dismissViewControllerAnimated:animated completion:nil];
-    [self _showHideMiniPlaybackView];
+    dispatch_async(dispatch_get_main_queue(), ^{
+        BOOL animated = [self shouldAnimate];
+        [self.movieViewController dismissViewControllerAnimated:animated completion:nil];
+        [self _showHideMiniPlaybackView];
+    });
 }
 
 - (void)_presentMovieViewControllerAnimated:(BOOL)animated
@@ -274,7 +270,6 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
     UINavigationController *navCon = [[VLCPlaybackNavigationController alloc] initWithRootViewController:movieViewController];
     [movieViewController prepareForMediaPlayback:self.playbackController];
 
-    navCon.modalPresentationStyle = UIModalPresentationFullScreen;
     UIWindow *window = [[UIApplication sharedApplication] keyWindow];
     [window.rootViewController presentViewController:navCon animated:animated completion:nil];
 }

+ 0 - 2
Sources/VLCTimeNavigationTitleView.h

@@ -19,6 +19,4 @@
 @property (weak, nonatomic) IBOutlet VLCOBSlider *positionSlider;
 @property (weak, nonatomic) IBOutlet UIButton *timeDisplayButton;
 @property (weak, nonatomic) IBOutlet UIButton *aspectRatioButton;
-
-@property (nonatomic) BOOL hideAspectRatio;
 @end

+ 4 - 51
Sources/VLCTimeNavigationTitleView.m

@@ -2,73 +2,26 @@
  * VLCTimeNavigationTitleView.m
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * Copyright (c) 2017 VideoLAN. All rights reserved.
  * $Id$
  *
  * Author: Tobias Conradi <videolan # tobias-conradi.de>
+           Carola Nitz <nitz.carola # gmail.com>
  *
  * Refer to the COPYING file of the official project for license.
  *****************************************************************************/
 
 
 #import "VLCTimeNavigationTitleView.h"
-#import "VLCSlider.h"
 
 @implementation VLCTimeNavigationTitleView
 
--(void)awakeFromNib {
-
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        self.positionSlider.scrubbingSpeedChangePositions = @[@(0.), @(100.), @(200.), @(300)];
+- (void)awakeFromNib {
 
+    self.minimizePlaybackButton.accessibilityLabel = NSLocalizedString(@"MINIMIZE_PLAYBACK_VIEW", nil);
     self.aspectRatioButton.accessibilityLabel = NSLocalizedString(@"VIDEO_ASPECT_RATIO_BUTTON", nil);
-
     [self.aspectRatioButton setImage:[UIImage imageNamed:@"ratioIcon"] forState:UIControlStateNormal];
 
-    self.minimizePlaybackButton.accessibilityLabel = NSLocalizedString(@"MINIMIZE_PLAYBACK_VIEW", nil);
-
-    // workaround for radar://22897614 ( http://www.openradar.me/22897614 )
-    UISlider *slider = self.positionSlider;
-    if ([slider respondsToSelector:@selector(semanticContentAttribute)]) {
-        UISemanticContentAttribute attribute = slider.semanticContentAttribute;
-        slider.semanticContentAttribute = UISemanticContentAttributeUnspecified;
-        slider.semanticContentAttribute = attribute;
-    }
-
-    [self setNeedsLayout];
-
     [super awakeFromNib];
 }
-
-- (void)layoutSubviews
-{
-    [super layoutSubviews];
-
-    CGRect remainder = self.bounds;
-    CGRect slice;
-
-    CGRectDivide(remainder, &slice, &remainder, CGRectGetWidth(self.minimizePlaybackButton.frame), CGRectMinXEdge);
-    self.minimizePlaybackButton.frame = slice;
-
-    if (!self.aspectRatioButton.hidden) {
-        [self.aspectRatioButton sizeToFit];
-        CGRectDivide(remainder, &slice, &remainder, CGRectGetWidth(self.aspectRatioButton.frame), CGRectMaxXEdge);
-        self.aspectRatioButton.frame = slice;
-    }
-
-    [self.timeDisplayButton sizeToFit];
-    CGRectDivide(remainder, &slice, &remainder, CGRectGetWidth(self.timeDisplayButton.frame), CGRectMaxXEdge);
-    self.timeDisplayButton.frame = slice;
-
-    self.positionSlider.frame = remainder;
-}
-
-- (void)setHideAspectRatio:(BOOL)hideAspectRatio
-{
-    _hideAspectRatio = hideAspectRatio;
-    self.aspectRatioButton.hidden = hideAspectRatio;
-    [self setNeedsLayout];
-}
-
-
 @end

+ 8 - 0
VLC.xcodeproj/project.pbxproj

@@ -42,6 +42,9 @@
 		419A2C691F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; };
 		419A2C6A1F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; };
 		419A2C6B1F37A4B70069D224 /* VLCStringsForLocalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 419A2C651F37A4B70069D224 /* VLCStringsForLocalization.m */; };
+		419D7F051F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 419D7F041F54176900AF69A2 /* VLCTimeNavigationTitleView.xib */; };
+		419D7F071F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 419D7F041F54176900AF69A2 /* VLCTimeNavigationTitleView.xib */; };
+		419D7F081F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 419D7F041F54176900AF69A2 /* VLCTimeNavigationTitleView.xib */; };
 		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 */; };
@@ -1155,6 +1158,7 @@
 		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; };
 		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; };
 		41B93BFF1A53833B00102E8B /* VLCProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCProgressView.h; path = Sources/VLCProgressView.h; sourceTree = SOURCE_ROOT; };
 		41B93C001A53833B00102E8B /* VLCProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCProgressView.m; path = Sources/VLCProgressView.m; sourceTree = SOURCE_ROOT; };
 		41B93C021A53835300102E8B /* VLCCloudServiceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCCloudServiceCell.h; path = Sources/VLCCloudServiceCell.h; sourceTree = SOURCE_ROOT; };
@@ -2342,6 +2346,7 @@
 				7DBBF189183AB4300009A339 /* VLCEmptyLibraryView.xib */,
 				7DBBF18B183AB4300009A339 /* VLCPlaylistCollectionViewCell.xib */,
 				7DBBF18C183AB4300009A339 /* VLCPlaylistTableViewCell.xib */,
+				419D7F041F54176900AF69A2 /* VLCTimeNavigationTitleView.xib */,
 			);
 			name = Library;
 			sourceTree = "<group>";
@@ -3674,6 +3679,7 @@
 				7D787FCC1D40FDE70003CFA1 /* VLCFirstStepsFourthPageViewController~iphone.xib in Resources */,
 				7D787FCD1D40FDE70003CFA1 /* VLCFirstStepsSixthPageViewController~iphone.xib in Resources */,
 				7D787FCE1D40FDE70003CFA1 /* VLCMigrationViewController.xib in Resources */,
+				419D7F081F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */,
 				7D787FCF1D40FDE70003CFA1 /* VLCCloudStorageTableViewController.xib in Resources */,
 				7D787FD01D40FDE70003CFA1 /* VLCFirstStepsThirdPageViewController~iphone.xib in Resources */,
 				7D787FD11D40FDE70003CFA1 /* VLCEmptyLibraryView.xib in Resources */,
@@ -3716,6 +3722,7 @@
 				7AC862A91765E9510011611A /* jquery.ui.widget.js in Resources */,
 				A79246C8170F11DF0036AAF2 /* Localizable.strings in Resources */,
 				9B9231C4185A703700F89498 /* VLCNetworkLoginViewController.xib in Resources */,
+				419D7F051F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */,
 				7D1516431868D7E0004B18F3 /* VLCFirstStepsFirstPageViewController~iphone.xib in Resources */,
 				7DF04F4E1961F2B8004A5429 /* web-download.png in Resources */,
 				41B93C081A53853B00102E8B /* VLCCloudServiceCell.xib in Resources */,
@@ -3778,6 +3785,7 @@
 				7DC550471C046615007B4E42 /* jquery.ui.widget.js in Resources */,
 				7DC550481C046615007B4E42 /* Localizable.strings in Resources */,
 				7DC550491C046615007B4E42 /* VLCNetworkLoginViewController.xib in Resources */,
+				419D7F071F54176900AF69A2 /* VLCTimeNavigationTitleView.xib in Resources */,
 				7DC5504A1C046615007B4E42 /* VLCFirstStepsFirstPageViewController~iphone.xib in Resources */,
 				7DC5504B1C046615007B4E42 /* web-download.png in Resources */,
 				7DC5504E1C046615007B4E42 /* VLCCloudServiceCell.xib in Resources */,