Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
fcc41892
Commit
fcc41892
authored
Oct 20, 2015
by
Felix Paul Kühne
Browse files
frosted glass view: add reimplementation for ATV
parent
bb0afb92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCFrostedGlasView.m
View file @
fcc41892
...
...
@@ -2,10 +2,11 @@
* VLCFrostedGlasView.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013-201
4
VideoLAN. All rights reserved.
* Copyright (c) 2013-201
5
VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <nitz.carola # googlemail.com>
* Felix Paul Kühne <fkuehne # videolan # org>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
...
...
@@ -14,8 +15,12 @@
@interface
VLCFrostedGlasView
()
#if TARGET_OS_IOS
@property
(
nonatomic
)
UIToolbar
*
toolbar
;
@property
(
nonatomic
)
UIImageView
*
imageview
;
#else
@property
(
nonatomic
)
UIVisualEffectView
*
effectView
;
#endif
@end
...
...
@@ -44,16 +49,25 @@
{
[
self
setClipsToBounds
:
YES
];
#if TARGET_OS_IOS
if
(
!
[
self
toolbar
])
{
[
self
setToolbar
:[[
UIToolbar
alloc
]
initWithFrame
:[
self
bounds
]]];
[
self
.
layer
insertSublayer
:[
self
.
toolbar
layer
]
atIndex
:
0
];
[
self
.
toolbar
setBarStyle
:
UIBarStyleBlack
];
}
#else
_effectView
=
[[
UIVisualEffectView
alloc
]
initWithEffect
:[
UIBlurEffect
effectWithStyle
:
UIBlurEffectStyleDark
]];
_effectView
.
frame
=
self
.
bounds
;
_effectView
.
clipsToBounds
=
YES
;
[
self
addSubview
:
_effectView
];
#endif
}
#if TARGET_OS_IOS
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
[
self
.
toolbar
setFrame
:[
self
bounds
]];
}
#endif
@end
\ No newline at end of file
@end
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