Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
6989e3c9
Commit
6989e3c9
authored
Jul 20, 2014
by
Gleb Pinigin
Browse files
Playlist: correcly calculate insets for both interface orientations
parent
7ab453c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaylistViewController.m
View file @
6989e3c9
...
...
@@ -109,12 +109,9 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
_tableView
.
opaque
=
YES
;
_tableView
.
indicatorStyle
=
UIScrollViewIndicatorStyleWhite
;
}
self
.
view
=
_tableView
;
[
_tableView
reloadData
];
if
(
setInset
)
{
CGFloat
originY
=
self
.
navigationController
.
navigationBar
.
frame
.
size
.
height
+
[
UIApplication
sharedApplication
].
statusBarFrame
.
size
.
height
;
_tableView
.
contentInset
=
UIEdgeInsetsMake
(
originY
,
0
,
0
,
0
);
}
}
else
{
if
(
!
_collectionView
)
{
_folderLayout
=
[[
VLCFolderCollectionViewFlowLayout
alloc
]
init
];
...
...
@@ -135,11 +132,20 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
}
self
.
view
=
_collectionView
;
[
_collectionView
reloadData
];
if
(
setInset
)
{
CGFloat
originY
=
self
.
navigationController
.
navigationBar
.
frame
.
size
.
height
+
[
UIApplication
sharedApplication
].
statusBarFrame
.
size
.
height
;
}
if
(
setInset
)
{
CGSize
statusBarSize
=
[
UIApplication
sharedApplication
].
statusBarFrame
.
size
;
// Status bar frame doesn't change correctly on rotation
CGFloat
statusBarHeight
=
MIN
(
statusBarSize
.
height
,
statusBarSize
.
width
);
CGFloat
originY
=
self
.
navigationController
.
navigationBar
.
frame
.
size
.
height
+
statusBarHeight
;
if
(
_usingTableViewToShowData
)
_tableView
.
contentInset
=
UIEdgeInsetsMake
(
originY
,
0
,
0
,
0
);
else
_collectionView
.
contentInset
=
UIEdgeInsetsMake
(
originY
,
0
,
0
,
0
);
}
}
self
.
view
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
|
UIViewAutoresizingFlexibleWidth
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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