Skip to content

Commit

Permalink
Media ActionSheet: Fix layout for subviews
Browse files Browse the repository at this point in the history
- Move to VLCSlider
- Add vertical spacing in vertical stackviews
- Set correct content compression resistance and hugging priorities for labels
  • Loading branch information
edrflt committed Oct 26, 2021
1 parent 994cfb3 commit 41b73e5
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 53 deletions.
18 changes: 9 additions & 9 deletions Resources/Xib/VideoPlayer/NewPlaybackSpeedView.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -34,32 +34,32 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="UoZ-U2-eTU" userLabel="Slider Stack View">
<rect key="frame" x="0.0" y="0.0" width="486" height="88"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Pp9-DV-Iks" userLabel="Labels Stack View">
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Pp9-DV-Iks" userLabel="Labels Stack View">
<rect key="frame" x="0.0" y="0.0" width="486" height="29"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Min" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fDJ-fm-gvA" userLabel="Min Label">
<rect key="frame" x="0.0" y="5.5" width="29" height="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Min" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fDJ-fm-gvA" userLabel="Min Label">
<rect key="frame" x="0.0" y="5.5" width="100.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xhS-0y-emM" userLabel="Current Button">
<rect key="frame" x="209.5" y="0.0" width="67" height="29"/>
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="clip" translatesAutoresizingMaskIntoConstraints="NO" id="xhS-0y-emM" userLabel="Current Button">
<rect key="frame" x="100.5" y="0.0" width="285" height="29"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<state key="normal" title="Current"/>
<connections>
<action selector="handleResetTap:" destination="7Au-zH-5I2" eventType="touchUpInside" id="2Bc-GL-SQb"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gl7-9W-mBY" userLabel="Max Label">
<rect key="frame" x="457" y="5.5" width="29" height="18"/>
<rect key="frame" x="385.5" y="5.5" width="100.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="Nn3-WS-Gwk">
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="Nn3-WS-Gwk" customClass="VLCSlider">
<rect key="frame" x="-2" y="59" width="490" height="30"/>
<connections>
<action selector="handleSliderMovement:" destination="7Au-zH-5I2" eventType="valueChanged" id="ycb-13-cKQ"/>
Expand Down
Loading

0 comments on commit 41b73e5

Please sign in to comment.