Browse Source

MovieViewcontroller: readd Outlet to avoid crash, position filterview central

Carola Nitz 6 years ago
parent
commit
bfadfa8580

+ 1 - 2
Resources/PlaybackSpeedView.xib

@@ -12,7 +12,7 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlaybackSpeedView" customModule="VLC" customModuleProvider="target">
             <connections>
-                <outlet property="audioDelayIndicator" destination="7Ll-yU-MYC" id="oU6-5S-mFZ"/>
+                <outlet property="audioDelayIndicator" destination="7Ll-yU-MYC" id="GHm-dx-K0U"/>
                 <outlet property="audioDelayLabel" destination="hdg-PF-74y" id="eed-3i-thi"/>
                 <outlet property="audioDelaySlider" destination="hjh-be-2Cl" id="TZX-6Y-jZD"/>
                 <outlet property="playbackSpeedIndicator" destination="Eii-kE-m3f" id="moH-XM-G5e"/>
@@ -142,7 +142,6 @@
             </constraints>
             <viewLayoutGuide key="safeArea" id="N7w-nS-oNM"/>
             <connections>
-                <outlet property="audioDelayIndicator" destination="7Ll-yU-MYC" id="TUg-du-Ktv"/>
                 <outlet property="audioDelayLabel" destination="hdg-PF-74y" id="PUu-UB-u9u"/>
                 <outlet property="audioDelaySlider" destination="hjh-be-2Cl" id="ZLg-nb-d4X"/>
                 <outlet property="playbackSpeedIndicator" destination="Eii-kE-m3f" id="fJW-7H-MmK"/>

+ 11 - 11
Resources/VLCMovieViewController.xib

@@ -67,7 +67,7 @@
                     </accessibility>
                 </view>
                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" text="Track Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="282">
-                    <rect key="frame" x="31" y="297" width="673" height="28"/>
+                    <rect key="frame" x="31" y="545" width="351" height="28"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                     <fontDescription key="fontDescription" type="system" pointSize="23"/>
                     <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -75,24 +75,24 @@
                     <color key="shadowColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 </label>
                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" text="Artist Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="279">
-                    <rect key="frame" x="20" y="193" width="696" height="28"/>
+                    <rect key="frame" x="20" y="354" width="374" height="28"/>
                     <fontDescription key="fontDescription" type="system" pointSize="23"/>
                     <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     <nil key="highlightedColor"/>
                     <color key="shadowColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 </label>
                 <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Status Label" textAlignment="center" lineBreakMode="tailTruncation" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="210" customClass="VLCStatusLabel">
-                    <rect key="frame" x="320.66666666666669" y="196" width="95" height="22"/>
+                    <rect key="frame" x="159.66666666666666" y="357" width="95" height="22"/>
                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                     <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     <nil key="highlightedColor"/>
                     <color key="shadowColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
                 </label>
                 <activityIndicatorView opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="vR5-i9-KEJ">
-                    <rect key="frame" x="349.66666666666669" y="188.66666666666666" width="37" height="37"/>
+                    <rect key="frame" x="188.66666666666666" y="349.66666666666669" width="37" height="37"/>
                 </activityIndicatorView>
                 <view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="108" userLabel="Playing Externally View" customClass="PlayingExternallyView" customModule="VLC" customModuleProvider="target">
-                    <rect key="frame" x="208" y="78.666666666666686" width="320" height="257"/>
+                    <rect key="frame" x="47" y="239.66666666666663" width="320" height="257"/>
                     <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="320" id="8KN-Zx-c9b"/>
@@ -103,16 +103,16 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="241" userLabel="scrubbing indicator view" customClass="VLCFrostedGlasView">
-                    <rect key="frame" x="0.0" y="0.0" width="736" height="46"/>
+                    <rect key="frame" x="0.0" y="0.0" width="414" height="46"/>
                     <subviews>
                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="High-Speed Scrubbing" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="244">
-                            <rect key="frame" x="20" y="0.0" width="696" height="23"/>
+                            <rect key="frame" x="20" y="0.0" width="374" height="23"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
                             <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Slide your finger down to adjust the scrubbing rate." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsLetterSpacingToFitWidth="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="246">
-                            <rect key="frame" x="20" y="25" width="696" height="21"/>
+                            <rect key="frame" x="20" y="25" width="374" height="21"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
                             <color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
@@ -132,7 +132,7 @@
                     </constraints>
                 </view>
                 <view hidden="YES" contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="117" userLabel="video filters view" customClass="VLCFrostedGlasView">
-                    <rect key="frame" x="396" y="234" width="320" height="200"/>
+                    <rect key="frame" x="47" y="234" width="320" height="200"/>
                     <subviews>
                         <slider opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="2" translatesAutoresizingMaskIntoConstraints="NO" id="128" customClass="VLCSlider">
                             <rect key="frame" x="18" y="19" width="284" height="29"/>
@@ -226,7 +226,7 @@
                     </constraints>
                 </view>
                 <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="165" customClass="PlaybackSpeedView" customModule="VLC" customModuleProvider="target">
-                    <rect key="frame" x="208" y="159" width="320" height="163"/>
+                    <rect key="frame" x="47" y="363" width="320" height="163"/>
                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="string" keyPath="nibName" value="PlaybackSpeedView"/>
@@ -246,10 +246,10 @@
                 <constraint firstItem="210" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="MHR-gH-pTD"/>
                 <constraint firstItem="241" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="NlR-AR-oDp"/>
                 <constraint firstItem="yK6-Ph-SVE" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="Vea-d4-8Yb"/>
+                <constraint firstItem="117" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="XSn-dT-zUi"/>
                 <constraint firstItem="108" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="iXa-B5-wPd"/>
                 <constraint firstAttribute="trailing" secondItem="241" secondAttribute="trailing" id="ibm-5A-ERl"/>
                 <constraint firstItem="108" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="kWo-ta-1LU"/>
-                <constraint firstItem="117" firstAttribute="trailing" secondItem="1" secondAttribute="trailing" constant="-20" id="xW9-Om-vnF"/>
             </constraints>
             <nil key="simulatedStatusBarMetrics"/>
         </view>

+ 1 - 7
Sources/VLCMovieViewController.m

@@ -341,7 +341,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
                              [NSLayoutConstraint constraintWithItem:_trackSelectorContainer attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationLessThanOrEqual toItem:nil attribute:NSLayoutAttributeWidth multiplier:1 constant:420.0],
                              widthConstraint,
                              [NSLayoutConstraint constraintWithItem:_trackSelectorContainer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationLessThanOrEqual toItem:self.view attribute:NSLayoutAttributeHeight multiplier:2.0/3.0 constant:0],
-                             [_videoFilterView.bottomAnchor constraintEqualToAnchor:_controllerPanel.topAnchor constant:-20]
+                             [_videoFilterView.bottomAnchor constraintEqualToAnchor:_controllerPanel.topAnchor]
                              ];
     [NSLayoutConstraint activateConstraints:constraints];
 
@@ -1555,12 +1555,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (_equalizerView.hidden == NO)
         _equalizerView.hidden = YES;
 
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
-        if (!_controlsHidden) {
-            self.controllerPanel.hidden = _controlsHidden = YES;
-        }
-    }
-
     self.videoFilterView.hidden = !_videoFiltersHidden;
     _videoFiltersHidden = self.videoFilterView.hidden;
 }