Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
52018781
Commit
52018781
authored
Aug 17, 2017
by
Carola
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add spacer to make sure the controls are always equally spaced even on iPhone 4
parent
386ebd55
Pipeline
#98
failed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
Sources/VLCMovieViewControlPanelView.m
Sources/VLCMovieViewControlPanelView.m
+16
-1
No files found.
Sources/VLCMovieViewControlPanelView.m
View file @
52018781
...
...
@@ -17,6 +17,8 @@
@interface
VLCMovieViewControlPanelView
()
@property
(
nonatomic
,
strong
)
UIView
*
playbackControls
;
@property
(
nonatomic
,
strong
)
UIView
*
spacer1
;
@property
(
nonatomic
,
strong
)
UIView
*
spacer2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
constraints
;
@property
(
nonatomic
,
assign
)
BOOL
compactMode
;
@property
(
nonatomic
,
strong
)
VLCPlaybackController
*
playbackController
;
...
...
@@ -59,6 +61,16 @@ static const CGFloat maxCompactWidth = 420.0;
_bwdButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_playbackControls
addSubview
:
_bwdButton
];
_spacer1
=
[
UIView
new
];
_spacer1
.
backgroundColor
=
[
UIColor
clearColor
];
_spacer1
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_playbackControls
addSubview
:
_spacer1
];
_spacer2
=
[
UIView
new
];
_spacer2
.
backgroundColor
=
[
UIColor
clearColor
];
_spacer2
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_playbackControls
addSubview
:
_spacer2
];
_playPauseButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectZero
];
[
_playPauseButton
setImage
:[
UIImage
imageNamed
:
@"playIcon"
]
forState
:
UIControlStateNormal
];
_playPauseButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
...
@@ -108,9 +120,12 @@ static const CGFloat maxCompactWidth = 420.0;
@"more"
:
self
.
moreActionsButton
,
@"filter"
:
self
.
videoFilterButton
,
@"volume"
:
self
.
volumeView
,
@"spacer1"
:
_spacer1
,
@"spacer2"
:
_spacer2
,
};
NSMutableArray
*
staticConstraints
=
[
NSMutableArray
new
];
[
staticConstraints
addObjectsFromArray
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"H:|[backward(40)]-(margin@750)-[playpause(40)]-(margin@750)-[forward(40)]|"
[
staticConstraints
addObjectsFromArray
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"H:|[backward(40)][spacer1(margin@750)][playpause(40)][spacer2(==spacer1)][forward(40)]|"
options:
NSLayoutFormatAlignAllCenterY
metrics:
@{
@"margin"
:
@15.0
}
views:
viewsDict
]];
...
...
Carola
@caro
mentioned in issue
#46 (closed)
·
Aug 17, 2017
mentioned in issue
#46 (closed)
mentioned in issue #46
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment