Commit 308145b9 authored by Carola Nitz's avatar Carola Nitz

VLCMovieViewController: correctly position scrubView

fixes #361
parent 4b886e21
......@@ -32,6 +32,7 @@
<outlet property="saturationSlider" destination="135" id="152"/>
<outlet property="scrubHelpLabel" destination="246" id="249"/>
<outlet property="scrubIndicatorView" destination="241" id="247"/>
<outlet property="scrubViewTopConstraint" destination="17c-gK-WU7" id="6VV-GR-hcO"/>
<outlet property="statusLabel" destination="210" id="211"/>
<outlet property="trackNameLabel" destination="282" id="284"/>
<outlet property="videoFilterView" destination="117" id="147"/>
......@@ -231,6 +232,7 @@
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="241" firstAttribute="top" secondItem="1" secondAttribute="top" id="17c-gK-WU7"/>
<constraint firstItem="210" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" id="1Jo-j2-hD6"/>
<constraint firstAttribute="trailing" secondItem="279" secondAttribute="trailing" constant="20" id="4Qt-0h-qAV"/>
<constraint firstItem="yK6-Ph-SVE" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="9m0-dB-TJV"/>
......@@ -240,7 +242,6 @@
<constraint firstItem="vR5-i9-KEJ" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="JxU-VS-ZDs"/>
<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="241" firstAttribute="top" secondItem="1" secondAttribute="top" id="Rbo-yX-bEI"/>
<constraint firstItem="yK6-Ph-SVE" firstAttribute="centerX" secondItem="1" secondAttribute="centerX" id="Vea-d4-8Yb"/>
<constraint firstItem="210" firstAttribute="trailing" secondItem="1" secondAttribute="trailing" constant="-20" id="Y01-Bg-s0k"/>
<constraint firstItem="108" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="iXa-B5-wPd"/>
......
......@@ -24,7 +24,6 @@
#import "VLCEqualizerView.h"
#import "VLCMultiSelectionMenuView.h"
#import "VLCPlaybackController.h"
#import "UIDevice+VLC.h"
#import "VLCTimeNavigationTitleView.h"
#import "VLCAppDelegate.h"
#import "VLCStatusLabel.h"
......@@ -116,9 +115,10 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
}
@property (nonatomic, strong) VLCMovieViewControlPanelView *controllerPanel;
@property (nonatomic, strong) VLCService *services;
@property (nonatomic, strong) VLCTimeNavigationTitleView *timeNavigationTitleView;
@property (nonatomic, strong) IBOutlet PlayingExternallyView *playingExternalView;
@property (nonatomic, strong) IBOutlet PlaybackSpeedView *playbackSpeedView;
@property (nonatomic, strong) VLCTimeNavigationTitleView *timeNavigationTitleView;
@property (nonatomic, strong) IBOutlet NSLayoutConstraint *scrubViewTopConstraint;
@end
......@@ -144,7 +144,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
- (void)viewDidLoad
{
[super viewDidLoad];
CGRect rect;
_vpc = [VLCPlaybackController sharedInstance];
......@@ -201,7 +200,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_previousJumpState = VLCMovieJumpStateDefault;
_numberOfTapSeek = 0;
rect = self.resetVideoFilterButton.frame;
CGRect rect = self.resetVideoFilterButton.frame;
rect.origin.y = rect.origin.y + 5.;
self.resetVideoFilterButton.frame = rect;
......@@ -377,7 +376,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
- (void)setupNavigationbar
{
if (!self.timeNavigationTitleView) {
self.timeNavigationTitleView = [[[NSBundle mainBundle] loadNibNamed:@"VLCTimeNavigationTitleView" owner:self options:nil] objectAtIndex:0];
self.timeNavigationTitleView.translatesAutoresizingMaskIntoConstraints = NO;
......@@ -390,7 +388,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
if (self.navigationBarStackView.superview == nil) {
[self.navigationController.navigationBar addSubview:self.navigationBarStackView];
NSObject *guide = self.navigationController.navigationBar;
if (@available(iOS 11.0, *)) {
guide = self.navigationController.navigationBar.layoutMarginsGuide;
......@@ -402,8 +399,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
[NSLayoutConstraint constraintWithItem:self.navigationBarStackView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:guide attribute:NSLayoutAttributeRight multiplier:1 constant:-8],
[NSLayoutConstraint constraintWithItem:self.navigationBarStackView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeTop multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.navigationBarStackView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self.navigationBarStackView attribute:NSLayoutAttributeHeight multiplier:1 constant:0]
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self.navigationBarStackView attribute:NSLayoutAttributeHeight multiplier:1 constant:0],
]];
self.scrubViewTopConstraint.constant = CGRectGetMaxY(self.navigationController.navigationBar.frame);
}
}
......@@ -494,6 +492,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
multiSelectionFrame.origin.y = controllerPanelFrame.origin.y - multiSelectionFrame.size.height;
}
_multiSelectionView.frame = multiSelectionFrame;
self.scrubViewTopConstraint.constant = CGRectGetMaxY(self.navigationController.navigationBar.frame);
}
- (void)viewWillDisappear:(BOOL)animated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment