浏览代码

Refactored the controlspanel and movievc for clearer interfaces and more decoupling Moved logic for layout completely into code to have it one place and fix the disappearing controls

Carola Nitz 8 年之前
父节点
当前提交
b025b73db7

+ 0 - 233
Resources/VLCMovieViewControlPanel.xib

@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewControlPanelViewController">
-            <connections>
-                <outlet property="bwdButton" destination="JDB-xi-tPg" id="PWa-6a-7nP"/>
-                <outlet property="fwdButton" destination="ebr-CU-0C0" id="6xF-al-DU2"/>
-                <outlet property="moreActionsButton" destination="JfQ-q3-fZH" id="47z-eO-7zE"/>
-                <outlet property="playPauseButton" destination="sWz-p2-OOq" id="uWM-TM-PRK"/>
-                <outlet property="playbackControls" destination="2cP-rW-fzM" id="wpr-p8-6Or"/>
-                <outlet property="playbackSpeedButton" destination="ihG-fo-m2Q" id="5y8-Eo-2xy"/>
-                <outlet property="trackSwitcherButton" destination="Ev9-Aj-Ysl" id="wpy-cc-ir4"/>
-                <outlet property="videoFilterButton" destination="wn4-Cf-Bor" id="gAq-me-PdK"/>
-                <outlet property="view" destination="xGq-of-vsu" id="fd9-4M-xqD"/>
-                <outlet property="volumeView" destination="0j8-jT-SDG" id="Nsm-zK-V0I"/>
-            </connections>
-        </placeholder>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view hidden="YES" opaque="NO" contentMode="scaleToFill" id="xGq-of-vsu" customClass="VLCFrostedGlasView">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
-            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ihG-fo-m2Q" userLabel="Playback Speed Button">
-                    <rect key="frame" x="8" y="8" width="35" height="40"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="Een-T9-l4Q"/>
-                        <constraint firstAttribute="width" constant="35" id="VY6-bJ-OtU"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                    <state key="normal" image="speedIcon">
-                        <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"/>
-                    </state>
-                    <state key="highlighted">
-                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                    </state>
-                    <variation key="widthClass=compact" fixedFrame="YES">
-                        <rect key="frame" x="11" y="6" width="19" height="27"/>
-                    </variation>
-                    <connections>
-                        <action selector="showPlaybackSpeedView" destination="-2" eventType="touchUpInside" id="0g6-YN-jtk"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ev9-Aj-Ysl" userLabel="track switcher button">
-                    <rect key="frame" x="51" y="8" width="35" height="40"/>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="9OZ-EG-hPx"/>
-                        <constraint firstAttribute="width" constant="35" id="jBS-11-dzh"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                    <state key="normal" image="audioTrackIcon">
-                        <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"/>
-                    </state>
-                    <state key="highlighted">
-                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                    </state>
-                    <variation key="widthClass=compact" fixedFrame="YES">
-                        <rect key="frame" x="56" y="15" width="32" height="40"/>
-                    </variation>
-                    <connections>
-                        <action selector="switchTrack:" destination="-2" eventType="touchUpInside" id="DMb-OM-S3d"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wn4-Cf-Bor" userLabel="Video Filter Button">
-                    <rect key="frame" x="234" y="8" width="35" height="40"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="35" id="2g4-uD-jL2"/>
-                        <constraint firstAttribute="height" constant="40" id="qAx-hr-fm1"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                    <state key="normal" image="videoEffectsIcon">
-                        <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"/>
-                    </state>
-                    <state key="highlighted">
-                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                    </state>
-                    <connections>
-                        <action selector="videoFilterToggle:" destination="-2" eventType="touchUpInside" id="DMM-9Y-Eff"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JfQ-q3-fZH" userLabel="more actions button">
-                    <rect key="frame" x="277" y="8" width="35" height="40"/>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="40" id="Nay-FZ-Ucn"/>
-                        <constraint firstAttribute="width" constant="35" id="jMy-Wa-krc"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                    <state key="normal" image="More">
-                        <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"/>
-                    </state>
-                    <state key="highlighted">
-                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                    </state>
-                    <variation key="widthClass=compact" fixedFrame="YES">
-                        <rect key="frame" x="280" y="15" width="32" height="40"/>
-                    </variation>
-                    <connections>
-                        <action selector="moreActions:" destination="-2" eventType="touchUpInside" id="uKo-wq-2SU"/>
-                    </connections>
-                </button>
-                <view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" placeholderIntrinsicWidth="infinite" placeholderIntrinsicHeight="30" translatesAutoresizingMaskIntoConstraints="NO" id="0j8-jT-SDG" customClass="VLCVolumeView">
-                    <rect key="frame" x="10" y="57" width="300" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="width" priority="250" constant="300" id="85a-bl-A1M"/>
-                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="150" id="UzA-DV-IRM"/>
-                        <constraint firstAttribute="width" relation="lessThanOrEqual" priority="900" constant="300" id="rkl-fF-S16"/>
-                    </constraints>
-                </view>
-                <view contentMode="scaleToFill" semanticContentAttribute="playback" translatesAutoresizingMaskIntoConstraints="NO" id="2cP-rW-fzM" userLabel="Playback controls">
-                    <rect key="frame" x="94" y="8" width="132" height="40"/>
-                    <subviews>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JDB-xi-tPg" userLabel="bwd button">
-                            <rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="40" id="GWR-Ar-Rkq"/>
-                                <constraint firstAttribute="height" constant="40" id="Sm5-yS-Mhp"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                            <state key="normal" image="backIcon">
-                                <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"/>
-                            </state>
-                            <state key="highlighted">
-                                <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                            </state>
-                            <connections>
-                                <action selector="backward:" destination="-2" eventType="touchUpInside" id="Jci-SY-Oyo"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sWz-p2-OOq" userLabel="play pause button">
-                            <rect key="frame" x="46" y="0.0" width="40" height="40"/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="40" id="AvI-sg-Cfg"/>
-                                <constraint firstAttribute="width" constant="40" id="dgQ-ny-i0B"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                            <state key="normal" image="playIcon">
-                                <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"/>
-                            </state>
-                            <state key="highlighted">
-                                <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                            </state>
-                            <connections>
-                                <action selector="playPause" destination="-2" eventType="touchUpInside" id="EOM-4b-iUz"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ebr-CU-0C0" userLabel="fwd button">
-                            <rect key="frame" x="92" y="0.0" width="40" height="40"/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="40" id="3R8-m2-NES"/>
-                                <constraint firstAttribute="height" constant="40" id="cce-E1-xjV"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                            <state key="normal" image="forwardIcon">
-                                <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"/>
-                            </state>
-                            <state key="highlighted">
-                                <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                            </state>
-                            <connections>
-                                <action selector="forward:" destination="-2" eventType="touchUpInside" id="PEb-DG-gsL"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                    <constraints>
-                        <constraint firstItem="sWz-p2-OOq" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="1GA-3R-rNJ"/>
-                        <constraint firstItem="ebr-CU-0C0" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="4rg-xz-1ZA"/>
-                        <constraint firstItem="sWz-p2-OOq" firstAttribute="centerX" secondItem="2cP-rW-fzM" secondAttribute="centerX" id="AZ1-5b-Su4"/>
-                        <constraint firstItem="sWz-p2-OOq" firstAttribute="left" secondItem="JDB-xi-tPg" secondAttribute="right" priority="750" constant="15" id="Aau-p6-v2m"/>
-                        <constraint firstItem="JDB-xi-tPg" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="Bb5-bY-0Mo"/>
-                        <constraint firstAttribute="bottom" secondItem="sWz-p2-OOq" secondAttribute="bottom" id="DoC-Pm-7fV"/>
-                        <constraint firstAttribute="bottom" secondItem="ebr-CU-0C0" secondAttribute="bottom" id="a11-IG-9Hf"/>
-                        <constraint firstItem="JDB-xi-tPg" firstAttribute="left" secondItem="2cP-rW-fzM" secondAttribute="left" id="aMc-E9-yjF"/>
-                        <constraint firstAttribute="bottom" secondItem="JDB-xi-tPg" secondAttribute="bottom" id="c0j-dl-pOQ"/>
-                        <constraint firstItem="ebr-CU-0C0" firstAttribute="left" secondItem="sWz-p2-OOq" secondAttribute="right" priority="750" constant="15" id="cfF-Ax-geb"/>
-                        <constraint firstAttribute="right" secondItem="ebr-CU-0C0" secondAttribute="right" id="dyi-Jl-CkU"/>
-                    </constraints>
-                </view>
-            </subviews>
-            <constraints>
-                <constraint firstItem="JfQ-q3-fZH" firstAttribute="leading" secondItem="wn4-Cf-Bor" secondAttribute="trailing" constant="8" id="BFe-d9-v0M"/>
-                <constraint firstItem="ihG-fo-m2Q" firstAttribute="leading" secondItem="xGq-of-vsu" secondAttribute="leading" constant="8" id="MoD-Bo-PaT"/>
-                <constraint firstAttribute="trailing" secondItem="JfQ-q3-fZH" secondAttribute="trailing" constant="8" id="O20-57-Kf4"/>
-                <constraint firstItem="2cP-rW-fzM" firstAttribute="leading" secondItem="Ev9-Aj-Ysl" secondAttribute="trailing" constant="8" id="Pe8-qK-NGa"/>
-                <constraint firstItem="2cP-rW-fzM" firstAttribute="centerX" secondItem="xGq-of-vsu" secondAttribute="centerX" id="Wb1-Bh-HRN"/>
-                <constraint firstItem="wn4-Cf-Bor" firstAttribute="leading" secondItem="2cP-rW-fzM" secondAttribute="trailing" constant="8" id="WhX-MM-w9S"/>
-                <constraint firstAttribute="bottom" secondItem="0j8-jT-SDG" secondAttribute="bottom" constant="8" id="bgI-Df-ZPx"/>
-                <constraint firstItem="0j8-jT-SDG" firstAttribute="centerX" secondItem="xGq-of-vsu" secondAttribute="centerX" id="eKd-It-BJV"/>
-                <constraint firstItem="wn4-Cf-Bor" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="eSw-0a-0Ae"/>
-                <constraint firstItem="JfQ-q3-fZH" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="eoS-6H-tER"/>
-                <constraint firstItem="2cP-rW-fzM" firstAttribute="top" secondItem="xGq-of-vsu" secondAttribute="top" constant="8" id="hcI-5g-0LY"/>
-                <constraint firstItem="2cP-rW-fzM" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="hnD-44-2fm"/>
-                <constraint firstItem="Ev9-Aj-Ysl" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="pDl-On-k6L"/>
-                <constraint firstItem="Ev9-Aj-Ysl" firstAttribute="leading" secondItem="ihG-fo-m2Q" secondAttribute="trailing" constant="8" id="vj7-1I-YOd"/>
-            </constraints>
-            <nil key="simulatedStatusBarMetrics"/>
-            <nil key="simulatedTopBarMetrics"/>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="333" y="681.5"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="More" width="20" height="6"/>
-        <image name="audioTrackIcon" width="19" height="19"/>
-        <image name="backIcon" width="32" height="16"/>
-        <image name="forwardIcon" width="32" height="16"/>
-        <image name="playIcon" width="19" height="17"/>
-        <image name="speedIcon" width="19" height="19"/>
-        <image name="videoEffectsIcon" width="21" height="21"/>
-    </resources>
-</document>

+ 34 - 0
Sources/VLCMovieViewControlPanelView.h

@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * VLCMovieViewControlPanelView.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Tobias Conradi <videolan@tobias-conradi.de>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+
+#import <UIKit/UIKit.h>
+#import "VLCVolumeView.h"
+#import "VLCFrostedGlasView.h"
+
+@interface VLCMovieViewControlPanelView : VLCFrostedGlasView
+
+@property (nonatomic, strong)  UIButton *playbackSpeedButton;
+@property (nonatomic, strong)  UIButton *trackSwitcherButton;
+
+@property (nonatomic, strong)  UIButton *bwdButton;
+@property (nonatomic, strong)  UIButton *playPauseButton;
+@property (nonatomic, strong)  UIButton *fwdButton;
+
+@property (nonatomic, strong)  UIButton *videoFilterButton;
+@property (nonatomic, strong)  UIButton *moreActionsButton;
+
+@property (nonatomic, strong)  VLCVolumeView *volumeView;
+
+- (void)updateButtons;
+
+@end

+ 242 - 0
Sources/VLCMovieViewControlPanelView.m

@@ -0,0 +1,242 @@
+/*****************************************************************************
+ * VLCMovieViewControlPanelView.m
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Tobias Conradi <videolan@tobias-conradi.de>
+ *          Carola Nitz <nitz.carola@googlemail.com>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+#import "VLCMovieViewControlPanelView.h"
+#import "VLCPlaybackController.h"
+
+@interface VLCMovieViewControlPanelView ()
+
+@property (nonatomic, strong) UIView *playbackControls;
+@property (nonatomic, strong) NSMutableArray *constraints;
+@property (nonatomic, assign) BOOL compactMode;
+@property (nonatomic, strong) VLCPlaybackController *playbackController;
+@end
+
+@implementation VLCMovieViewControlPanelView
+
+static const CGFloat maxCompactWidth = 420.0;
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self setupSubviews];
+        [self setupConstraints];
+        _compactMode = YES;
+        [self setupConstraints:_compactMode];
+    }
+    return self;
+}
+
+- (void)setupSubviews
+{
+    _playbackSpeedButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_playbackSpeedButton setImage:[UIImage imageNamed:@"speedIcon"] forState:UIControlStateNormal];
+    _playbackSpeedButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_playbackSpeedButton];
+
+    _trackSwitcherButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_trackSwitcherButton setImage:[UIImage imageNamed:@"audioTrackIcon"] forState:UIControlStateNormal];
+    _trackSwitcherButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_trackSwitcherButton];
+
+    _playbackControls = [[UIView alloc] initWithFrame:CGRectZero];
+    _playbackControls.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_playbackControls];
+
+    _bwdButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_bwdButton setImage:[UIImage imageNamed:@"backIcon"] forState:UIControlStateNormal];
+    _bwdButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [_playbackControls addSubview:_bwdButton];
+
+    _playPauseButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_playPauseButton setImage:[UIImage imageNamed:@"playIcon"] forState:UIControlStateNormal];
+    _playPauseButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [_playbackControls addSubview:_playPauseButton];
+
+    _fwdButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_fwdButton setImage:[UIImage imageNamed:@"forwardIcon"] forState:UIControlStateNormal];
+    _fwdButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [_playbackControls addSubview:_fwdButton];
+
+    _videoFilterButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_videoFilterButton setImage:[UIImage imageNamed:@"videoEffectsIcon"] forState:UIControlStateNormal];
+    _videoFilterButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_videoFilterButton];
+
+    _moreActionsButton = [[UIButton alloc] initWithFrame:CGRectZero];
+    [_moreActionsButton setImage:[UIImage imageNamed:@"More"] forState:UIControlStateNormal];
+    _moreActionsButton.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_moreActionsButton];
+
+    _volumeView = [[VLCVolumeView alloc] initWithFrame:CGRectZero];
+    _volumeView.translatesAutoresizingMaskIntoConstraints = NO;
+    [self addSubview:_volumeView];
+
+    _playbackSpeedButton.accessibilityLabel = NSLocalizedString(@"PLAYBACK_SPEED", nil);
+    _trackSwitcherButton.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
+    _bwdButton.accessibilityLabel = NSLocalizedString(@"BWD_BUTTON", nil);
+    _playPauseButton.accessibilityLabel = NSLocalizedString(@"PLAY_PAUSE_BUTTON", nil);
+    _playPauseButton.accessibilityHint = NSLocalizedString(@"LONGPRESS_TO_STOP", nil);
+    _fwdButton.accessibilityLabel = NSLocalizedString(@"FWD_BUTTON", nil);
+    _videoFilterButton.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER", nil);
+
+    UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(playPauseLongPress:)];
+    [_playPauseButton addGestureRecognizer:longPressRecognizer];
+
+    [self.volumeView setVolumeThumbImage:[UIImage imageNamed:@"sliderKnob"] forState:UIControlStateNormal];
+}
+
+- (void)setupConstraints
+{
+    NSDictionary *viewsDict = @{
+                                @"forward" : self.fwdButton,
+                                @"backward" : self.bwdButton,
+                                @"playpause" : self.playPauseButton,
+                                @"speed" : self.playbackSpeedButton,
+                                @"track" : self.trackSwitcherButton,
+                                @"more" : self.moreActionsButton,
+                                @"filter" : self.videoFilterButton,
+                                @"volume" : self.volumeView,
+                                };
+    NSMutableArray *staticConstraints = [NSMutableArray new];
+    [staticConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[backward(40)]-(margin@750)-[playpause(40)]-(margin@750)-[forward(40)]|"
+                                                                              options:NSLayoutFormatAlignAllCenterY
+                                                                              metrics:@{@"margin": @15.0}
+                                                                                views:viewsDict]];
+
+    [staticConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[backward(40)]|"
+                                                                                   options:NSLayoutFormatAlignAllCenterX
+                                                                                   metrics:nil
+                                                                                     views:viewsDict]];
+    for (NSString *object in viewsDict) {
+        NSString *format = [NSString stringWithFormat:@"V:[%@(40)]", object];
+
+        [staticConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:format
+                                                                                       options:NSLayoutFormatAlignAllCenterX
+                                                                                       metrics:nil
+                                                                                         views:viewsDict]];
+    }
+    [NSLayoutConstraint activateConstraints:staticConstraints];
+}
+
+- (void)updateViewConstraints
+{
+    BOOL compactMode = CGRectGetWidth(self.frame) <= maxCompactWidth;
+    if (self.compactMode != compactMode) {
+        self.compactMode = compactMode;
+        [self setupConstraints:compactMode];
+    }
+}
+
+- (void)setupConstraints:(BOOL)compactMode
+{
+    [self removeConstraints:_constraints];
+    
+    NSDictionary *viewsDict = @{@"speed" : self.playbackSpeedButton,
+                                @"track" : self.trackSwitcherButton,
+                                @"playback" : self.playbackControls,
+                                @"filter" : self.videoFilterButton,
+                                @"actions" : self.moreActionsButton,
+                                @"volume" : self.volumeView,
+                                };
+
+    _constraints = [NSMutableArray array];
+    if (compactMode) {
+
+        [_constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[speed(35)]-[track(35)]-(>=8)-[playback]-(>=8)-[filter(35)]-[actions(35)]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterY
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+        [_constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(>=10)-[volume(==300)]-(>=10)-|"
+                                                                                 options:0
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+
+        [_constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-[volume]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterX
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+    } else {
+        [_constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[volume(>=150)]-(>=8)-[playback]-(>=8)-[speed(35)]-[track(35)]-[filter(35)]-[actions(35)]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterY
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+
+        [_constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-|"
+                                                                                 options:0
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+    }
+
+    [_constraints addObject:[NSLayoutConstraint constraintWithItem:self.playbackControls
+                                                        attribute:NSLayoutAttributeCenterX
+                                                        relatedBy:NSLayoutRelationEqual
+                                                           toItem:self
+                                                        attribute:NSLayoutAttributeCenterX
+                                                       multiplier:1.0
+                                                         constant:0]];
+    
+    [self addConstraints:_constraints];
+}
+
+- (void)layoutSubviews
+{
+    [super layoutSubviews];
+    [self updateViewConstraints];
+}
+
+- (VLCPlaybackController *)playbackController
+{
+    if (!_playbackController) {
+        _playbackController = [VLCPlaybackController sharedInstance];
+    }
+    return _playbackController;
+}
+
+- (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer
+{
+    switch (recognizer.state) {
+        case UIGestureRecognizerStateBegan:
+        {   UIImage *image = [UIImage imageNamed:@"stopIcon"];
+            [_playPauseButton setImage:image forState:UIControlStateNormal];
+        }
+            break;
+        case UIGestureRecognizerStateEnded:
+            [self.playbackController stopPlayback];
+            break;
+        case UIGestureRecognizerStateCancelled:
+        case UIGestureRecognizerStateFailed:
+            [self updatePlayPauseButton];
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)updateButtons
+{
+    [self updatePlayPauseButton];
+
+    self.trackSwitcherButton.hidden = !self.playbackController.currentMediaHasTrackToChooseFrom;
+    self.videoFilterButton.hidden = self.playbackController.audioOnlyPlaybackSession;
+}
+
+- (void)updatePlayPauseButton
+{
+    const BOOL isPlaying = self.playbackController.isPlaying;
+    UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"];
+    [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
+}
+
+@end

+ 0 - 38
Sources/VLCMovieViewControlPanelViewController.h

@@ -1,38 +0,0 @@
-/*****************************************************************************
- * VLCMovieViewControlPanelViewController.h
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Tobias Conradi <videolan@tobias-conradi.de>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-
-#import <UIKit/UIKit.h>
-#import <MediaPlayer/MediaPlayer.h>
-#import "VLCPlaybackController.h"
-
-@interface VLCMovieViewControlPanelViewController : UIViewController
-
-@property (nonatomic, strong) IBOutlet UIButton *playbackSpeedButton;
-@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButton;
-
-@property (nonatomic, strong) IBOutlet UIButton *bwdButton;
-@property (nonatomic, strong) IBOutlet UIButton *playPauseButton;
-@property (nonatomic, strong) IBOutlet UIButton *fwdButton;
-
-@property (nonatomic, strong) IBOutlet UIButton *videoFilterButton;
-@property (nonatomic, strong) IBOutlet UIButton *moreActionsButton;
-
-@property (nonatomic, strong) IBOutlet MPVolumeView *volumeView;
-
-
-@property (nonatomic, weak) VLCPlaybackController *playbackController;
-
-
-- (void)updateButtons;
-
-@end

+ 0 - 216
Sources/VLCMovieViewControlPanelViewController.m

@@ -1,216 +0,0 @@
-/*****************************************************************************
- * VLCMovieViewControlPanelViewController.m
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Tobias Conradi <videolan@tobias-conradi.de>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-
-#import "VLCMovieViewControlPanelViewController.h"
-
-@interface VLCMovieViewControlPanelViewController ()
-
-@property (nonatomic, weak) IBOutlet UIView *playbackControls;
-@property (nonatomic, assign) BOOL compactMode;
-@end
-
-@implementation VLCMovieViewControlPanelViewController
-
-static const CGFloat maxCompactWidth = 420.0;
-
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-
-    _playbackSpeedButton.accessibilityLabel = NSLocalizedString(@"PLAYBACK_SPEED", nil);
-    _playbackSpeedButton.isAccessibilityElement = YES;
-
-    _trackSwitcherButton.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
-    _trackSwitcherButton.isAccessibilityElement = YES;
-
-    _bwdButton.accessibilityLabel = NSLocalizedString(@"BWD_BUTTON", nil);
-    _bwdButton.isAccessibilityElement = YES;
-
-
-    UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(playPauseLongPress:)];
-    [_playPauseButton addGestureRecognizer:longPressRecognizer];
-    _playPauseButton.accessibilityLabel = NSLocalizedString(@"PLAY_PAUSE_BUTTON", nil);
-    _playPauseButton.accessibilityHint = NSLocalizedString(@"LONGPRESS_TO_STOP", nil);
-    _playPauseButton.isAccessibilityElement = YES;
-
-    _fwdButton.accessibilityLabel = NSLocalizedString(@"FWD_BUTTON", nil);
-    _fwdButton.isAccessibilityElement = YES;
-
-
-    _videoFilterButton.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER", nil);
-    _videoFilterButton.isAccessibilityElement = YES;
-
-
-    // HACK: get the slider from volume view
-    UISlider *volumeSlider = nil;
-    for (id aView in self.volumeView.subviews){
-        if ([aView isKindOfClass:[UISlider class]]){
-            volumeSlider = (UISlider *)aView;
-            break;
-        }
-    }
-    [volumeSlider addTarget:nil action:@selector(volumeSliderAction:) forControlEvents:UIControlEventValueChanged];
-    [self.volumeView setVolumeThumbImage:[UIImage imageNamed:@"sliderKnob"] forState:UIControlStateNormal];
-
-    _compactMode = YES;
-    [self setupConstraints:YES];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
-    [super viewWillAppear:animated];
-    self.volumeView.hidden = NO;
-}
-
-- (void)viewDidDisappear:(BOOL)animated
-{
-    [super viewDidDisappear:animated];
-    self.volumeView.hidden = YES;
-}
-
-
-- (void) viewWillLayoutSubviews {
-    [super viewWillLayoutSubviews];
-    [self.view setNeedsUpdateConstraints];
-}
-
-- (void) updateViewConstraints {
-
-    BOOL compactMode = CGRectGetWidth(self.view.frame) <= maxCompactWidth;
-    if (self.compactMode != compactMode) {
-        self.compactMode = compactMode;
-        [self setupConstraints:compactMode];
-    }
-    [super updateViewConstraints];
-}
-
-- (void) setupConstraints:(BOOL)compactMode {
-    UIView *superview = self.view.superview;
-    NSArray *oldConstraints = [self.view.constraints filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSLayoutConstraint * evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
-        if (!superview) {
-            return YES;
-        }
-        return evaluatedObject.firstItem != superview && evaluatedObject.secondItem != superview;
-    }]];
-    [self.view removeConstraints:oldConstraints];
-
-    NSDictionary *viewsDict = @{@"speed" : self.playbackSpeedButton,
-                                @"track" : self.trackSwitcherButton,
-                                @"playback" : self.playbackControls,
-                                @"filter" : self.videoFilterButton,
-                                @"actions" : self.moreActionsButton,
-                                @"volume" : self.volumeView,
-                                };
-
-    NSMutableArray *constraints = [NSMutableArray array];
-    if (compactMode) {
-
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[speed]-8-[track]-(>=8)-[playback]-(>=8)-[filter]-8-[actions]-|"
-                                                                                 options:NSLayoutFormatAlignAllCenterY
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(>=10)-[volume]-(>=10)-|"
-                                                                                 options:0
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-[volume(==40)]-|"
-                                                                                 options:NSLayoutFormatAlignAllCenterX
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-    } else {
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[volume]-(>=8)-[playback]-(>=8)-[speed]-8-[track]-8-[filter]-8-[actions]-|"
-                                                                                 options:NSLayoutFormatAlignAllCenterY
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-|"
-                                                                                 options:0
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[volume(==40)]"
-                                                                                 options:0
-                                                                                 metrics:nil
-                                                                                   views:viewsDict]];
-
-
-    }
-
-    [constraints addObject:[NSLayoutConstraint constraintWithItem:self.playbackControls
-                                                        attribute:NSLayoutAttributeCenterX
-                                                        relatedBy:NSLayoutRelationEqual
-                                                           toItem:self.view
-                                                        attribute:NSLayoutAttributeCenterX
-                                                       multiplier:1.0
-                                                         constant:0]];
-    
-    [self.view addConstraints:constraints];
-}
-
-
-// needed for < iOS 8
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
-    [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
-    [self.view setNeedsUpdateConstraints];
-}
-
-- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
-    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
-    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
-        [self.view setNeedsUpdateConstraints];
-    } completion:nil];
-}
-
-
-- (VLCPlaybackController *)playbackController
-{
-    if (!_playbackController) {
-        _playbackController = [VLCPlaybackController sharedInstance];
-    }
-    return _playbackController;
-}
-
-- (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer
-{
-    switch (recognizer.state) {
-        case UIGestureRecognizerStateBegan:
-        {   UIImage *image = [UIImage imageNamed:@"stopIcon"];
-            [_playPauseButton setImage:image forState:UIControlStateNormal];
-        }
-            break;
-        case UIGestureRecognizerStateEnded:
-            [self.playbackController stopPlayback];
-            break;
-        case UIGestureRecognizerStateCancelled:
-        case UIGestureRecognizerStateFailed:
-            [self updatePlayPauseButton];
-            break;
-        default:
-            break;
-    }
-}
-
-- (void)updateButtons {
-    [self updatePlayPauseButton];
-
-    self.trackSwitcherButton.hidden = !self.playbackController.currentMediaHasTrackToChooseFrom;
-    self.videoFilterButton.hidden = self.playbackController.audioOnlyPlaybackSession;
-}
-
-- (void)updatePlayPauseButton
-{
-    const BOOL isPlaying = self.playbackController.isPlaying;
-    UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"];
-    [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
-}
-
-@end

+ 3 - 11
Sources/VLCMovieViewController.h

@@ -2,7 +2,7 @@
  * VLCMovieViewController.h
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
+ * Copyright (c) 2013-2017 VideoLAN. All rights reserved.
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne # videolan.org>
@@ -20,7 +20,7 @@
 @class VLCHorizontalSwipeGestureRecognizer;
 @class VLCVerticalSwipeGestureRecognizer;
 @class VLCTimeNavigationTitleView;
-@class VLCMovieViewControlPanelViewController;
+@class VLCMovieViewControlPanelView;
 
 typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
     VLCMovieJumpStateDefault,
@@ -35,7 +35,7 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
 @property (nonatomic, strong) IBOutlet VLCTimeNavigationTitleView *timeNavigationTitleView;
 @property (nonatomic, strong) IBOutlet UIButton *sleepTimerButton;
 @property (nonatomic, strong) IBOutlet UINavigationBar *toolbar;
-@property (nonatomic, strong) IBOutlet UIView *controllerPanel;
+@property (nonatomic, strong) IBOutlet VLCMovieViewControlPanelView *controllerPanel;
 @property (nonatomic, strong) IBOutlet VLCStatusLabel *statusLabel;
 
 @property (nonatomic, strong) IBOutlet UIView *playingExternallyView;
@@ -75,8 +75,6 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
 @property (nonatomic, strong) IBOutlet UILabel *trackNameLabel;
 @property (nonatomic, strong) IBOutlet UIImageView *artworkImageView;
 
-@property (nonatomic, weak) VLCMovieViewControlPanelViewController *controlPanelController;
-
 - (IBAction)closePlayback:(id)sender;
 - (IBAction)minimizePlayback:(id)sender;
 
@@ -86,14 +84,8 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
 - (IBAction)positionSliderDrag:(id)sender;
 - (IBAction)toggleTimeDisplay:(id)sender;
 
-- (IBAction)playPause;
-- (IBAction)backward:(id)sender;
-- (IBAction)forward:(id)sender;
-- (IBAction)switchTrack:(id)sender;
 - (IBAction)sleepTimer:(id)sender;
-- (IBAction)moreActions:(id)sender;
 
-- (IBAction)videoFilterToggle:(id)sender;
 - (IBAction)videoFilterSliderAction:(id)sender;
 
 - (IBAction)playbackSliderAction:(id)sender;

+ 44 - 27
Sources/VLCMovieViewController.m

@@ -2,7 +2,7 @@
  * VLCMovieViewController.m
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
+ * Copyright (c) 2013-2017 VideoLAN. All rights reserved.
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne # videolan.org>
@@ -32,7 +32,7 @@
 #import "VLCPlayerDisplayController.h"
 #import "VLCAppDelegate.h"
 #import "VLCStatusLabel.h"
-#import "VLCMovieViewControlPanelViewController.h"
+#import "VLCMovieViewControlPanelView.h"
 #import "VLCSlider.h"
 #import "VLCLibraryViewController.h"
 
@@ -367,33 +367,55 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     //Sleep Timer initialization
     [self sleepTimerInitializer:deviceSpeedCategory];
+    [self setupControlPanel];
 
-    VLCMovieViewControlPanelViewController *panelVC = [[VLCMovieViewControlPanelViewController alloc] initWithNibName:@"VLCMovieViewControlPanel"
-                                                                                                               bundle:nil];
-    [self addChildViewController:panelVC];
-    [self.view addSubview:panelVC.view];
-    panelVC.view.translatesAutoresizingMaskIntoConstraints = NO;
+    CGRect screenBounds = [[UIScreen mainScreen] bounds];
+    CGFloat screenScale = [[UIScreen mainScreen] scale];
+    _screenSizePixel = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale);
+    _saveLocation = CGPointMake(-1.f, -1.f);
+
+    [self setupConstraints];
+}
+
+- (void)setupControlPanel
+{
+    _controllerPanel = [[VLCMovieViewControlPanelView alloc] initWithFrame:CGRectZero];
+    [_controllerPanel.bwdButton addTarget:self action:@selector(backward:) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.fwdButton addTarget:self action:@selector(forward:) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.playPauseButton addTarget:self action:@selector(playPause) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.moreActionsButton addTarget:self action:@selector(moreActions:) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.playbackSpeedButton addTarget:self action:@selector(showPlaybackSpeedView) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.trackSwitcherButton addTarget:self action:@selector(switchTrack:) forControlEvents:UIControlEventTouchUpInside];
+    [_controllerPanel.videoFilterButton addTarget:self action:@selector(videoFilterToggle:) forControlEvents:UIControlEventTouchUpInside];
+
+    // HACK: get the slider from volume view
+    UISlider *volumeSlider = nil;
+    for (id aView in _controllerPanel.volumeView.subviews){
+        if ([aView isKindOfClass:[UISlider class]]){
+            volumeSlider = (UISlider *)aView;
+            break;
+        }
+    }
+    [volumeSlider addTarget:self action:@selector(volumeSliderAction:) forControlEvents:UIControlEventValueChanged];
+
+    _controllerPanel.translatesAutoresizingMaskIntoConstraints = NO;
+
+    [self.view addSubview:_controllerPanel];
+}
+
+- (void)setupConstraints
+{
     NSArray *hConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[panel]|"
                                                                     options:0
                                                                     metrics:nil
-                                                                      views:@{@"panel":panelVC.view}];
+                                                                      views:@{@"panel":_controllerPanel}];
 
     NSArray *vConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[panel]|"
                                                                     options:0
                                                                     metrics:nil
-                                                                      views:@{@"panel":panelVC.view}];
+                                                                      views:@{@"panel":_controllerPanel}];
     [self.view addConstraints:hConstraints];
     [self.view addConstraints:vConstraints];
-
-
-    [panelVC didMoveToParentViewController:self];
-    self.controlPanelController = panelVC;
-    self.controllerPanel = panelVC.view;
-
-    CGRect screenBounds = [[UIScreen mainScreen] bounds];
-    CGFloat screenScale = [[UIScreen mainScreen] scale];
-    _screenSizePixel = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale);
-    _saveLocation = CGPointMake(-1.f, -1.f);
 }
 
 - (void)viewWillAppear:(BOOL)animated
@@ -545,7 +567,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
 - (void)sleepTimerInitializer:(int)deviceSpeedCategory
 {
-
     /* add sleep timer UI */
     _sleepTimerContainer = [[VLCFrostedGlasView alloc] initWithFrame:CGRectMake(0., 0., 300., 200.)];
     _sleepTimerContainer.center = self.view.center;
@@ -658,8 +679,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     _controlsHidden = hidden;
     CGFloat alpha = _controlsHidden? 0.0f: 1.0f;
 
-    [self.controlPanelController beginAppearanceTransition:!hidden animated:animated];
-
     if (!_controlsHidden) {
         _controllerPanel.alpha = 0.0f;
         _controllerPanel.hidden = !_videoFiltersHidden;
@@ -716,8 +735,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         _artistNameLabel.hidden = _audioOnly ? NO : _controlsHidden;
         _albumNameLabel.hidden =  _audioOnly ? NO : _controlsHidden;
         _trackNameLabel.hidden =  _audioOnly ? NO : _controlsHidden;
-
-        [self.controlPanelController endAppearanceTransition];
     };
 
     UIStatusBarAnimation animationType = animated? UIStatusBarAnimationFade: UIStatusBarAnimationNone;
@@ -912,7 +929,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     [self _updateScrubLabel];
 }
 
-- (IBAction)volumeSliderAction:(id)sender
+- (void)volumeSliderAction:(id)sender
 {
     LOCKCHECK;
 
@@ -1000,7 +1017,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (currentState == VLCMediaPlayerStateError)
         [self.statusLabel showStatusMessage:NSLocalizedString(@"PLAYBACK_FAILED", nil)];
 
-    [self.controlPanelController updateButtons];
+    [_controllerPanel updateButtons];
 
     _multiSelectionView.mediaHasChapters = currentMediaHasChapters;
 }
@@ -1031,7 +1048,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     self.timeNavigationTitleView.hideAspectRatio = audioOnly;
     self.timeNavigationTitleView.positionSlider.hidden = NO;
 
-    [[self controlPanelController] updateButtons];
+    [_controllerPanel updateButtons];
     
     _audioOnly = audioOnly;
 }

+ 10 - 18
VLC.xcodeproj/project.pbxproj

@@ -276,7 +276,7 @@
 		7D787F1F1D40FDE70003CFA1 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784E6183A99E1009EE944 /* Reachability.m */; };
 		7D787F201D40FDE70003CFA1 /* VLCCloudStorageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4184AA141A5492070063DF5A /* VLCCloudStorageController.m */; };
 		7D787F211D40FDE70003CFA1 /* VLCCloudStorageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784B0183A990F009EE944 /* VLCCloudStorageTableViewCell.m */; };
-		7D787F221D40FDE70003CFA1 /* VLCMovieViewControlPanelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */; };
+		7D787F221D40FDE70003CFA1 /* VLCMovieViewControlPanelView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.m */; };
 		7D787F231D40FDE70003CFA1 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFF041BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserHTTP.m */; };
 		7D787F241D40FDE70003CFA1 /* VLCNetworkServerLoginInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = DDEAECBD1BDEBF6700756C83 /* VLCNetworkServerLoginInformation.m */; };
 		7D787F251D40FDE70003CFA1 /* VLCFirstStepsFourthPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9289781877467E009108FD /* VLCFirstStepsFourthPageViewController.m */; };
@@ -455,7 +455,6 @@
 		7D787FDB1D40FDE70003CFA1 /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629B1765DC560011611A /* style.css */; };
 		7D787FDC1D40FDE70003CFA1 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D27EC2919DF310300EF0370 /* VLCFirstStepsSecondPageViewController~ipad.xib */; };
 		7D787FDD1D40FDE70003CFA1 /* VLCPlaylistCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBBF18B183AB4300009A339 /* VLCPlaylistCollectionViewCell.xib */; };
-		7D787FDE1D40FDE70003CFA1 /* VLCMovieViewControlPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */; };
 		7D787FDF1D40FDE70003CFA1 /* VLCCloudServicesTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */; };
 		7D787FE01D40FDE70003CFA1 /* papasscode_failed_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7D9870611A3E03D5009CF27D /* papasscode_failed_bg@2x.png */; };
 		7D787FE11D40FDE70003CFA1 /* VLCCone512x512.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DDFF4241BDFD23300913BD1 /* VLCCone512x512.png */; };
@@ -518,7 +517,7 @@
 		7DC54FAE1C046615007B4E42 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784E6183A99E1009EE944 /* Reachability.m */; };
 		7DC54FAF1C046615007B4E42 /* VLCCloudStorageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4184AA141A5492070063DF5A /* VLCCloudStorageController.m */; };
 		7DC54FB01C046615007B4E42 /* VLCCloudStorageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784B0183A990F009EE944 /* VLCCloudStorageTableViewCell.m */; };
-		7DC54FB11C046615007B4E42 /* VLCMovieViewControlPanelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */; };
+		7DC54FB11C046615007B4E42 /* VLCMovieViewControlPanelView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.m */; };
 		7DC54FB21C046615007B4E42 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFF041BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserHTTP.m */; };
 		7DC54FB31C046615007B4E42 /* VLCNetworkServerLoginInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = DDEAECBD1BDEBF6700756C83 /* VLCNetworkServerLoginInformation.m */; };
 		7DC54FB41C046615007B4E42 /* VLCFirstStepsFourthPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9289781877467E009108FD /* VLCFirstStepsFourthPageViewController.m */; };
@@ -692,7 +691,6 @@
 		7DC5506C1C046615007B4E42 /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629B1765DC560011611A /* style.css */; };
 		7DC5506E1C046615007B4E42 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D27EC2919DF310300EF0370 /* VLCFirstStepsSecondPageViewController~ipad.xib */; };
 		7DC5506F1C046615007B4E42 /* VLCPlaylistCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBBF18B183AB4300009A339 /* VLCPlaylistCollectionViewCell.xib */; };
-		7DC550701C046615007B4E42 /* VLCMovieViewControlPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */; };
 		7DC550721C046615007B4E42 /* VLCCloudServicesTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */; };
 		7DC550731C046615007B4E42 /* papasscode_failed_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7D9870611A3E03D5009CF27D /* papasscode_failed_bg@2x.png */; };
 		7DC550741C046615007B4E42 /* VLCCone512x512.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DDFF4241BDFD23300913BD1 /* VLCCone512x512.png */; };
@@ -781,7 +779,7 @@
 		DD13A37B1BEE2FAA00A35554 /* VLCMaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD13A37A1BEE2FAA00A35554 /* VLCMaskView.m */; };
 		DD1A45FD1B676BAC00086F57 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DDE1BCE41B676B8800A4B9CE /* Localizable.strings */; };
 		DD1B31F41BF637D500A369B6 /* VLCPlaybackInfoTracksTVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD1B31F21BF637D500A369B6 /* VLCPlaybackInfoTracksTVViewController.m */; };
-		DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */; };
+		DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.m */; };
 		DD1CB05A1BBAC549006EDDE6 /* VLCVolumeView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD1CB0591BBAC549006EDDE6 /* VLCVolumeView.m */; };
 		DD2789DD1B67A5C400CED769 /* VLCThumbnailsCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */; };
 		DD2789DE1B67A5CD00CED769 /* VLCWatchMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EA6301AF50CFE007FF096 /* VLCWatchMessage.m */; };
@@ -881,7 +879,6 @@
 		DDA1B8EE1CD4DC2A0076BC45 /* GRKArrayDiff+UICollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA1B8ED1CD4DC2A0076BC45 /* GRKArrayDiff+UICollectionView.m */; };
 		DDA1B9091CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA1B9081CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.m */; };
 		DDA1B90A1CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA1B9081CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.m */; };
-		DDAD5C2B1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */; };
 		DDB7C6A41BAEB28200E6570E /* WKInterfaceController+VLCConnectionAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = DD9FBE761BAD6BB600FFE77A /* WKInterfaceController+VLCConnectionAlert.m */; };
 		DDBE44FF1BFB6A8B00E5D35E /* CAAnimation+VLCWiggle.m in Sources */ = {isa = PBXBuildFile; fileRef = DDBE44FE1BFB6A8B00E5D35E /* CAAnimation+VLCWiggle.m */; };
 		DDC10BE41AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDC10BE31AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m */; };
@@ -1685,9 +1682,8 @@
 		DDA1B8ED1CD4DC2A0076BC45 /* GRKArrayDiff+UICollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GRKArrayDiff+UICollectionView.m"; sourceTree = "<group>"; };
 		DDA1B9071CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "VLCNetworkServerLoginInformation+Keychain.h"; sourceTree = "<group>"; };
 		DDA1B9081CE902EE0076BC45 /* VLCNetworkServerLoginInformation+Keychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "VLCNetworkServerLoginInformation+Keychain.m"; sourceTree = "<group>"; };
-		DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCMovieViewControlPanel.xib; path = Resources/VLCMovieViewControlPanel.xib; sourceTree = SOURCE_ROOT; };
-		DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCMovieViewControlPanelViewController.h; path = Sources/VLCMovieViewControlPanelViewController.h; sourceTree = SOURCE_ROOT; };
-		DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCMovieViewControlPanelViewController.m; path = Sources/VLCMovieViewControlPanelViewController.m; sourceTree = SOURCE_ROOT; };
+		DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCMovieViewControlPanelView.h; path = Sources/VLCMovieViewControlPanelView.h; sourceTree = SOURCE_ROOT; };
+		DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCMovieViewControlPanelView.m; path = Sources/VLCMovieViewControlPanelView.m; sourceTree = SOURCE_ROOT; };
 		DDB959411AFBB30500BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; name = MappingModel_2_5_to_2_6.xcmappingmodel; path = ../ImportedSources/MediaLibraryKit/MappingModel_2_5_to_2_6.xcmappingmodel; sourceTree = "<group>"; };
 		DDBE44FD1BFB6A8B00E5D35E /* CAAnimation+VLCWiggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CAAnimation+VLCWiggle.h"; sourceTree = "<group>"; };
 		DDBE44FE1BFB6A8B00E5D35E /* CAAnimation+VLCWiggle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CAAnimation+VLCWiggle.m"; sourceTree = "<group>"; };
@@ -2210,8 +2206,8 @@
 				7D5CAA8B1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m */,
 				7D1276601AADA0E600F0260C /* VLCMultiSelectionMenuView.h */,
 				7D1276611AADA0E600F0260C /* VLCMultiSelectionMenuView.m */,
-				DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.h */,
-				DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */,
+				DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.h */,
+				DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelView.m */,
 			);
 			name = Playback;
 			sourceTree = "<group>";
@@ -2441,7 +2437,6 @@
 				7D6BEF1D19E027A100DF3972 /* Cloud */,
 				7D6BEF1F19E027DA00DF3972 /* Download & Network */,
 				7D6BEF1E19E027BE00DF3972 /* Library */,
-				DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */,
 				7DBBF190183AB4300009A339 /* VLCMovieViewController~ipad.xib */,
 				7DBBF191183AB4300009A339 /* VLCMovieViewController~iphone.xib */,
 				7D27EB9319DEE11900EF0370 /* Launch Screen.xib */,
@@ -3589,7 +3584,6 @@
 				7D787FDB1D40FDE70003CFA1 /* style.css in Resources */,
 				7D787FDC1D40FDE70003CFA1 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */,
 				7D787FDD1D40FDE70003CFA1 /* VLCPlaylistCollectionViewCell.xib in Resources */,
-				7D787FDE1D40FDE70003CFA1 /* VLCMovieViewControlPanel.xib in Resources */,
 				7D787FDF1D40FDE70003CFA1 /* VLCCloudServicesTableViewController.xib in Resources */,
 				7D5B26671D6350BF00FE7B4D /* gradient-cell.png in Resources */,
 				7D787FE01D40FDE70003CFA1 /* papasscode_failed_bg@2x.png in Resources */,
@@ -3652,7 +3646,6 @@
 				7AC8629D1765DC560011611A /* style.css in Resources */,
 				7D27EC2B19DF310300EF0370 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */,
 				7DBBF1A0183AB4300009A339 /* VLCPlaylistCollectionViewCell.xib in Resources */,
-				DDAD5C2B1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib in Resources */,
 				417CDA241A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib in Resources */,
 				7D9870671A3E03D5009CF27D /* papasscode_failed_bg@2x.png in Resources */,
 				7DDFF4251BDFD23300913BD1 /* VLCCone512x512.png in Resources */,
@@ -3714,7 +3707,6 @@
 				7DC5506C1C046615007B4E42 /* style.css in Resources */,
 				7DC5506E1C046615007B4E42 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */,
 				7DC5506F1C046615007B4E42 /* VLCPlaylistCollectionViewCell.xib in Resources */,
-				7DC550701C046615007B4E42 /* VLCMovieViewControlPanel.xib in Resources */,
 				7DC550721C046615007B4E42 /* VLCCloudServicesTableViewController.xib in Resources */,
 				7DC550731C046615007B4E42 /* papasscode_failed_bg@2x.png in Resources */,
 				7DC550741C046615007B4E42 /* VLCCone512x512.png in Resources */,
@@ -4226,7 +4218,7 @@
 				7D787F1F1D40FDE70003CFA1 /* Reachability.m in Sources */,
 				7D787F201D40FDE70003CFA1 /* VLCCloudStorageController.m in Sources */,
 				7D787F211D40FDE70003CFA1 /* VLCCloudStorageTableViewCell.m in Sources */,
-				7D787F221D40FDE70003CFA1 /* VLCMovieViewControlPanelViewController.m in Sources */,
+				7D787F221D40FDE70003CFA1 /* VLCMovieViewControlPanelView.m in Sources */,
 				7D787F231D40FDE70003CFA1 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */,
 				7D787F241D40FDE70003CFA1 /* VLCNetworkServerLoginInformation.m in Sources */,
 				7D787F251D40FDE70003CFA1 /* VLCFirstStepsFourthPageViewController.m in Sources */,
@@ -4355,7 +4347,7 @@
 				DD846BDF1D1FCCCD00699D17 /* VLCNetworkLoginDataSource.m in Sources */,
 				4184AA151A5492070063DF5A /* VLCCloudStorageController.m in Sources */,
 				9BE4D1CE183D76950006346C /* VLCCloudStorageTableViewCell.m in Sources */,
-				DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelViewController.m in Sources */,
+				DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelView.m in Sources */,
 				DDF908D01CF4CCAA00108B70 /* VLCNetworkLoginViewButtonCell.m in Sources */,
 				DD3EFF3D1BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */,
 				DDEAECBE1BDEBF6700756C83 /* VLCNetworkServerLoginInformation.m in Sources */,
@@ -4481,7 +4473,7 @@
 				7DC54FAE1C046615007B4E42 /* Reachability.m in Sources */,
 				7DC54FAF1C046615007B4E42 /* VLCCloudStorageController.m in Sources */,
 				7DC54FB01C046615007B4E42 /* VLCCloudStorageTableViewCell.m in Sources */,
-				7DC54FB11C046615007B4E42 /* VLCMovieViewControlPanelViewController.m in Sources */,
+				7DC54FB11C046615007B4E42 /* VLCMovieViewControlPanelView.m in Sources */,
 				7DC54FB21C046615007B4E42 /* VLCLocalNetworkServiceBrowserHTTP.m in Sources */,
 				7DC54FB31C046615007B4E42 /* VLCNetworkServerLoginInformation.m in Sources */,
 				7DC54FB41C046615007B4E42 /* VLCFirstStepsFourthPageViewController.m in Sources */,